Supervised learning is the most common type of machine learning.
In this approach, the model is
trained on a labeled dataset. In other words, the data is accompanied by a label that the model is
trying to predict. This could be anything from a category label to a real-valued number.
The model learns a mapping between the input (features) and the output (label) during the training
process. Once trained, the model can predict the output for new, unseen data.
1. Email Classification (Spam vs Non-Spam)
- Description: In this example, a model is trained to classify emails into two categories: spam or non-
spam.
- Data: The dataset contains emails with features such as the frequency of certain words, the
presence of links or images, etc. Each email is labeled as either "spam" or "non-spam."
- Explanation: The model learns from labeled examples (already classified emails). Once trained, it
can predict the category of a new email.
- Real-World Use: This type of model is used in email services like Gmail to automatically filter out
spam messages.
2. House Price Prediction
- Description: In this example, a model is trained to predict house prices based on features like size,
number of bedrooms, location, etc.
- Data: A dataset contains details of houses that have already been sold (features) and their prices
(labels).
- Explanation: The model uses labeled examples to learn how to map a house’s characteristics to its
price. After training, it can estimate the price of a house that someone wants to sell.
- Real-World Use: Platforms like Zillow use such models to provide price estimates for houses.
3. Image Recognition (Cats vs Dogs)
//aussi un exemple de classifier les tweets par exemples s’ils sont positifs ou négatifs
(i like it, it is annoying, the worst ever)
- Description: A model is trained to recognize whether an image contains a cat or a dog.
- Data: A dataset of labeled images where each image is labeled as "cat" or "dog." Each image is
associated with a label indicating which animal it represents.
- Explanation: The model learns to identify patterns in the images (like ear shapes or fur texture).
Once trained, it can classify images it has never seen before.
- Real-World Use: This type of model is used in applications like Google Photos to automatically
organize images by object or animal category.
These examples should clearly illustrate the concept of learning in your presentation.
Binary: example de tweets
Multi: example d’animaux
Unsupervised learning, on the other hand, involves training the model on an unlabeled dataset. The
model is left to find patterns and relationships in the data on its own.
This type of learning is often used for clustering and dimensionality reduction. Clustering involves
grouping similar data points together, while dimensionality reduction involves reducing the number
of random variables under consideration by obtaining a set of principal variables.
Example:
1. Customer Segmentation
- Description: In this example, a model is used to group customers into different segments based on
their purchasing behavior.
- Data: The dataset contains various attributes of customers, such as age, income, spending habits,
and product preferences, but no labels.
- Explanation: The model identifies patterns and clusters customers with similar behaviors into
segments. This helps businesses understand different customer groups and tailor marketing strategies
accordingly.
- Real-World Use: E-commerce platforms use customer segmentation to provide personalized
recommendations and promotions based on the behavior of different customer groups.
Reinforcement learning is a type of machine learning where an agent learns to make decisions by
interacting with its environment. The agent is rewarded or penalized (with points) for the actions it
takes, and its goal is to maximize the total reward.
Unlike supervised and unsupervised learning, reinforcement learning is particularly suited to
problems where the data is sequential, and the decision made at each step can affect future
outcomes.
Common examples of reinforcement learning include game playing, robotics, resource management,
and many more.
Example: Robot Navigation
o Description: A robot is trained to navigate through an environment to reach a target
location while avoiding obstacles.
o How It Works: The robot receives rewards for moving closer to the target and
penalties for hitting obstacles. Through exploration and trial-and-error, the robot
learns the optimal path to take.
Healthcare
Example: Personalized Treatment Plans
Description: A reinforcement learning model can suggest personalized treatment plans for patients
based on their medical history and responses to previous treatments.
How It Works: The model receives positive rewards for successful treatment outcomes (e.g.,
improved health markers) and negative rewards for ineffective treatments. This enables the model to
learn optimal treatment strategies for various patient profiles.
Step 1: Data Collection and Preparation
The first step in the machine learning process is data collection. Data is the lifeblood of machine
learning - the quality and quantity of your data can directly impact your model's performance. Data
can be collected from various sources such as databases, text files, images, audio files, or even
scraped from the web.
Once collected, the data needs to be prepared for machine learning. This process involves organizing
the data in a suitable format, such as a CSV file or a database, and ensuring that the data is relevant
to the problem you're trying to solve. It involves also cleaning the data (removing duplicates,
correcting errors), handling missing data (either by removing it or filling it in), and normalizing the
data (scaling the data to a standard format).
Preprocessing improves the quality of your data and ensures that your machine learning model can
interpret it correctly.
Step 2: Choosing the right model
Once the data is prepared, the next step is to choose a machine learning model. There are many
types of models to choose from, including linear regression, decision trees, and neural networks. The
choice of model depends on the nature of your data and the problem you're trying to solve.
Factors to consider when choosing a model include the size and type of your data, the complexity of
the problem, and the computational resources available.
Step 3: Training the model
After choosing a model, the next step is to train it using the prepared data. Training involves feeding
the data into the model and allowing it to adjust its internal parameters to better predict the output.
During training, it's important to avoid overfitting (where the model performs well on the training
data but poorly on new data) and underfitting (where the model performs poorly on both the training
data and new data) .
Step 4: Model Testing and Evaluation
after that it's important to evaluate its performance before deploying it. This involves testing the
model on new data it hasn't seen during training.
Common metrics for evaluating a model's performance include accuracy (for classification problems),
precision and recall (for binary classification problems), and mean squared error (for regression
problems).
1. **Data Collection and Preparation**: Gather and clean the data that will be used for training the
machine learning model. This step includes handling missing data, normalizing, or transforming
features.
2. **Model Selection**: Choose an appropriate machine learning algorithm based on the problem
type (e.g., classification, regression, clustering) and the nature of the data.
3. **Training the Model**: Use the collected data to train the model by feeding the data into the
algorithm, allowing it to learn patterns and relationships.
4. **Model Testing and Evaluation**: Evaluate the model's performance on unseen data (testing set)
to ensure it generalizes well.
Here's a more concise version for your slides:
**Step 1: Data Collection & Preparation**
Gather and clean data, handle missing values, and normalize it for modeling.
**Step 2: Choose the Model**
Select a model (e.g., linear regression, decision trees) based on the data and problem type.
**Step 3: Train the Model**
Train the model with data, fine-tuning to avoid overfitting or underfitting.
**Step 4: Test & Evaluate**
Test on new data and evaluate performance using relevant metrics (accuracy, precision, etc.).