Scoring functions for every task type.
(y_true, y_pred). Anywhere TuiML accepts a metrics list — train, Benchmark, the MCP tools — the names come from here.On imbalanced data accuracy is misleading: predicting the majority class for everything already scores well. Prefer balanced_accuracy_score, f1_score or matthews_corrcoef there.
Multi-class variants take an average argument ("macro", "micro", "weighted"); "macro" weights every class equally, "weighted" by class frequency.
>>> from tuiml.evaluation.metrics import accuracy_score, f1_score
>>> y_true = [0, 1, 1, 0, 1]
>>> y_pred = [0, 1, 0, 0, 1]
>>> float(accuracy_score(y_true, y_pred))
0.8
Classification evaluation metrics....
Clustering evaluation metrics....
Univariate feature scoring for feature selection....
Information-theoretic evaluation metrics....
Regression evaluation metrics....