Complete the code to import the correct multi-label classifier from scikit-learn.
from sklearn.multioutput import [1]
The MultiOutputClassifier is used for multi-label classification in scikit-learn.
Complete the code to create a multi-label classifier using a decision tree as the base estimator.
from sklearn.tree import DecisionTreeClassifier from sklearn.multioutput import MultiOutputClassifier model = MultiOutputClassifier([1]())
The base estimator for MultiOutputClassifier here should be DecisionTreeClassifier.
Fix the error in the code to correctly fit the multi-label classifier on data X and labels Y.
model = MultiOutputClassifier(DecisionTreeClassifier())
model.[1](X, Y)To train the model, use the fit method with features X and labels Y.
Fill both blanks to compute the accuracy score for multi-label classification.
from sklearn.metrics import [1] score = [2](Y_true, Y_pred)
Use accuracy_score from sklearn.metrics to compute accuracy.
Fill all three blanks to create a multi-label classifier with logistic regression, fit it, and predict labels.
from sklearn.linear_model import [1] from sklearn.multioutput import MultiOutputClassifier model = MultiOutputClassifier([2]()) model.[3](X_train, Y_train) Y_pred = model.predict(X_test)
Import LogisticRegression, use it as base estimator, then fit the model.