Displaying or saving training plot when fitting Catboost model in Jupyterlab

Viewed 26

When fitting a Catboost model like this in Jupyterlab inside venv:

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)

I expect to see the train/test loss plot by Catboost, but it prints out "Error displaying widget: model not found" and no plot. I have ipywidgets and jupyterlab_widgets installed, I also read that there has been some issues with newer versions of ipywidgets so I downgradet it to 7, no effect. I found there should also be an option plot_file, but when I try to use that I get TypeError: fit() got an unexpected keyword argument 'plot_file'. Is there any way to make either of these methods (or any else method) to work to make the plot show?

0 Answers
Related