Skip to content Skip to sidebar Skip to footer

Importerror: Cannot Import Name 'plot_confusion_matrix' From 'sklearn.metrics'

I am attempting to run below code. from sklearn.metrics import plot_confusion_matrix And I am receiving below error. --------------------------------------------------------------

Solution 1:

plot_confusion_matrix is available only after v0.22. If you are not using the latest version please update using one of the following commands.

Anaconda

conda update -c conda-forge scikit-learn

PIP

pip install --upgrade scikit-learn

Post a Comment for "Importerror: Cannot Import Name 'plot_confusion_matrix' From 'sklearn.metrics'"