Skip to content
Advertisement

Pycaret classification.compare_models does not display results grid

From the documentation and tutorials for pycaret, I expect the classification.compare_models() function to return a grid such as…

Model Accuracy AUC Recall Prec. F1 Kappa MCC TT (Sec)
0 Naive Bayes 0.9567 0.0000 0.9556 0.9619 0.9561 0.9348 0.9378 0.0076
1 K Neighbors Classifier 0.9467 0.0000 0.9444 0.9633 0.9430 0.9197 0.9295 0.0077
2 Extreme Gradient Boosting 0.9467 0.0000 0.9444 0.9633 0.9430 0.9197 0.9295 0.0521
etc.

My code

JavaScript

I get lot’s of output like this…

JavaScript

And this at the end…

JavaScript

But I never get the grid I’m hoping for. I’m running Python 3.8 with Anaconda in Git Bash on Windows.

Advertisement

Answer

On further research I found that IPython support is required for the grid to print – it will not print in console text,

I got the output I was looking for by running the code in a jupyter notebook session.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement