Category

Machine Learning – Short Posts

Category

Machine Learning Model Lifecycle – What I Understand

Everything undergoing creation or use will have lifecycle.

In Machine learning, There are 2 terms Machine learning lifecycle and machine learning model lifecycle.

They might seem quite similar at first glance, but actually, the Machine Learning Model Lifecycle is just a subset of the broader Machine Learning lifecycle.

In short,

  • Machine learning lifecycle: tells about the whole process. – managing entire mobile factory.
  • Machine Learning Model lifecycle: tells only about the machine learning model- managing one Mobile.

At first, I thought that Model Creation -> Model Training -> Model Deployment, these are the steps, but there’s much more to it.

Steps in the Machine learning model lifecycle:

machine learning model lifecycle
1. Model designing
2. Model training
3. Model Evaluation
4. Model deployment
5. Model monitoring
6. Model maintenance or retraining.
7. Model retirement

1. Model Designing

This is the first phase in model building. Here, we decide what type of algorithm to use, what kind of input and output the model should handle, and where the model will be deployed for user access.

In this phase, we can say that the model structure is completed.

2. Machine training

After creating the model, we need to train it. We already selected an appropriate algorithm and use it to help the machine, learn from the data by identifying patterns.

The data can come from your own sources such as your proprietary records (medical records, bank transactions) or publicly available repositories like Kaggle. This data is then fed to the model, and the model learns from it.

3. Model Evaluation

We need to test the model using unseen data to evaluate its performance. This testing data should not have been used during the training process. Evaluating with new data helps us understand how well the model generalizes to real-world scenarios.

If we skip this step, there’s a high chance the model may fail in production.

4. Model Deployment

To make the model available to users, we need to deploy it—usually by hosting it somewhere. This could be on a server, cloud, or even on edge devices like IoT hardware or mobile phones.

However, large models often can’t be deployed on low-resource devices due to hardware limitations. We can expose the model through an API, allowing users or other systems to access it over the internet.

5. Model monitoring

Still, we need to monitor the model because the model cannot be 100% right in every prediction. Still, many models in production are making mistakes.

ChatGpt, Gemini also says they can make mistakes, right? That’s why this phase is very important. As new data comes in, the model may make wrong decisions.

6. Model retraining

New data or queries can come in during monitoring, after deployment, or from other sources. When this happens, we need to retrain the model to improve its prediction accuracy.

This phase is important for continuously improving the model’s performance.

7. Model retirement

This is the final phase of a machine learning model’s lifecycle. Just like human beings—when we get older, we retire from our job or business.

Similarly, when a model becomes outdated or the data it was trained on is no longer effective, it may fail to make accurate decisions or predictions in the current situation.

In such cases, we need to retire the model to avoid unnecessary resource utilization.

References: