avatarMars

Summary

The webpage provides a guide on using PyCaret and MLflow to set up a machine learning lab, demonstrating how to install necessary libraries, preprocess data, select and optimize models, and monitor experiments, all within a Jupyter Notebook environment.

Abstract

The article titled "Act like a Machine Learning Pro in Simple Way (PyCaret + mlflow)" offers a comprehensive tutorial for individuals aiming to establish their own machine learning laboratory with ease. It emphasizes the use of PyCaret for streamlining machine learning workflows, including data preprocessing, model selection, optimization, and deployment. Additionally, it introduces MLflow for experiment tracking and model monitoring, showcasing how to log and visualize machine learning experiment metrics. The tutorial is accompanied by code examples and screenshots to guide readers through the process, ensuring that even those without extensive machine learning knowledge can perform complex tasks and impress their bosses with professional ML capabilities.

Opinions

  • The author suggests that machine learning model training and monitoring (MLOps) are essential components of modern data science projects.
  • PyCaret is recommended as a powerful tool for simplifying the complex procedures involved in machine learning, such as data handling and model optimization.
  • MLflow is presented as a comprehensive library for monitoring machine learning model performance, including metrics like accuracy and feature importance.
  • The article implies that setting up a machine learning lab does not require heavy configuration when leveraging cloud services like Google Colab, as mentioned in a linked article by the same author.
  • The author expresses enthusiasm about the practicality of the provided code examples, which are designed to be run in Jupyter Notebooks.
  • By following the guide, the reader is promised to gain the ability to act as a machine learning professional, hinting at the potential for career advancement or recognition in the field.
  • The author encourages reader interaction by inviting questions and ideas via LinkedIn or email, indicating a willingness to engage with the community and provide further assistance.
  • A cost-effective AI service, ZAI.chat, is recommended as an alternative to ChatGPT Plus (GPT-4), suggesting a preference for more affordable tools that offer similar performance.

Act like a Machine Learning Pro in Simple Way (PyCaret + mlflow)

Build your own ML lab and become a ML Professional to your boss in a simple way.

Photo by Obi Onyeador on Unsplash

Machine learning (ML) has been well known for a while, since a massive amount of companies want to merge their business with AI or Data Science related. Along with the data project, analysis, the funniest part would be the machine learning model.

This article introduces a concept to you of Machine Learning Training (ML) & Monitoring (MLOps). Also a practical code for you to Build your own Machine Learning Lab. Like a scientist.

If you want to do it in an Light Way, without configuring your computer, you can reference my another article — Easily Build A Machine Learning Lab in Cloud.

MLFlow UI

**In this article, code example is running with Jupyter Notebook**

Pre-Setup

1. Install necessary libraries:

2. Retrive sample data:

You can use any dataset, alternatively, you can also use the following code to quickly retrieve sample data:

PyCaret

A powerful machine learning tool to help you handle the complicated procedures: (reference here)

  • Data Preprocessing & Handling
  • ML Model Selection
  • ML Model Optimization
  • Model Deployment

Setup an ML experiment

Model Selection & Optimisation

After running the above block, you should be expected to see the following result in Jupyter Notebook, which is the trained model performance summary after a complicated ML procedure.

Model Summary from Jupyter Notebook

MLFlow + PyCaret:

MLFlow is a comprehensive library to help you monitor the ML model information: (reference here)

  • Performance (Accuracy, ROC)
  • Feature Importance
  • Other Details Result

Preview

Setup an ML experiment with Logging

Similar to the code above, but with more statements in the setup.

Activate mlflow

After the model is optimized, we can just simply type the follow command to activate the mlflow

After running the command, you should be able to go to the url with default: http://127.0.0.1:5000 or http://localhost:5000

Then you will go to your own Machine Learning Laboratory!

MLFlow UI

Conclusion

BAM!!! Your ML laboratory is constructed. Next step I will also share other information in other articles with talking the details of PyCaret, mlflow and how do we make a end-to-end process.

If you have some ideas or questions, you are welcome to contact me via LinkedIn or email: [email protected], then say hello!

Machine Learning
Artificial Intelligence
Data Science
Data Visualization
Productivity
Recommended from ReadMedium