0% found this document useful (0 votes)
9 views38 pages

Lesson_2_Introduction_to_Machine_Learning

The document provides an overview of machine learning, its distinctions from artificial intelligence and deep learning, and its applications in real-world scenarios, particularly in e-commerce. It discusses various machine learning models, including supervised, unsupervised, semi-supervised, and reinforcement learning, along with examples and Python libraries used for implementation. The document emphasizes the importance of data quality and the role of machine learning in enhancing customer experiences through predictive analytics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views38 pages

Lesson_2_Introduction_to_Machine_Learning

The document provides an overview of machine learning, its distinctions from artificial intelligence and deep learning, and its applications in real-world scenarios, particularly in e-commerce. It discusses various machine learning models, including supervised, unsupervised, semi-supervised, and reinforcement learning, along with examples and Python libraries used for implementation. The document emphasizes the importance of data quality and the role of machine learning in enhancing customer experiences through predictive analytics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Machine Learning

Introduction to Machine Learning


Learning Objectives

By the end of this lesson, you will be able to:

Analyze the distinctions and applications of machine learning, deep


learning, and artificial intelligence through real-world examples for
various technical applications

Differentiate among various machine learning models and explore


how each model learns from data to predict outcomes

Explore Python libraries for effective data manipulation,


visualization, and implementation of machine learning algorithms
Business Scenario

ABC Inc., an e-commerce company, is struggling with a surge in fraudulent


transactions on its website. The manual review process for transactions has
caused delays in order processing and led to a negative customer experience.

To address this, ABC Inc. will use machine learning algorithms to detect real-time
fraudulent transactions. These algorithms will be integrated into ABC Inc.'s
existing transaction processing system to flag suspicious transactions and
prevent fraud.

Additionally, the company will use machine learning algorithms to predict


customer behavior based on past purchase history, thereby improving the
recommendation engine’s performance. With machine learning, ABC Inc. can
provide a more personalized customer experience, streamline order processing,
and increase sales.
What Is Machine Learning?
Machine Learning

It is a subset of artificial intelligence (AI) that assists systems to learn and improve automatically from
experience without being explicitly programmed.

Arthur Samuel coined the term machine


learning (ML) in 1959.

It enables programs to learn automatically,


making computers more intelligent without
human intervention.
Traditional Approach Vs Machine Learning Approach

Traditional approach Machine learning approach

Uses predefined rules and algorithms explicitly Learns from data to make predictions or take
programmed by human developers actions without being explicitly programmed

Relies on explicitly defined logic and rules to Uses statistical techniques and optimization
perform tasks algorithms to learn patterns and make decisions

Requires manual feature engineering, where


Automatically learns features from raw data,
relevant features must be identified and extracted
reducing the need for manual feature engineering
by human experts
Handles complex and unstructured data, such as
Faces challenges in handling complex and
images, text, and audio, without requiring
unstructured data without significant preprocessing
extensive preprocessing
Performance depends on the accuracy and
Performance improves with more data and learning
completeness of the predefined rules and
iterations, enhancing accuracy and generalization
algorithms
Difference Between ML, DL, and AI

Machine learning (ML), deep learning (DL), and artificial intelligence (AI) are often used interchangeably.

Artificial intelligence • It encompasses the simulation of human intelligence


in machines.
• Example: Self-driving cars
Machine learning

• It is a subset of AI, which focuses on algorithms that


enable computers to learn from data.
• Example: Amazon Alexa
Deep learning

• It is a subset of ML that uses neural networks with


multiple layers for complex pattern recognition, such
as recognizing patterns in images, speech, and text.
• Example: Handwriting recognition
Machine Learning: Example

In a chess game between a computer and a person, the computer uses AI to analyze the game, predict
moves, and decide its actions.

The AI uses machine learning to figure out if the opponent is a


beginner, intermediate, or advanced player.

The AI decides its next move against the opponent using a complex
neural network that learns various features and patterns from the
data.
Applications of Machine Learning

There are many applications for machine learning, including the following:
Spam
filtering

Sentiment Social media


analysis analysis

Online recommendation Customer service


systems chatbots
Machine Learning Algorithms

These processes allow computers to learn patterns from data and make predictions on their own.

Machine learning algorithms help applications to:

Predict Classify the Improve the


outcomes target feature performance
Data and Machine Learning Algorithms

The quality and quantity of the provided data evaluate the algorithm's performance.

High-quality and quantity of data is


crucial for machine learning as it ensure
better predictions and insights.

Source: https://academic.oup.com/nsr/article/10/7/nwad125/7147579
Types of Machine Learning
Types of Machine Learning

ML can be divided into four main categories; each characterized by its capacity to predict conditions or
identify patterns to produce outcomes.
Supervised Learning

A supervised learning method uses labeled data to predict outcomes guided by specific
input-output pairs.

Here, both inputs and outputs are known.


Supervised Learning Algorithms

Some commonly known supervised learning algorithms are:

Linear regression Decision trees

Logistic regression Support vector machines


Supervised Learning: Examples

Some examples of supervised learning are:

Predicting temperature rise Predicting crop yield based


based on yearly on seasonal crop
temperature trends quality changes

Sorting waste based on known


waste items and their
corresponding waste types

In spam filtering, computers learn from labeled emails to decide if new


emails are spam or not.
Unsupervised Learning

It allows models to identify patterns and structures in unlabeled data without explicit guidance.
Some examples are:

Image segmentation for object detection

Identification of user groups based on commonalities

Identification of anomalies over geographical


landscapes based on the data patterns

