Evaluation#

Evaluation of the models: predictive performance, clustering quality, size of the trees and fairness, each as a dictionary of metrics.

All the functions but evaluate_interpretability use only the output of a model (predictions, cluster labels, groups; evaluate_clustering_internal also the data), so they evaluate any model. evaluate_interpretability reads the structure of the model: it works with the RuleTree trees and the scikit-learn decision trees. See Evaluating the models.

evaluate_classification

Accuracy, F1, precision and recall of the predictions of a classifier and, with the class probabilities, ROC AUC and average precision.

evaluate_regression

Errors and explained variance of the predictions of a regressor, with one or several targets.

evaluate_clustering

Agreement between a clustering and known classes (external metrics).

evaluate_clustering_internal

Quality of a clustering from the data alone (internal metrics).

evaluate_fairness

Fairness of the groups of a partition (clusters, leaves or predicted classes) with respect to a sensitive attribute.

evaluate_interpretability

Size of a fitted RuleTree or scikit-learn decision tree: the fewer leaves and the shallower the tree, the shorter its rules.