eli5不支持投票分类器

时间:2018-06-28 08:07:45

标签: python debugging machine-learning scikit-learn data-visualization

我正在尝试调试scikit学习模型的权重:

clf1 = GradientBoostingClassifier()
clf2 = linear_model.LogisticRegression(C=1e5, class_weight='balanced', verbose=True)
clf3 = RandomForestClassifier(class_weight='balanced')

clf = VotingClassifier(estimators=[
        ('lr', clf2), ('gb', clf1), ('rf', clf3)
     ], voting='soft')
model = OneVsRestClassifier(clf)    
model.fit(X_train_vectorized, y_train)
eli5.show_prediction(model, texts[0], vec=vectorizer, target_names=labels)

将模型输入eli5时,出现以下错误:

  

错误:估算器OneVsRestClassifier(estimator = VotingClassifier(estimators = [('lr',LogisticRegression(C = 100000.0,class_weight ='balanced',dual = False,fit_intercept = True,intercept_scaling = 1,max_iter = 100,multi_class = 'ovr',n_jobs = 1,惩罚='l2',random_state = None,求解器='liblinear',tol = 0.0001,详细... bose = 0,warm_start = False))],flatten_transform = None,n_jobs = 1 ,投票=“软”,权重=无),n_jobs = 1)

eli5是否仍不支持投票分类器?有人可以帮忙吗。

0 个答案:

没有答案