API Reference#

Every class below can be imported from skbn.

Bayesian Classifiers#

Mixed Naive Bayes#

MixedNB([categorical_features, ...])

Mixed Naive Bayes classifier for heterogeneous data.

WeightedNB([categorical_features, ...])

Weighted Mixed Naive Bayes classifier (WANBIA / wCCBN on Naive Bayes).

AnDE Family#

Averaged n-Dependence Estimators and their discriminative weighting.

AnDE([n_dependence, n_bins, strategy, ...])

Averaged n-Dependence Estimators (AnDE) [Generative].

WeightedAnDE([n_dependence, n_bins, ...])

Weighted Averaged n-Dependence Estimators (WeightedAnDE) [Hybrid].

AnJE Family#

Averaged n-Join Estimators and Accelerated Logistic Regression, on discretized attributes or, with Gaussian children, on the factors of the SPnDEs.

AnJE([n_join, n_bins, strategy, alpha, ...])

Averaged n-Join Estimators (AnJE) [Generative].

ALR([n_join, n_bins, strategy, alpha, ...])

Accelerated Higher-Order Logistic Regression (ALR^n) [Hybrid].

GaussianAnJE([n_dependence, n_bins, ...])

Averaged (n+1)-Join Estimator on the factors of the SPnDEs [Generative].

GaussianALR([n_dependence, n_bins, ...])

ALR^n on the factors of the SPnDEs [Hybrid].

Tree Augmented Naive Bayes#

Naive Bayes extended with a tree of dependencies between the attributes.

TAN([root, n_bins, strategy, alpha, ...])

Tree Augmented Naive Bayes (TAN) classifier.

WeightedTAN([root, n_bins, strategy, alpha, ...])

Discriminatively weighted Tree Augmented Naive Bayes.

K-Dependence Bayesian Classifier#

Bayesian network in which every attribute has at most k attribute parents.

KDB([k, n_bins, strategy, alpha, ...])

K-Dependence Bayesian (KDB) classifier.

WeightedKDB([k, n_bins, strategy, alpha, ...])

Discriminatively weighted K-Dependence Bayesian classifier.

Discretization#

Supervised discretizers of continuous attributes, to place before a model in a pipeline.

MDLPDiscretizer([max_bins])

Supervised entropy discretization with the MDL stopping rule.

DecisionTreeDiscretizer([n_bins, criterion, ...])

Supervised discretizer that uses decision trees to find bin boundaries.

Utilities#

show_versions()

Print the versions of scikit-bayes and of the software it runs on.

check_installation([n_jobs])

Fit and evaluate every model once and report what it found.