0% found this document useful (0 votes)
23 views39 pages

Overview of Machine Learning Concepts

Machine learning is a subfield of artificial intelligence concerned with algorithms that can learn from data to make predictions or decisions without being explicitly programmed. There are several major paradigms of machine learning including supervised learning, unsupervised learning, reinforcement learning, rote learning, and analogy. Decision trees are a common supervised learning algorithm that can be used for classification problems. Decision trees break down a data set into smaller and smaller subsets while associating data with outcomes. The tree can then be used to classify new examples or make predictions.

Uploaded by

derbew
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views39 pages

Overview of Machine Learning Concepts

Machine learning is a subfield of artificial intelligence concerned with algorithms that can learn from data to make predictions or decisions without being explicitly programmed. There are several major paradigms of machine learning including supervised learning, unsupervised learning, reinforcement learning, rote learning, and analogy. Decision trees are a common supervised learning algorithm that can be used for classification problems. Decision trees break down a data set into smaller and smaller subsets while associating data with outcomes. The tree can then be used to classify new examples or make predictions.

Uploaded by

derbew
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Chapter Six

Machine Learning

2010 1
Machine Learning
• Learning denotes changes in a system that enable the
system more efficient next time. Learning is an
important feature of “intelligent”
• Machine learning is the subfield of AI concerned with
intelligent systems that learn
• Learn from experience and examples
• 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.
• It is the computational study of algorithms that improve
performance based on experience
2010 2
Why is Machine Learning Important?
• Machine learning is particularly attractive in several real life
problem because of the following reasons:
– Some tasks cannot be defined well except by example
– Working environment of machines may not be known at design
time
– Explicit knowledge encoding may be difficult and not available
– Environments change over time
– Biological systems learn
• Recently, learning is widely used in a number of application
areas including,
– Data mining and knowledge discovery • Decision support systems
– Speech/image/video (pattern) recognition • Bioinformatics
– Adaptive control • WWW
– Autonomous vehicles/robots

2010 3
Example

2010 4
• Components of a Learning System
•Learning Element makes changes to the system
based on how it's doing
•Performance Element is the agent itself that acts
in the world
•Critic tells the Learning Element how it is doing
(e.g., success or failure) by comparing with a fixed
standard of performance
•Problem Generator suggests "problems" or
actions that will generate new examples or
experiences that will aid in training the system
further

2010 5
2010 6
Major Paradigms of Machine Learning
• Rote Learning
– One-to-one mapping from inputs to stored representation. "Learning
by memorization." Association-based storage and retrieval.
– the new knowledge is implanted directly with no inference at all, e.g.
simple memorization of past events, or a knowledge engineer’s direct
programming of rules elicited from a human expert into an expert
system.
• Analogy
– Determine correspondence between two different representations
• Reinforcement
– Only feedback (positive or negative reward) given at end of a
sequence of steps. Requires assigning reward to steps by solving the
credit assignment problem--which steps should receive credit or blame
for a final result?

2010 7
Major Paradigms of Machine Learning
• Supervised and Unsupervised learning
• Want to learn an unknown function f(x) = y, where x is an
input example and y is the desired output.
– Supervised learning implies we are given a set of (x, y) pairs by a
"teacher." The system is supplied with a set of training examples
consisting of inputs and corresponding outputs, and is required to
discover the relation or mapping between then, e.g. as a series of rules,
or a neural network. Agent learns a function from observing example
input-output pairs
• Decision trees
• Linear regression
• Linear classification
• Logistic regression
• Neural networks
• Nonparametric models,
– e.g. nearest neighbours and locally weighted regression
• Support vector machines

2010 8
Supervise learning

2010 9
Major Paradigms of Machine Learning
• Supervised and Unsupervised learning
– Unsupervised learning means we are only given
the x’s. In either case, the goal is to estimate f. The
system is supplied with a set of training examples
consisting only of inputs and is required to
discover for itself what appropriate outputs should
be,
• Most common task is clustering – e.g. taxi agent
notices “bad traffic days”
• Association rule learning
– If some one buys pen and book then he/she has the
probability of buying bag

2010 10
2010 11
Practical Example
• Marketing Manager

Email Income
1 3000
Income Is not going
0 200
1200 to purchase
1 4000
0 1500

Email Income
2000 Low earning
1500
Data is
labelled
4000
5000 High earning
2010 12
• Principles of learning are universal
• Prediction is the key for learning
– We make predictions all the time but rarely investigate
the process underlying our predictions
– To automate the process of making predictions, we
need to understand how to refine theories in addition to
search
• General
1. Collected data
2. Pick the model
3. Train the model
4. Test the model

