Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: cannot import name 'DecisionBoundaryDisplay' from 'sklearn.inspection'

I imported sklearn DecisionBoundaryDisplay via the below command in my Google Colab file.

from sklearn.inspection import DecisionBoundaryDisplay

And I'm getting the following error.

ImportError: cannot import name 'DecisionBoundaryDisplay' from 'sklearn.inspection'

I even installed the following packages & also tried by restarting my runtime but still I'm getting the error.

!pip install --upgrade scikit-learn

!pip install scipy

!pip3 install -U scikit-learn scipy matplotlib

How to fix this issue?

like image 733
Sanushi Salgado Avatar asked Jan 27 '26 16:01

Sanushi Salgado


2 Answers

what worked for me was installing scikit learn 1.1.0, i had version 1.0.2 before and got the same error you're encountering.

pip install -U scikit-learn --user

Hope it helps.

like image 139
Thierry el Sayah Avatar answered Jan 29 '26 06:01

Thierry el Sayah


It seems DecisionBoundaryDisplay is a new feature and it is currently in an unstable development version. To use it, you need to install the nightly build.

like image 38
Danylo Baibak Avatar answered Jan 29 '26 05:01

Danylo Baibak