1

Using PyCaret, when I apply a compare_models(), and that a catboost is found to be the best, I cannot print it, while I can do it for all the others. So I cannot use it to test predictions, for example.

Screeshot of the issue

I'm using PyCaret version 2.2.0 and Python version 3.8.5 64-bit. I'm on Mac (Big OS).

See What I've got with another model juste beside :

When it works

Lumber Jack
  • 602
  • 3
  • 9
  • what would you expect from print? print works but only says catboostmodel. This is because print just calls the `__repr__` function of a python class and this defaults to `module.submodule.class object at `. This is what you see – Paul Jan 28 '21 at 13:41
  • If I print(best_model) for other, the screen output is ExtraTreesClassifier(bootstrap=False, ccp_alpha=0.0, class_weight=None, criterion='gini', max_depth=None, max_features='auto', max_leaf_nodes=None, max_samples=None, min_impurity_decrease=0.0, min_impurity_split=None, min_samples_leaf=1, min_samples_split=2, min_weight_fraction_leaf=0.0, n_estimators=100, n_jobs=-1, oob_score=False, random_state=26, verbose=0, warm_start=False) – Lumber Jack Jan 28 '21 at 14:44
  • It means that I can use it, for example, best_model.predict(X). This is ok with any model except catboost – Lumber Jack Jan 28 '21 at 14:46
  • yes but this is just the implementation of catboost. In your screenshot the print works as intended by catboost. Print just does not print parameters – Paul Jan 28 '21 at 15:29
  • The other models come from the scikit-learn library and hence have another `__repr__` method. catboost is a module itself implemented in a completely different way – Paul Jan 28 '21 at 20:26
  • Ahhh! Okkkkay! Thanks for that. I thought it was refactored. So I just have to use it as I do outside pycaret. Thanks for the explanation. – Lumber Jack Jan 28 '21 at 20:45

0 Answers0