{"id":27379,"library":"scikit-multilearn","title":"scikit-multilearn","description":"A BSD-licensed library for multi-label classification built on top of scikit-learn. Current version is 0.2.0. The project appears to be in maintenance mode with no recent releases; last PyPI release was in 2018.","status":"maintenance","version":"0.2.0","language":"python","source_language":"en","source_url":"https://github.com/scikit-multilearn/scikit-multilearn","tags":["multi-label","classification","scikit-learn","machine-learning"],"install":[{"cmd":"pip install scikit-multilearn","lang":"bash","label":"Latest release"}],"dependencies":[{"reason":"Core dependency for base classifiers and utilities.","package":"scikit-learn","optional":false},{"reason":"Required for array operations.","package":"numpy","optional":false},{"reason":"Required for sparse matrix support.","package":"scipy","optional":false}],"imports":[{"note":"Common mistake: importing from 'sklearn.multilearn' or 'scikit_multilearn'.","symbol":"BinaryRelevance","correct":"from skmultilearn.problem_transform import BinaryRelevance"},{"note":"LabelPowerset is in the problem_transform submodule, not top-level.","wrong":"from skmultilearn import LabelPowerset","symbol":"LabelPowerset","correct":"from skmultilearn.problem_transform import LabelPowerset"},{"note":"Old import path; use 'problem_transform'.","wrong":"from skmultilearn.classifier_chain import ClassifierChain","symbol":"ClassifierChain","correct":"from skmultilearn.problem_transform import ClassifierChain"},{"note":"Internal path changed; use 'cluster' directly.","wrong":"from skmultilearn.cluster.base import LabelSpaceClustererBase","symbol":"LabelSpaceClustererBase","correct":"from skmultilearn.cluster import LabelSpaceClustererBase"}],"quickstart":{"code":"import numpy as np\nfrom skmultilearn.problem_transform import BinaryRelevance\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.datasets import make_multilabel_classification\n\nX, Y = make_multilabel_classification(n_samples=100, n_features=20, n_classes=5, random_state=42)\nclassifier = BinaryRelevance(classifier=RandomForestClassifier(), require_dense=[True, True])\nclassifier.fit(X, Y)\npredictions = classifier.predict(X)\nprint(predictions.shape)","lang":"python","description":"Quick example using BinaryRelevance with a RandomForest base classifier."},"warnings":[{"fix":"Check for newer forks or use 'pip install scikit-multilearn==0.2.0' (still old).","message":"The library has not been updated since 2018; consider using scikit-multilearn v2 (if available) or alternatives like 'skmultilearn' fork.","severity":"deprecated","affected_versions":">=0.2.0"},{"fix":"Always pass `require_dense=[True, True]` to adapters like BinaryRelevance when using sklearn classifiers.","message":"Many methods require `require_dense` parameter to be set to [True, True] for classifiers that expect dense arrays, otherwise confusing errors occur.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'import skmultilearn' or 'from skmultilearn import ...'.","message":"The module name in imports is 'skmultilearn', not 'scikit_multilearn' or 'sklearn_multilearn'.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.5 or later.","message":"Version 0.2.0 dropped Python 2 support; Python 3.5+ required.","severity":"breaking","affected_versions":">=0.2.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install scikit-multilearn' then use 'import skmultilearn'.","cause":"Trying to import the module before installing or using wrong name.","error":"ModuleNotFoundError: No module named 'skmultilearn'"},{"fix":"Upgrade to 0.2.0: 'pip install scikit-multilearn==0.2.0'.","cause":"Using an older version of scikit-multilearn (<0.2.0) where require_dense was not introduced.","error":"TypeError: init() got an unexpected keyword argument 'require_dense'"},{"fix":"Convert input to numpy array: 'X = np.array(X)'.","cause":"passing a list or other format where dense array expected.","error":"ValueError: Input data is not a dense numpy array or a sparse scipy array"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}