November 2017
Intermediate to advanced
374 pages
10h 19m
English
Saving your custom estimator is the same as saving any scikit-learn estimator. Save the trained ridge classifier in the file rc_inst.save as follows:
import picklef = open('rc_inst.save','wb')pickle.dump(r_classifier, f, protocol = pickle.HIGHEST_PROTOCOL)f.close()
To retrieve the trained classifier and use it, do this:
import picklef = open('rc_inst.save','rb')r_classifier = pickle.load(f)f.close()
It is very simple to save a trained custom estimator in scikit-learn.
Read now
Unlock full access