小编Rac*_*lle的帖子

Scikit-learn TypeError:如果未指定评分,则传递的估算器应具有“评分”方法

我使用 scikit-learn 在 python 中创建了一个自定义模型,我想使用交叉验证。

模型的类定义如下:

class MultiLabelEnsemble:
''' MultiLabelEnsemble(predictorInstance, balance=False)
    Like OneVsRestClassifier: Wrapping class to train multiple models when 
    several objectives are given as target values. Its predictor may be an ensemble.
    This class can be used to create a one-vs-rest classifier from multiple 0/1 labels
    to treat a multi-label problem or to create a one-vs-rest classifier from
    a categorical target variable.
    Arguments:
        predictorInstance -- A predictor instance is passed as argument (be careful, you must instantiate
    the predictor …
Run Code Online (Sandbox Code Playgroud)

python typeerror python-2.7 scikit-learn cross-validation

2
推荐指数
1
解决办法
2万
查看次数