01 - Introduction to Machine Learning
01 - Introduction to Machine Learning
01 - Introduction to
Machine Learning
Mohd Razif Shamsuddin
0193371231
ISP560
01- Introduction to Machine
Learning
Mohd Razif Shamsuddin :: Faculty of Computer Science & Mathematics
Introduction to Machine
Learning
What is Machine Learning?
1.1 Core Definition:
• Machine Learning (ML) is a branch of Artificial
Intelligence (AI) focused on building systems that can
automatically learn and improve from experience
without being explicitly programmed.
• It involves algorithms that process large amounts of
data to find patterns, make decisions, and adapt to new
inputs.
Exercise : Do your own search
on ML definitions
• Use Chatgpt, google, Wikipedia.
• Share your findings.
• What are the similarity of these definitions.
• What are the repetitive keywords.
Introduction to Machine
Learning
1.2 Alternative Definitions:
• Definition 1 (Tom M. Mitchell, 1997):
"A computer program is said to learn from experience E with respect to some class of tasks T and
performance measure P, if its performance at tasks in T, as measured by P, improves with experience E."
Explanation: ML allows systems to improve performance on tasks as they gain more experience (data),
measured by a specific metric.
• Definition 3 (Wikipedia):
"Machine learning is the study of computer algorithms that improve automatically through experience and
by the use of data."
Explanation: This definition highlights the autonomy of ML algorithms in evolving based on their exposure
to data.
Introduction to Machine
Learning
1.3 Key Components of Machine Learning:
• Data: The fuel for machine learning models, consisting of
historical records, images, or any form of information the
algorithm can process.
• Algorithms: Mathematical models designed to process data,
recognize patterns, and make predictions.
• Experience (Training): The process of feeding data to
algorithms to allow them to learn patterns and adjust their
predictions based on feedback.
• Learning: The algorithm's ability to improve its performance
over time as it is exposed to more data.
Introduction to Machine
Learning
1.4 How Machine Learning Generally Works:
• Step 1: Data Collection – Gather historical or real-time data for the task.
• Step 2: Data Preprocessing – Clean and prepare the data to ensure the
model can use it effectively.
• Step 3: Model Selection – Choose the right algorithm (e.g., decision
trees, neural networks).
• Step 4: Training – Feed the data into the model to teach it the patterns
and relationships.
• Step 5: Testing – Evaluate how well the model performs on new, unseen
data.
• Step 6: Deployment – Use the trained model to make predictions or
automate tasks in real-world applications.
Introduction to Machine
Learning
1.5 Real-World Applications of Machine Learning:
• Healthcare: Predicting patient outcomes, drug
discovery, diagnosing diseases.
• Finance: Fraud detection, algorithmic trading, risk
assessment.
• Retail: Personalized recommendations, dynamic
pricing, demand forecasting.
• Technology: Speech recognition (e.g., Siri, Google
Assistant), self-driving cars, facial recognition systems.
Introduction to Machine
Learning
1.6 Importance of Machine Learning:
• Efficiency: Automates complex and repetitive tasks.
• Scalability: Can handle large datasets and make
accurate predictions without human intervention.
• Adaptability: Continuously improves as more data
becomes available.
• Decision-making: Helps businesses and systems make
data-driven decisions that improve performance and
outcomes.
02 - Types of Machine Learning
Mohd Razif Shamsuddin :: Faculty of Computer Science & Mathematics
Types of Machine Learning
2.1 Supervised Learning
• Definition: Supervised learning involves training a model on
a labeled dataset, where the input data is paired with the
correct output. The model learns to map inputs to the
correct outputs by minimizing the error between its
predictions and the actual labels.
• How it Works:
• Training: The model is fed with input-output pairs (features and
labels). It learns a function that maps inputs to outputs by
adjusting its parameters to minimize prediction errors.
• Testing: After training, the model is tested on new data (input
features) to predict outputs.
Types of Machine Learning
2.1 Supervised Learning
Example:
Image Classification: A dataset of images (input) is labeled with the
objects in the images (output). The model learns to classify new, unseen
images based on the patterns it has learned.
Spam Detection: Models are trained on labeled emails (spam or not
spam) and can automatically filter emails.
Predictive Maintenance: In industrial settings, data on equipment
performance (e.g., temperature, vibration) is used to predict equipment
failure.
Medical Diagnosis: Given patient data (input features like symptoms,
test results), the model predicts the presence or absence of a disease.
Types of Machine Learning
2.2 Unsupervised Learning
• Definition: Unsupervised learning works with data that
is not labeled. The model explores the structure of the
data, identifying patterns, groups, or associations within
the dataset without predefined labels.
• How it Works:
• Clustering: The model groups similar data points together
based on certain features.
• Dimensionality Reduction: The model reduces the number
of variables in the data while retaining important information,
helping to visualize or speed up data processing.
Types of Machine Learning
2.2 Unsupervised Learning
Example:
Customer Segmentation: A retail company uses purchase data to
group customers into segments based on behavior, preferences, and
purchasing habits without knowing the labels upfront.
Market Segmentation: Grouping customers into distinct segments for
targeted marketing.
Anomaly Detection: Identifying abnormal patterns in network traffic,
financial transactions, or sensor data to detect fraud or system failures.
Recommender Systems: Clustering users based on their viewing habits
to recommend personalized content on platforms like Netflix or YouTube.
Types of Machine Learning
2.3 Reinforcement Learning
• Definition: Reinforcement learning involves an agent learning to
make decisions by interacting with an environment. The agent
takes actions and receives feedback in the form of rewards or
penalties, learning from this feedback over time.
• How it Works:
• Agent: The decision-making entity.
• Environment: The context or system with which the agent interacts.
• Reward: Feedback given to the agent to reinforce good decisions or
penalize bad decisions.
• Goal: Maximize cumulative rewards over time.
Types of Machine Learning
2.3 Reinforcement Learning
Example:
Game AI: An AI agent learns to play chess by playing games and receiving
feedback (win, lose, or draw) after each game. It improves its strategy by
maximizing its chances of winning.
Autonomous Vehicles: A self-driving car learns to navigate through traffic by
taking actions (steering, accelerating) and receiving rewards based on how well
it avoids obstacles or follows traffic rules.
Robotics: Robots learn to perform tasks like assembling parts or walking by
interacting with their environment and adjusting their actions based on
feedback.
Personalized Marketing: E-commerce platforms use reinforcement learning
to optimize product recommendations by learning which items result in
purchases (reward) or customer disinterest (penalty).
Exercise : Give your own
example of ML applications