The 7 Fundamental Steps of Machine Learning: A Beginner’s Guide Part-2

Ramy hakam
4 min readMay 5, 2023

--

A simplified explanation of the essential steps to implementing a machine learning system with a Simple Example Step-by-Step Guide.

Machine Learning Steps

Introduction:

Machine Learning is an increasingly popular field of study, and while the topic may seem complicated, anyone can grasp the fundamentals by understanding the seven basic steps involved in implementing a machine learning system. This article will guide you through these steps using an example project aimed at creating a system to identify happiness and sadness in a person’s photo.

Happy and Sad Faces

The 7 Fundamental Steps of Machine Learning:

Gathering Data

The first step is to collect data that will help distinguish between different outcomes. In this example, we need to identify factors that separate happy and sad facial expressions. Some of these factors could include mouth shape, eye size, and tooth appearance. Create a table to record the values for each factor and the result (happy or sad).

Data Preparation

Next, randomize the data to ensure that the order of the photos doesn’t influence the final decision. This step is essential to maintain impartiality and improve the overall quality of the model.

Visualize Data:
Visualize the data to detect patterns, relationships, and factors that could affect the model. This step allows you to assess the quality of the data and identify any potential issues.

Divide Data:
Split the data into two parts: one for training (70–80%) and one for evaluation (20–30%). This separation ensures that the model is not evaluated based on the same data it was trained on, providing a more accurate assessment of its performance.

Choose a Model

Choose a model that best suits your project’s requirements. In this example, a simple linear equation (Y=mX+c) can be used as the model, with X as the input (photo), Y as the output (happy or sad), and m and c as variable values.

Y — mx + C

Training

Train the model by adjusting the values of m and b using the training data. Iterate through the process until the model can accurately represent the relationship between the input and output data.

Machine Learning Training

Evaluation

Evaluate the model using the remaining data (20–30%) to test its performance. This step helps determine if the model can accurately predict happiness or sadness based on new data.

Hyperparameter Tuning

Fine-tune the model by adjusting its parameters to achieve better accuracy. Monitor the learning rate, or the shift between each step, to ensure the best performance of the model.

Hyperparameter Tuning

Prediction:

Once the model is trained, evaluated, and fine-tuned, it is ready for use. In this example, you can input the values for factors like mouth area, eye size, and tooth appearance to determine if a person in the photo is happy or sad.

Prediction

Conclusion:

Machine learning might be a complex field, but understanding the seven fundamental steps can help anyone grasp the basics. Services like Amazon Web Services, Google Cloud Platform, IBM, and Microsoft Azure offer machine learning services to simplify the process even further. While this article provides a simplified explanation, it is essential to recognize that machine learning is a deep and intricate subject that requires further study for a complete understanding.

--

--

Ramy hakam
Ramy hakam

Written by Ramy hakam

Experienced PHP developer passionate about clean code and performance. Committed to staying ahead and collaborating for success. Let's bring your ideas to life!

No responses yet