http://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html에서 예제를 재현하려고하지만 RandomForestClassifer를 사용하고 있습니다.OnevsrestClassifier 및 임의의 포리스트
나는
# 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.
해결 방법이 있습니까
을 얻을 시도# 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)
코드의이 부분을 변환하는 방법을 볼 수없는 이유는 무엇입니까?
왜 downvote -
그러니처럼 라인을 교체? – eleanora