Machine Learning Model Saving Options

Any suggestions / recommendations for preserving and reusing trained machine learning models? I develop models in Python or R. Then these models should be used in the production process for scoring (where R is not available). For example, there may exist a logistic regression model prepared in R. Now new observations must be taken for this model. The scoring engine must be fast and scalable. I was thinking about the following

Any thoughts / suggestions on the right approach?

+4
source share
2 answers

Scikit-learn, pickle . , , .

, JSON . . , - Python, JSON .

+2

, pickle python, :

import pickle
s = pickle.dumps(clf)
clf2 = pickle.loads(s)

joblib, , numpy , scikit-learn.

from sklearn.externals import joblib
joblib.dump(clf, 'filename.pkl')
clf = joblib.load('filename.pkl') 

API- RESTful.

0

Source: https://habr.com/ru/post/1526735/


All Articles