While the data scientists of the machine learning model in jupyter lab, google colab, etc., the machine learning engineers created the model in production.
Deploying an ML model simply means integrating the model into an existing production environment that can accept input and receive output that can be used to make practical business decisions.
To clarify the deployment process, I created this post, which is divided into four chapters. In Chapter 1 we will go over the process of building models, in Chapter 2 we will adapt the code for production input. Chapters 3 and 4 are covered in the second part of this series.
Chapter 1: Building the Model Model
The base model in this context refers to an ML model that has the minimum possible number of features, but with good scores. When creating an ML model for deployment purposes, you should always keep your end users in mind. A model with thousands of features to achieve 90 +% accuracy in estimation may not be good enough for deployment for several reasons:
- Portability: The ability to port software from one machine or system to another. A portable model reduces the response time of your code and the amount of code you need to rewrite as your goals change is minimal.
- Scalability: The ability of a program to scale. A model is considered scalable if it does not need to be redesigned for efficient performance.
- Operationalization: refers to the deployment of a message model to predict the target value of a classification / regression problem.
- Test: refers to the validation of outputs for processes and inputs. A robust model will be unnecessarily difficult to test.
As a first step, we are using pandas to import our test and training data.
How AI is different from machine learning
Artificial intelligence and machine learning technologies are confused by many users. Moreover, companies themselves often talk about the use of AI for marketing purposes, although they use ML, or even declare that they use both solutions.
To understand the difference, consider the following diagram:
- The programmer develops a program that is capable of learning. At the initial stage, the algorithm is not able to do anything.
- The programmer chooses Machine learning techniques to improve the program.
- After completing the training, the program is considered AI.
That is, today machine learning is the only possible option for creating AI, since any modern technology is the result of computer training.
But the difference is that AI is not only machine learning solutions, but also different computing power, programs, data, etc. That is, the technology includes many components.
Let’s look at the difference in technology with a simple example. Let’s say you want to classify images according to two categories (cats and dogs). When using machine learning, you will not only need to represent these pictures, but also structured data. That is, to label the images of dogs and cats so that the algorithm can determine the characteristics of each type of animal. Such information will be sufficient for training it, and then the algorithm will continue to work based on the initial information.
Artificial intelligence will use a different approach to solve this problem. He does not need to label the images, since he will independently determine the specific features of each image. After processing the data, the AI will find the corresponding identifiers in the images and will be able to classify them.