How to acces the confusion matrix or get more metrics from LAzyPredic Classifier?

13 Views Asked by At

I'm running a LazyClassiffier and I need to calculate some metrics that don't come as defaul in the output, the default only prints Accuracy, Balnced Accuracy, ROC AUC, adn F1 Score. I need to estimate the Sensitivity (Recall), Precision, Matthews Correlation Coefficient (MCC), all of which can be calculated from the confusion matrix (FP, TP, FN, TN), but I can't find a way to do it, and is not in the LazyPredict documentation either.

the basic code is:

clf = LazyClassifier()
models, preictions = clf.fit(X_train, X_test, y_train, y_test)

and the print looks like:

                         Accuracy  Balanced Accuracy  ROC AUC  F1 Score  \

Model
ExtraTreesClassifier 0.93 0.90 0.90 0.93
LGBMClassifier 0.89 0.84 0.84 0.89
XGBClassifier 0.89 0.84 0.84 0.89
RandomForestClassifier 0.89 0.84 0.84 0.89

I have a few methos and even asking GPT, but no results

0

There are 0 best solutions below