2010 13
Learning Functionalities
• Training Data
age income student credit_rating buys_computer
<=30 high no fair no
<=30 high no excellent no
30…40 high no fair yes
>40 medium no fair yes
>40 low yes fair yes
>40 low yes excellent no
31…40 low yes excellent yes
<=30 medium no fair no
<=30 low yes fair yes
>40 medium yes fair yes
<=30 medium yes excellent yes
31…40 medium no excellent yes
31…40 high yes fair yes
>40 medium no excellent no

2010 14
• Classification
– Finding models (rules) that describe
(characterize) or/ and distinguish (discriminate)
classes or concepts for future prediction
– Example: classify countries based on climate, or
classify cars based on gas mileage and use it to
predict classification of a new car on a base of
other attributes
• Classification by Decision Tree

2010 15
Decision Tree
• A decision-tree learning algorithm
approximates a target concept using a tree
representation, where each internal node
corresponds to an attribute, and every terminal
node corresponds to a class.
– A flow-chart-like tree structure
– Internal node denotes an attribute
– Branch represents the values of the node attribute
– Leaf nodes represent class labels or class distribution

2010 16
Decision Tree Algorithms -
ID3, C4.5, Etc.
• ID3 uses ideas from information theory and at
each stage selects the test that gains the most
information (or equivalently, results in the
biggest reduction in entropy).
• C4.5 uses different heuristics which usually
work better. Note that unlike the version space
approach to concept learning, these algorithms
are not incremental – if we get new data we
need to start again.
2010 17
• Building The Tree: class= “buys”
<=30 age >40
income student credit class
high no fair no income student credit class
high no excellen no medium no fair yes
t
low yes fair yes
medium no fair no
low yes excellent no
low yes fair yes
medium yes fair yes
medium yes excellen yes 31…40
t medium no excellent no

income student credit class


high no fair yes
low yes excelle yes
nt
medium no excelle yes
nt
high yes fair yes
2010 18
• Extracting Classification Rules from Trees
– Represent the knowledge in the form of IF-THEN rules
– One rule is created for each path from the root to a leaf
– Each attribute-value pair along a path forms a conjunction
– The leaf node holds the class prediction
– Rules are easier for humans to understand
• The tree to extract rules from
age

<=30 overcast
30..40 >40

student Buys=yes credit rating


no yes excellent fair
Buys=no Buys=yes Buys=no Buys=yes
2010 19
• Extracting Classification Rules from Trees
• The rules are:
– IF age = “<=30” AND student = “no” THEN
buys_computer = “no”
– IF age = “<=30” AND student = “yes” THEN
buys_computer = “yes”
– IF age = “31…40” THEN buys_computer = “yes”
– IF age = “>40” AND credit_rating = “excellent”
THEN buys_computer = “yes”
– IF age = “<=30” AND credit_rating = “fair” THEN
buys_computer = “no”

2010 20
Classification Algorithms

2010 21
K-Nearest neighbors

2010 22
Euclidian Distance

2010 23
Linear Regression
• Regression:
– Learning a function from data
– Linear regression: Linear function

2010 24
Linear Regression

2010 25
Linear Regression

2010 26
Linear Regression
• X=[1,2,3,4,5,6]
• Y=[5,4,6,5,6,7]

• M or slop = 0.4
• B or y-intercept =4

2010 27
Linear Regression….

2010 28
Linear Regression
• For the new x=8, it will predict based
on the model of our data or formula
• To determine the accuracy of the best
fit line
• R-square(r2) or the coefficient of
determination. This is calculated by
squared error
2010 29
Linear Regression

2010 30
Linear Regression

2 • We square the error to panelized the outlier


e • To deal with +ve number
2010 31
Linear Regression
Regression
line

• We want r2 very high e.g. 0.8


• Best line will be the smallest
SE yhat/SEmean(y)
• SE yhat>>SEmean(y)

2010 32
Neural Network
• The neural network is the biology inspired AI
techniques
• A NN is an artificial representation of the
human brain that trains to simulate its learning
process
– Learn by examples
– Train to recognize input pattern

2010 33
2010 34
Neural Network

x1 w1
1
w2
x2
w3 0
X3

2010 35
2010 36
• The synapsis : it take data from node and
multiplied by the weigh and produce an
output

2010 37
Exercise
X(hours sleep, Y (scores on test )
hours study)

(3,5) 72

(5,1) 82

(10,2) 93

(8,3) ?

2010 38
Chat Bot

2010 39

You might also like