Photo by Gabriel Vasiliu.
After basic definitions, the first thing you should learn when starting to build Artificial Intelligence (AI) is to understand the concept of Machine Learning (ML). Machine Learning is a subset of AI that focuses on enabling computers to learn from data and make decisions without being rigidly programmed.
Among several other examples, a very easy example you can build to learn how Machine Learning works is a program that predicts whether a fruit is an apple or an orange based on its weight and size. This example uses a simple form of Machine Learning called Supervised Learning, where the computer learns from labeled data (in this case, the weight and size of fruits labeled as either apples or oranges) to make predictions on new, unlabeled data.
Let’s take that again; You have some data, it comprises information (weight and size) about a bunch of fruits (apples and oranges). You would like to apply a formula (model) to help you predict if a new fruit is an apple or an orange.
Here’s how you can build such AI in simple steps:
- Collect Data: Gather data on apples and oranges, recording their weight and size. Make sure to label each fruit as either an apple or an orange. To save you time, get the sample labelled data collection you need to follow along smoothly.
- Prepare Data: Organize your data into a format that the computer can understand. For example, create a table with columns for weight, size, and fruit type (apple or orange).
- Choose a Model: Select a Machine Learning model to use for your prediction task. For this example, you can start with a basic model like Logistic Regression, which is easy to understand and implement.
If you’re a beginner, that must sound overwhelming. I too was initially daunted by step 3 so don’t worry, I’m now here to guide. Knowing which model to select is initially not obvious. So a good idea to get you moving in these early beginnings is to start with a basic model such as Linear Regression or Logistic Regression. These models are commonly used for beginner projects and serve as a good starting point to grasp fundamental concepts. Stay focused and you’ll soon forget that this was once a challenge for you. - Train the Model: Feed your labeled data into the chosen model to train it. The model will learn patterns from the data to distinguish between apples and oranges based on their weight and size.
- Make Predictions: Once the model is trained, you can use it to make predictions on new, unlabeled data. For example, if you have the weight and size of a fruit but don’t know if it’s an apple or an orange, you can input these features into the model, and it will predict the fruit type for you. To save you time, get the sample unlabelled data collection you need to follow along smoothly.
- Evaluate the Model: Assess how well your model performs by comparing its predictions to the actual fruit types. You can measure its accuracy, which tells you how often the model correctly predicts the fruit type.
By building this simple example, you’ll gain foundational understanding of how Machine Learning works and how it can be used to solve real-world problems, like distinguishing between different types of fruits based on their characteristics. Your next step is to Learn How To Use a Linear Regression Model in a notebook.


Leave a comment