0% found this document useful (0 votes)
37 views46 pages

Introduction To ML

This document provides an introduction to machine learning, defining it as the study of algorithms that improve performance through experience. It outlines different types of learning, including supervised, unsupervised, and reinforcement learning, along with their applications and advantages. Additionally, it discusses the challenges and methodologies associated with machine learning, emphasizing the importance of data and model evaluation.

Uploaded by

rimjimch
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)
37 views46 pages

Introduction To ML

This document provides an introduction to machine learning, defining it as the study of algorithms that improve performance through experience. It outlines different types of learning, including supervised, unsupervised, and reinforcement learning, along with their applications and advantages. Additionally, it discusses the challenges and methodologies associated with machine learning, emphasizing the importance of data and model evaluation.

Uploaded by

rimjimch
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

Part A:

Introduction to
Machine
Learning
Dr. Soham Dutta
Assistant Professor,
Electrical and Electronics Department,
Manipal Institute of Technology, Manipal,
Karnataka- 576104
Email: [Link].1992@[Link]
What is Machine Learning?
“Learning is any process by which a system improves
performance from experience.”
- Herbert Simon

Definition by Tom Mitchell (1998):


Machine Learning is the study of algorithms that
• improve their performance P
• at some task T
• with experience E.
A well-defined learning task is given by <P, T, E>.
3
Traditional Programming

Data
Computer Output
Program

Machine Learning

Data
Computer Program
Output

4
Slide credit: Pedro Domingos
When Do We Use Machine Learning?
ML is used when:
• Human expertise does not exist (navigating on Mars)
• Humans can’t explain their expertise (speech recognition)
• Models must be customized (personalized medicine)
• Models are based on huge amounts of data (genomics)

5
Based on slide by E. Alpaydin
A classic example of a task that requires machine learning:
It is very hard to say what makes a 2

6
Slide credit: Geoffrey Hinton
Some more examples of tasks that are best
solved by using a learning algorithm
• Recognizing patterns:
– Facial identities or facial expressions
– Handwritten or spoken words
– Medical images
• Generating patterns:
– Generating images or motion sequences
• Recognizing anomalies:
– Unusual credit card transactions
– Unusual patterns of sensor readings in a nuclear power plant
• Prediction:
– Future stock prices or currency exchange rates
7
Slide credit: Geoffrey Hinton
Sample Applications
• Web search
• Computational biology
• Finance
• E-commerce
• Space exploration
• Robotics
• Information extraction
• Social networks
• Debugging software
• [Your favorite area]

8
Slide credit: Pedro Domingos
Samuel’s Checkers-Player
“Machine Learning: Field of study that gives
computers the ability to learn without being
explicitly programmed.” -Arthur Samuel (1959)

9
Defining the Learning Task
Improve on task T, with respect to
performance metric P, based on experience E
T: Playing checkers
P: Percentage of games won against an arbitrary opponent
E: Playing practice games against itself

T: Recognizing hand-written words


P: Percentage of words correctly classified
E: Database of human-labeled images of handwritten words

T: Driving on four-lane highways using vision sensors


P: Average distance traveled before a human-judged error
E: A sequence of images and steering commands recorded while
observing a human driver.

T: Categorize email messages as spam or legitimate.


P: Percentage of email messages correctly classified.
E: Database of emails, some with human-given labels
10
Slide credit: Ray Mooney
State of the Art Applications of
Machine Learning

11
Autonomous Cars

• Nevada made it legal for


autonomous cars to drive on
roads in June 2011
• As of 2013, four states (Nevada,
Florida, California, and
Michigan) have legalized
autonomous cars
Penn’s Autonomous Car →
(Ben Franklin Racing Team) 12
Autonomous Car Sensors

13
Autonomous Car Technology
Path
Planning

Laser Terrain Mapping

Learning from Human Drivers


Adaptive Vision

Sebastian

Stanley

Images and movies taken from Sebastian Thrun’s multimedia w1e4bsite.


Deep Learning in the Headlines

15
Scene Labeling via Deep Learning

[Farabet et al. ICML 2012, PAMI 2013] 19


Impact of Deep Learning in Speech Technology

22
Slide credit: Li Deng, MS Research
Types of Learning

23
Types of Learning

• Supervised (inductive) learning


– Given: training data + desired outputs (labels)
• Unsupervised learning
– Given: training data (without desired outputs)
• Semi-supervised learning
– Given: training data + a few desired outputs
• Reinforcement learning
– Rewards from sequence of actions

24
Based on slide by Pedro Domingos
SUPERVISED LEARNING
Supervised learning is a type of machine learning algorithm that
learns from labeled data.
Labeled data is data that has been tagged with a correct answer or
classification.

Supervised learning, as the name indicates, has the presence of a


