7

I have been playing around with a lot of different machine learning models (clustering, neural nets, etc...), but I am sort of stuck on understanding what happens after you finish building the model in Python or Matlab.

For example, let's say that I trained a basic neural network model for a binary classification problem. How does one deploy that to colleagues, for example, so that they can load in the dataset to spit out a prediction? I have trained a model, but what happens to that model, now? How do I "save" that model that I just trained in Python?

I see a lot of tutorials on how to pre-process data, train the model, spit out the statistics and predictions; but, what comes next?

Obviously Facebook, Google, and anyone else heavily involved in machine learning / AI applications are creating a framework to use their models. But, is there software that allows you to pull in data and then apply it to your Python code? Is this what Weka, TensorFlow, and these other packages do?

Gary
  • 529
  • 2
  • 5
  • 12

2 Answers2

3

what comes after training a model is persisting (in layman terms, saving) a model, if you want to save the parameters for later deployment.

All companies that do serious machine learning spend many hours (sometimes even days or weeks) training the models. Obviously, when you need rapid predictions in a deployment mode, you use a pre-trained model to generate said prediction.

In python, for example, there are a number of way to persist models. The most common libraries used are pickle and cpickle (i/o much faster I believe as the core is in C).

Here is a link to model persistence in sklearn:

http://scikit-learn.org/stable/modules/model_persistence.html

0

Here is an example of how to Integrate a Machine Learning Model into a Web app https://www.youtube.com/watch?v=mu-R0dQ3-Qo and the code can be found here https://github.com/shivasj/Integrating-a-Machine-Learning-Model-into-a-Web-app

shivas
  • 109
  • 2