I was modelling boosting classifier using catboost module in google colaboratory. I followed the official example:
from catboost import CatBoostClassifier, Pool
train_data = [[1, 3], [0, 4], [1, 7], [0, 3]]
train_labels = [1, 0, 1, 1]
model = CatBoostClassifier(learning_rate=0.03)
model.fit(train_data,
train_labels,
verbose=False,
plot=True)
But this does not show any plot in Google Colab notebook.
Here is my code for google colab:
import sys
ENV_COLAB = 'google.colab' in sys.modules
if ENV_COLAB:
!pip install catboost
!pip install ipywidgets
!jupyter nbextension enable --py widgetsnbextension
print('Environment: Google Colab')
from catboost import CatBoostClassifier, Pool
train_data = [[1, 3], [0, 4], [1, 7], [0, 3]]
train_labels = [1, 0, 1, 1]
model = CatBoostClassifier(learning_rate=0.03)
model.fit(train_data,
train_labels,
verbose=False,
plot=True)
Google colab just prints <catboost.core.CatBoostClassifier at 0x7fc7a846d898>
instead of showing the plot as shown in official webpage of catboost.