1

I want to save the current iterative parameter values of the Gridsearchcv parameter grid. I am running gridsearchcv using xgboost as estimator on 65000 features. As a backup I would like to store the current parameter grid values of the gridsearch iteration. In case the gridsearch gets interrupted using these stored values I can restart the grid search from where it stopped.

The link below was a starter

How to save GridSearchCV object?

Please scroll to line number 660 in _search.py referenced in the above link.There you will find the following line code

out = parallel(delayed(_fit_and_score).....

Hence, _fit_and_score is the best place where parameter values for each iteration will be easily available. In this function I can use joblib to dump the parameters

The one solution I came across was to redirect stdout to a file.

I would like to know if there is a better way of saving the current iterative value of gridsearchcv

megjosh
  • 101
  • 1
  • 9

0 Answers0