The unlabeled dataset is provided to an unsupervised learning algorithm to discover hidden patterns
and recognize their relationship.
Unsupervised Learning: Example

It automatically groups images into distinct categories based on similarities, such as age group or
gender, without any prior labels.
Semi-Supervised Learning

It uses a combination of a small amount of labeled data and a large amount of unlabeled
data for training.

Like supervised learning, it aims to learn a function that can accurately


predict the output variable from the input variables.

It uses unlabeled input to assist the learning process by collecting more


information or improving model generalization.

Hence, it falls between supervised and unsupervised learning.


Semi-Supervised Learning: Example

This dataset contains both labeled and unlabeled data. Hence, semi-supervised learning is applied.
Semi-Supervised Learning: Example

Google Photos is a popular example of semi-supervised learning.

Whenever a picture is taken, it gets stored in


the Google Cloud platform or a database.

In various instances, uploaders label images. Despite Google's lack of knowledge regarding image names,
its algorithm can identify them by analyzing visual features like shapes and colors.
Reinforcement Learning

Reinforcement learning is a type of machine learning where algorithms learn from the environment by
performing actions and receiving either rewards or penalties as feedback.

If the program finds the correct solution, the interpreter rewards the algorithm.

If the outcome is incorrect, the algorithm is penalized for incorrect predictions. It


must reiterate until it finds a better result.
Reinforcement Learning

It involves an agent interacting with an environment, learning from rewards and states, to choose the
best actions and improve performance over time.
Reinforcement Learning: Example

This type of learning is best seen in YouTube recommendations, where a user searches for a particular
song, and the program shows the list of available songs.

When the user selects a specific song, the system trains itself to remember and deliver a similar result
for future searches based on user interactions, such as likes, views and shares.
Reinforcement Learning: Examples

Examples of reinforcement learning include:

Games where players can


Self-driving cars
play with bots

Search recommendation
Autocorrect tools
engines
Introduction to Python Packages for Machine Learning
Python Libraries Used in Machine Learning

Some Python libraries used in machine learning include:

NumPy is a powerful library for numerical


computing in Python.

Matplotlib performs data visualization and


graphical plotting.

Pandas is a versatile data manipulation


library in Python, offering data structures like
DataFrames.
Python Libraries Used in Machine Learning

Some Python libraries used in machine learning are:

SciPy solves mathematical equations and


processes algorithms.

Scikit-learn offers efficient versions of


common algorithms, facilitating the
development of machine learning models.
Key Takeaways

Machine learning refers to a machine's ability to learn from data


and replicate human behavior.

AI includes machine learning and deep learning, each with unique


capabilities for simulating intelligence.

There are four main types of machine learning: supervised learning,


unsupervised learning, semi-supervised learning, and
reinforcement learning.

Python packages are folders with modules that organize code for
easy reuse and maintenance, improving development efficiency.
Knowledge Check
Knowledge
Check
Which of the following best describes machine learning?
1

A. A subset of artificial intelligence (AI) that assists systems to learn and improve automatically
from experience without being explicitly programmed.

B. A method of programming where developers manually define a set of rules and instructions.

C. The process of creating a set of fixed logic that a program will follow.

D. A technique used only for image and speech recognition tasks.


Knowledge
Check
Which of the following best describes machine learning?
1

A. A subset of artificial intelligence (AI) that assists systems to learn and improve automatically
from experience without being explicitly programmed.

B. A method of programming where developers manually define a set of rules and instructions.

C. The process of creating a set of fixed logic that a program will follow.

D. A technique used only for image and speech recognition tasks.

The correct answer is A

Machine learning is a subset of AI that enables systems to learn and improve automatically from
experience without explicit programming.
Knowledge
Check Which example illustrates the use of machine learning to enhance customer
2 experience in an e-commerce company?

A. ABC Inc. using predefined rules for transaction processing.

B. ABC Inc. using manual review to detect fraudulent transactions.

C. ABC Inc. using machine learning algorithms to detect real-time fraudulent transactions and
predict customer behavior.

D. ABC Inc. using machine learning solely for inventory management.


Knowledge
Check Which example illustrates the use of machine learning to enhance customer
2 experience in an e-commerce company?

A. ABC Inc. using predefined rules for transaction processing.

B. ABC Inc. using manual review to detect fraudulent transactions.

C. ABC Inc. using machine learning algorithms to detect real-time fraudulent transactions and
predict customer behavior.

D. ABC Inc. using machine learning solely for inventory management.

The correct answer is C

ABC Inc. uses machine learning to detect fraudulent transactions in real-time and predict customer
behavior to enhance the recommendation engine and customer experience.
Knowledge
Check What distinguishes deep learning (DL) from machine learning (ML) and artificial
3 intelligence (AI)?

A. Deep Learning is a subset of AI focused on learning from data.

B. Deep Learning uses neural networks with multiple layers for complex pattern recognition.

C. Deep Learning encompasses the simulation of human intelligence in machines.

D. Deep Learning involves manually defined rules and instructions


Knowledge
Check What distinguishes deep learning (DL) from machine learning (ML) and artificial
3 intelligence (AI)?

A. Deep Learning is a subset of AI focused on learning from data.

B. Deep Learning uses neural networks with multiple layers for complex pattern recognition.

C. Deep Learning encompasses the simulation of human intelligence in machines.

D. Deep Learning involves manually defined rules and instructions

The correct answer is B

Deep learning is a subset of ML that uses neural networks with multiple layers for complex pattern
recognition, such as recognizing patterns in images, speech, and text.
Thank You

You might also like