我正在尝试绘制 CatBoostClassifier 的学习曲线。当我将 CatBoostClassifier 从 Yellowbrick 拟合到 LearningCurve 时,就会发生错误。我认为这应该可行,因为 CatBoost 与 sklearn 兼容,而黄砖是 sklearn 扩展。
代码片段:
kf = RepeatedStratifiedKFold(n_splits=10, n_repeats=3, random_state=0)
sizes = np.linspace(0.2, 1.0, 10)
estimator = CatBoostClassifier(
iterations=42, learning_rate=0.3, max_depth=10)
visualizer = LearningCurve(
estimator, cv=kf, scoring='accuracy', train_sizes=sizes, n_jobs=-1
)
visualizer.fit(X, y)
visualizer.show()
错误:
... Yellowbrick.exceptions.YellowbrickTypeError:无法检测到非估计器的模型名称:''
有什么建议么?