Closed jmrichardson closed 2 years ago
@jmrichardson I'm sorry we accidentally left your note get buried in our email. But thank you for submitting a bug report to Yellowbrick! The KMeans
estimator does in fact use n_clusters
as its attribute, not k
but k
should be accessed by the visualizer itself. Something has gone wrong here, and I think it might be related to version bump to scikit-learn
1.0. We haven't really looked into the new scikit-learn version yet, but I suspect this will be part of a lot of changes we'll need to make to get compatibility with the new version.
I can not reproduce the error in an environment with
scikit-learn==1.0 python=3.8.8 macosx_10_13_x86_64
Glad to have more information!
I suspect this kind of reported problems due to having different versions of required libraries.
Just another feedback, no problem on following environment:
Python 3.7.12
scikit-learn==1.0.2
yellowbrick==1.4
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
@jmrichardson As @bbengfort and @mrtrkmn mentioned, this is more than likely a dependency issue. Thank you for the original bug report. V1.4 of Yellowbrick was recently release, please upgrade pip install -U yellowbrick
Using the example documentation code:
I get this error:
Versions: