neural_trees.mcnemar_test#

neural_trees.mcnemar_test(y_true, y_pred_A, y_pred_B, alpha: float = 0.05) TestResult[source]#

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

Examines the contingency table of disagreements between two classifiers. Less powerful than the 5×2cv F test but useful when you only have a fixed test set.

Parameters:
y_truearray-like of shape (n_samples,)

True labels.

y_pred_Aarray-like of shape (n_samples,)

Predictions from classifier A.

y_pred_Barray-like of shape (n_samples,)

Predictions from classifier B.

alphafloat, default=0.05
Returns:
TestResult