【发布时间】:2017-08-16 06:59:20
【问题描述】:
我正在尝试基于 this article 的 CatBoost
在它的代码中,CatBoost 在model.fit() 中有plot,所以我想在我的 IPython 上尝试一下。
这是我的 CatBoost 代码:
from catboost import CatBoostRegressor
# indicate categorical features for CatBoost
categorical_features_indices = np.where(X.dtypes != np.float)[0]
model=CatBoostRegressor(iterations=50, depth=3, learning_rate=0.1,
loss_function='RMSE')
model.fit(X_train, y_train,
cat_features=categorical_features_indices,
use_best_model=True,
eval_set=(X_validation, y_validation), plot=True)
但是,它无法显示任何情节并一直给我错误:
我确实安装了 ipywidgets 和 ipython。 你知道如何处理这个问题吗?
【问题讨论】:
-
您将 ipython 作为笔记本还是 shell 运行?您是在虚拟环境中运行它吗?
-
我将它作为笔记本运行。虚拟环境和非虚拟环境都试过了,都报这个错
标签: python plot ipython catboost