clf = GridSearchCV(estimator=BernoulliRBM(),param_grid=parameters,verbose=3,n_jobs=-1,refit=True)我收到以下错误-
TypeError: If no scoring is specified, the estimator passed should have a 'score' method. The estimator BernoulliRBM() does not.BernoulliRBM确实有一个score_samples(X)方法,但是我如何将它传递给gridsearchcv的评分参数呢?根据https://scikit-learn.org/stable/modules/model_evaluation.html#scoring-parameter,我可以通过一般的评分指标,如F1分数等。但是我该如何传递这个方法呢?
发布于 2021-04-16 21:39:43
https://stackoverflow.com/questions/67123581
复制相似问题