例をhttp://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.htmlに再現しようとしていますが、RandomForestClassiferを使用しています。私は、コードOnevsrestClassifierとランダムフォレスト
# Learn to predict each class against the other
classifier = OneVsRestClassifier(svm.SVC(kernel='linear', probability=True,
random_state=random_state))
y_score = classifier.fit(X_train, y_train).decision_function(X_test)
のこの部分を変換する方法を見ることができない
私は
# Learn to predict each class against the other
classifier = OneVsRestClassifier(RandomForestClassifier())
y_score = classifier.fit(X_train, y_train).decision_function(X_test)
を試してみましたが、私は
AttributeError: Base estimator doesn't have a decision_function attribute.
を取得し、回避策はありますか?
なぜdownvote -
だからあなたのような行を置き換えますか? – eleanora