scikit-multilearn icon indicating copy to clipboard operation
scikit-multilearn copied to clipboard

MLARAM Attribute error

Open samhardyhey opened this issue 6 years ago • 0 comments

Walking through the documentation and the example classifiers and am attempting to fit a MLARAM instance with the included emotions dataset as below:

classifier = MLARAM() classifier.fit(X_train, y_train) predictions = classifier.predict(X_test)

AttributeError is being thrown during the fit method call as follows:

image

Have traced the issue back to _normalize_input_space(X), line 48 within site-packages/skmultilearn/adapt/mlaram.py, where .max() is being called on (originally at least) on a scipy.sparse.lil.lil_matrix.

Issue rectified by casting to a numpy array (toarray()), though it did take some digging and perhaps it would be good to require/implement a consistent input format?

Cheers

samhardyhey avatar Sep 19 '18 11:09 samhardyhey