Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsolationForest benchmark doesn't accept legacy multi-label data representation #8637

Closed
hrjn opened this issue Mar 23, 2017 · 1 comment · Fixed by #8638
Closed

IsolationForest benchmark doesn't accept legacy multi-label data representation #8637

hrjn opened this issue Mar 23, 2017 · 1 comment · Fixed by #8638

Comments

@hrjn
Copy link
Contributor

hrjn commented Mar 23, 2017

Description

While running benchmarks/bench_isolation_forest.py the following error occurs:

Traceback (most recent call last):
  File "bench_isolation_forest_OLD.py", line 67, in <module>
    lb.fit(X[:, 1])
  File "(...)/anaconda3/lib/python3.5/site-packages/sklearn/preprocessing/label.py", line 296, in fit
    self.y_type_ = type_of_target(y)
  File "(...)/anaconda3/lib/python3.5/site-packages/sklearn/utils/multiclass.py", line 250, in type_of_target
    raise ValueError('You appear to be using a legacy multi-label data'
ValueError: You appear to be using a legacy multi-label data representation.
Sequence of sequences are no longer supported; use a binary array or sparse matrix instead.

This seems to be a Python 3 specific issue (not reproducible on Python 2.7)

Versions

Darwin-15.6.0-x86_64-i386-64bit
Python 3.5.2 |Anaconda 4.2.0 (x86_64)| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]
NumPy 1.12.0
SciPy 0.18.1
Scikit-Learn 0.18.1

@hrjn
Copy link
Contributor Author

hrjn commented Mar 23, 2017

Fix proposal in #8638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant