A Full End-to-End Deployment of a Machine Learning Algorithm into a Live Production Environment
After the article was published I received feedback from readers who were interested in how to push production deployment further to explore how a machine learning algorithm could be fully deployed into a live production environment so that it could be "consumed" in a platform-agnostic way and that led to the idea for this article … The first step is to develop the machine learning algorithm that we want to deploy. In the real world this could involve many weeks or months of development time and lots of iteration across the steps of the data science pipeline but for this example I will develop a basic ML algorithm as the main purpose of this article is to find a way to deploy an algorithm for use by "consumers". At this point we can see that we have a machine learning algorithm trained to predict drug presriptions and that cross validation (i.e. We are going to deploy this model into a production environment and although it is a simple example we would not want to have to retrain our model in the live environment every time a user wanted to predict a drug presription, hence our next step is to preserve the state of our trained model using pickle ... Now whenever we want to use the trained model, we simply need to reload its state from the model.pkl And there we have it, a list of each categorical feature with the unique values that appear in the data and the corresponding numerical values as transformed by the LabelEncoder().
Nov-27-2021, 01:20:39 GMT