API reference#

Decision trees#

neural_trees.SoftDecisionTree([depth, ...])

Soft Decision Tree Classifier (sklearn-compatible).

neural_trees.MultivariateDecisionTree([...])

Multivariate Decision Tree Classifier (sklearn-compatible).

neural_trees.OmnivariateDecisionTree([...])

Omnivariate Decision Tree Classifier (sklearn-compatible).

neural_trees.HardDecisionTree(weights, ...)

A trained Soft Decision Tree with its gates read as hard decisions.

Mixtures of experts#

neural_trees.HierarchicalMixtureOfExperts([...])

Hierarchical Mixture of Experts with Dropout Regularization.

neural_trees.HardRoutedExperts(gate_weights, ...)

A trained mixture of experts with its gates read as hard routing decisions.

Constructive and classical models#

neural_trees.GALNetwork([initial_hidden, ...])

GAL (Grow and Learn) Constructive Neural Network.

neural_trees.WeightedKNN([k, weight_power, ...])

Distance-Weighted K-Nearest Neighbors Classifier.

neural_trees.NaiveBayesClassifier([...])

Naive Bayes Classifier with selectable likelihood.

Statistical tests#

neural_trees.combined_5x2cv_f_test(clf_A, ...)

Alpaydın's Combined 5×2 Cross-Validation F Test.

neural_trees.mcnemar_test(y_true, y_pred_A, ...)

McNemar's Test for comparing two classifiers on the same test set.

neural_trees.paired_t_test(clf_A, clf_B, X, y)

Paired t-test for classifier comparison.