Customers often ask me about how to operationalize the machine learning models they have created. It’s common that they have the model, but are struggling with how to apply it to new or existing business data sets. Another line of questioning is about “How do we move the machine learning model forward into production?”
I wrote this article to provide an overview of the basic steps of operationalizing machine learning models.
Creating a logistic regression model that can be operationalized
Believe it or not, you simply create the model and save it to a file. This is typically done in a script that is separate from the script that will be used in production. pickle and joblib are common ways to save random forest, logistic regression, or other classical machine learning models. In this post, I will show the process for pickle. joblib is very similar. For neural networks created with Keras, it is recommended to use keras.models. Once the file is created, you later load it and use it to score your data.
Create the model file and save it
Import the model from the file and use it on new data
Example: Logistic Regression
That’s all there is to it! For more in-depth instructions on how to operationalize models using joblib from scikit-learn or saving and loading models in Keras, check out the following helpful websites:
Do you work with clients who need help with operationalizing machine learning models? I’d love to hear what questions you commonly come across. Please share by adding a comment below.
If you have questions and want to connect, you can message me on LinkedIn, Twitter:
Follow me on Twitter @pacejohn and LinkedIn https://www.linkedin.com/in/john-pace-phd-20b87070/.
#ai #machinelearning #MLDL #artificialintelligence #operationalize #production #python #keras #scikit-learn