supervisor as a teacher. Supervised learning is when we teach or
train the machine using data that is well-labelled, which means
some data is already tagged with the correct answer. After that, the
machine is provided with a new set of examples(data) so that the
supervised learning algorithm analyses the training data(set of
training examples) and produces a correct outcome from labeled
data.
For example, a labeled dataset of images of Elephant, Camel and
Cow would have each image tagged with either “Elephant” ,
“Camel”or “Cow.”
Key Points
• Supervised learning involves training a machine from labeled
data.
• Labeled data consists of examples with the correct answer or
classification.
• The machine learns the relationship between inputs (fruit
images) and outputs (fruit labels).
• The trained machine can then make predictions on
new, unlabeled data.
Example
Let’s say you have a fruit basket that you want to identify. The
machine would first analyze the image to extract features such as its
shape, color, and texture. Then, it would compare these features to
the features of the fruits it has already learned about. If the new
image’s features are most similar to those of an apple, the machine
would predict that the fruit is an apple.

For instance, suppose you are given a basket filled with different
kinds of fruits. Now the first step is to train the machine with all the
different fruits one by one like this:
• If the shape of the object is rounded and has a depression at the
top, is red in color, then it will be labeled as –Apple.
• If the shape of the object is a long curving cylinder having Green-
Yellow color, then it will be labeled as –Banana.
Now suppose after training the data, you have given a new separate
fruit, say Banana from the basket, and asked to identify it.
Since the machine has already learned the things from previous data
and this time has to use it wisely. It will first classify the fruit with its
shape and color and would confirm the fruit name as BANANA and
put it in the Banana category. Thus the machine learns the things
from training data(basket containing fruits) and then applies the
knowledge to test data(new fruit).
Types of Supervised Learning
Regression: A regression problem is when the output variable is a
real value, such as “dollars” or “weight”.

Classification: A classification problem is when the output variable is


a category, such as “Red” or “blue” , “disease” or “no disease”.
Regression
Regression is a type of supervised learning that is used to predict
continuous values, such as house prices, stock prices, or customer
churn.

Regression algorithms learn a function that maps from the input


features to the output value.

Some common regression algorithms include:


• Linear Regression
• Polynomial Regression
• Support Vector Machine Regression
• Decision Tree Regression
• Random Forest Regression
Classification
Classification is a type of supervised learning that is used to predict
categorical values, such as whether a customer will churn or not,
whether an email is spam or not, or whether a medical image shows
a tumor or not.

Classification algorithms learn a function that maps from the input


features to a probability distribution over the output classes.

Some common classification algorithms include:


• Support Vector Machines
• Decision Trees
• Random Forests
• Naive Baye
Applications of Supervised learning
Spam filtering: identify and classify spam emails based on their
content, helping users avoid unwanted messages.
Image classification: classify images into different categories, such
as animals, objects, or scenes, facilitating tasks like image search,
content moderation, and image-based product recommendations.
Medical diagnosis: analyzing patient data, such as medical images,
test results, and patient history, to identify patterns that suggest
specific diseases or conditions.
Fraud detection: analyze financial transactions and identify patterns
that indicate fraudulent activity, helping financial institutions
prevent fraud and protect their customers.
Natural language processing (NLP): sentiment analysis, machine
translation, and text summarization, enabling machines to
understand and process human language effectively.
Advantages of Supervised learning
• Allows collecting data and produces data output from previous
experiences.
• Helps to optimize performance criteria with the help of
experience.
• Helps to solve various types of real-world computation problems.
• Performs classification and regression tasks.
• Allows estimating or mapping the result to a new sample.
• Complete control over choosing the number of classes we want
in the training data.
Disadvantages of Supervised learning
• Classifying big data can be challenging.
• Training for supervised learning needs a lot of computation time.
So, it requires a lot of time.
• Supervised learning cannot handle all complex tasks in Machine
Learning.
• It requires a labelled data set.
• It requires a training process
Unsupervised Learning
Unsupervised learning is a type of machine learning that learns from
unlabeled data.
This means that the data does not have any pre-existing labels or
categories.
The goal of unsupervised learning is to discover patterns and
relationships in the data without any explicit guidance.

Unsupervised learning is the training of a machine using information


that is neither classified nor labeled and allowing the algorithm to
act on that information without guidance.

Here the task of the machine is to group unsorted information


according to similarities, patterns, and differences without any prior
training of data.
Unlike supervised learning, no teacher is provided that means no
training will be given to the machine.
Therefore the machine is restricted to find the hidden structure in
unlabeled data by itself.

