rasbt / mlxtend

A library of extension and helper modules for Python's data analysis and machine learning libraries.
https://rasbt.github.io/mlxtend/
Other
4.83k stars 855 forks source link

plot_pca_correlation_graph Import issue on Colab #939

Closed kbnnf closed 2 years ago

kbnnf commented 2 years ago

Describe the bug

Hi, i have an issue import plot_pca_correlation_graph on Colab, i tried !pip install and !git clone mlxtend, also tried to install the dev version but for some reason it's not working either (i already managed to install the dev version in Colab for another projet).

I tried importing plot_decision_regions and that one works.

Steps/Code to Reproduce

!pip install mlxtend
from mlxtend.plotting import plot_pca_correlation_graph

Expected Results

Actual Results

ImportError: cannot import name 'plot_pca_correlation_graph' from 'mlxtend.plotting' (/usr/local/lib/python3.7/dist-packages/mlxtend/plotting/init.py)

Versions

MLxtend 0.14.0 Linux-5.4.188+-x86_64-with-Ubuntu-18.04-bionic Python 3.7.13 (default, Apr 24 2022, 01:04:09) [GCC 7.5.0] Scikit-learn 1.0.2 NumPy 1.21.6 SciPy 1.4.1

rasbt commented 2 years ago

Hi there. Just checking the release notes, the function was added in version 0.17, and it looks like your version is 0.14. Upgrading to the recent mlxtend version will probably fix the issue!

rasbt commented 2 years ago

Btw I think you need

!pip install mlxtend --upgrade