question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DeprecationWarning when importing IsolationForest

See original GitHub issue

Description

DeprecationWarning when importing IsolationForest.

Steps/Code to Reproduce

from sklearn.ensemble import IsolationForest

Expected Results

No error.

Actual Results

~/anaconda3/lib/python3.6/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release. from numpy.core.umath_tests import inner1d

Versions

Linux-4.15.0-29-generic-x86_64-with-debian-buster-sid Python 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 17:14:51) [GCC 7.2.0] NumPy 1.15.0 SciPy 1.1.0 Scikit-Learn 0.19.2

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
ferryscommented, Aug 22, 2018

Also encountering this exact same error when importing RandomForestClassifier

Reproduced by from sklearn.ensemble import RandomForestClassifier

Versions: scikit-learn 0.19.2 numpy 1.15.1

3reactions
rthcommented, Sep 2, 2018

I checked with conda search scikit-learn --channel conda-forge and there is no 0.20 listed there.

Try,

conda install scikit-learn=0.20rc1 -c conda-forge/label/rc -c conda-forge

There is error message for 0.19.1 and 0.19.2 There is no error message for 0.20rc1

It’s not an error, just a warning that was recently fixed. Use 0.20rc1 to avoid this warning message.

under this numpy version I also got the following error message RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility

Again, warning. This warning was fixed it numpy 1.15.1 (see release notes). It can be safely ignored, I think.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sklearn.ensemble.IsolationForest
“Isolation-based anomaly detection.” ACM Transactions on Knowledge Discovery from Data (TKDD) 6.1 (2012): 3. Examples. >>> >>> from sklearn.ensemble import ...
Read more >
Anomaly Detection Isolation Forest&Visualization - Kaggle
from sklearn.ensemble import IsolationForest ... DeprecationWarning: threshold_ attribute is deprecated in 0.20 and will be removed in 0.22.
Read more >
Outlier Detection — Applied Machine Learning in Python
So the idea of isolation forest is that if you build a random tree over a dataset, then if you want to figure...
Read more >
ImportError: cannot import name 'IsolationForest'
you should use the command: pip install -U sklearn. this step to update your sklearn(<0.18,maybe 0,17) to sklearn(0.18).
Read more >
skl2onnx._parse — sklearn-onnx 1.11.2 documentation
ColumnTransformer = None try: from sklearn.preprocessing import Imputer except ImportError: ... ( parser_names, e, type(model)), DeprecationWarning) names ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found