0

For the model below, how do output/recreate the validation set so I can save for future reference?

from sklearn.experimental import enable_hist_gradient_boosting
from sklearn.ensemble import HistGradientBoostingClassifier

model= HistGradientBoostingClassifier(max_iter= 500,
                                n_iter_no_change= 10,
                                verbose= 1,
                                scoring= 'roc_auc',
                                validation_fraction= 0.2,
                                early_stopping= True,
                                tol= 0,
                                learning_rate= 0.11,
                                max_depth= 5,
                                random_state= 123)

model.fit(X_train, Y_train)
Kurtz
  • 1

1 Answers1

0

I seem to found the solution here in this post (https://machinelearningmastery.com/save-load-machine-learning-models-python-scikit-learn/). Using joblib.dump(model,'model.sav') works for me.

Xiaonan
  • 1
  • 1
  • Please, avoid the use of links as the only resource in your answer. Keep the link for reference, but bring the important parts to your post. This approach avoids the problem of dead links in the future. ;-) – James Dec 16 '21 at 09:56