我正在尝试使用 BinaryRelevance 和 SVC 对数据(情绪)进行分类。这段代码在
from skmultilearn.dataset import load_dataset
X_train, y_train, feature_names, label_names = load_dataset('emotions', 'train')
X_test, y_test, _, _ = load_dataset('emotions', 'test')
from skmultilearn.problem_transform import BinaryRelevance
from sklearn.svm import SVC
clf = BinaryRelevance(
classifier=SVC(),
require_dense=[False, True]
)
clf.fit(X_train, y_train)
clf.classifiers
我有这个问题
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-11-5aa82f5c3cc2> in <module>()
----> 1 clf.classifiers
AttributeError: 'BinaryRelevance' object has no attribute 'classifiers'