You can use unsupervised learning to examine the animal data that
has been gathered and distinguish between several groups
according to the traits and actions of the animals. These groupings
might correspond to various animal species, providing you to
categorize the creatures without depending on labels that already
exist.
Key Points
• Unsupervised learning allows the model to discover patterns and
relationships in unlabeled data.
• Clustering algorithms group similar data points together based on
their inherent characteristics.
• Feature extraction captures essential information from the data,
enabling the model to make meaningful distinctions.
• Label association assigns categories to the clusters based on the
extracted patterns and characteristics.
Example
Imagine you have a machine learning model trained on a large
dataset of unlabeled images, containing both dogs and cats.
The model has never seen an image of a dog or cat before, and it
has no pre-existing labels or categories for these animals.
Your task is to use unsupervised learning to identify the dogs and
cats in a new, unseen image.
For instance, suppose it is given an image having both dogs and cats
which it has never seen.
Thus the machine has no idea about the features of dogs and cats so
we can’t categorize it as ‘dogs and cats ‘.
But it can categorize them according to their similarities, patterns,
and differences, i.e., we can easily categorize the above picture into
two parts.
The first may contain all pics having dogs in them and the second
part may contain all pics having cats in them.
Here no prior learning is done, which means no training data or
examples.
It allows the model to work on its own to discover patterns and
information that was previously undetected.
Types of Unsupervised Learning
Clustering: A clustering problem is where you want to discover the
inherent groupings in the data, such as grouping customers by
purchasing behavior.

Association: An association rule learning problem is where you want


to discover rules that describe large portions of your data, such as
people that buy X also tend to buy Y.
Clustering
Clustering is a type of unsupervised learning that is used to group
similar data points together.
Clustering algorithms work by iteratively moving data points closer
to their cluster centers and further away from data points in other
clusters.
Clustering Types:-
[Link] clustering
2.K-means clustering
[Link] Component Analysis
[Link] Value Decomposition
[Link] Component Analysis
[Link] Mixture Models (GMMs)
[Link]-Based Spatial Clustering of
Applications with Noise (DBSCAN)
Association rule learning
Association rule learning is a type of unsupervised learning that is
used to identify patterns in a data.
Association rule learning algorithms work by finding relationships
between different items in a dataset.

Some common association rule learning algorithms include:


Apriori Algorithm
Eclat Algorithm
FP-Growth Algorithm
Application of Unsupervised
learning
Anomaly detection: identify unusual patterns or deviations from
normal behavior in data, enabling the detection of fraud, intrusion,
or system failures.
Scientific discovery: uncover hidden relationships and patterns in
scientific data, leading to new hypotheses and insights in various
scientific fields.
Recommendation systems: identify patterns and similarities in user
behavior and preferences to recommend products, movies, or music
that align with their interests.
Customer segmentation: identify groups of customers with similar
characteristics, allowing businesses to target marketing campaigns
and improve customer service more effectively.
Image analysis: group images based on their content, facilitating
tasks such as image classification, object detection, and image
retrieval.
Advantages of Unsupervised
learning
• It does not require training data to be labeled.
• Capable of finding previously unknown patterns in data.
• Good at finding patterns and relationships in data without being
told what to look for.
Disadvantages of Unsupervised
learning
• Difficult to measure accuracy or effectiveness due to lack of
predefined answers during training.
• The results often have lesser accuracy.
• The user needs to spend time interpreting and label the classes
which follow that classification.
• Unsupervised learning can be sensitive to data quality, including
missing values, outliers, and noisy data.
• Without labeled data, it can be difficult to evaluate the
performance of unsupervised learning models, making it
challenging to assess their effectiveness.
ML in a Nutshell
• Tens of thousands of machine learning
algorithms
– Hundreds new every year

• Every ML algorithm has three components:


– Representation
– Optimization
– Evaluation

43
Slide credit: Pedro Domingos
Various Function Representations
• Numerical functions
– Linear regression
– Neural networks
– Support vector machines
• Symbolic functions
– Decision trees
– Rules in propositional logic
– Rules in first-order predicate logic
• Instance-based functions
– Nearest-neighbor
– Case-based
• Probabilistic Graphical Models
– Naïve Bayes
– Bayesian networks
– Hidden-Markov Models (HMMs)
– Probabilistic Context Free Grammars (PCFGs)
– Markov networks

44
Slide credit: Ray Mooney
Various Search/Optimization
Algorithms
• Gradient descent
– Perceptron
– Backpropagation
• Dynamic Programming
– HMM Learning
– PCFG Learning
• Divide and Conquer
– Decision tree induction
– Rule learning
• Evolutionary Computation
– Genetic Algorithms (GAs)
– Genetic Programming (GP)
– Neuro-evolution

45
Slide credit: Ray Mooney
Evaluation
• Accuracy
• Precision and recall
• Squared error
• Likelihood
• Posterior probability
• Cost / Utility
• Margin
• Entropy
• K-L divergence
• etc.

47
Slide credit: Pedro Domingos
ML in Practice

• Understand domain, prior knowledge, and goals


• Data integration, selection, cleaning, pre-processing, etc.
Loop • Learn models
• Interpret results
• Consolidate and deploy discovered knowledge

48
Based on a slide by Pedro Domingos
Lessons Learned about Learning
• Learning can be viewed as using direct or indirect
experience to approximate a chosen target function.

• Function approximation can be viewed as a search


through a space of hypotheses (representations of
functions) for one that best fits a set of training data.

• Different learning methods assume different


hypothesis spaces (representation languages) and/or
employ different search techniques.

49
Slide credit: Ray Mooney

You might also like