Professional Documents
Culture Documents
Aims
To introduce
the basics of machine learning, particularly inductive learning.
Objective
You should be able to
Describe how each method can be used to perform classification tasks.
Use a tool to perform a simple application using the above methods.
Introduction
The ability to learn is one of the most crucial/important
characteristics of an intelligent entity.
A system that can learn is more flexible, being able to
respond to new problems and situations, and may also be
easier to program.
Learning is still an expanding area of AI research.
It overlaps with almost all other areas of AI such as:
in planning and robotics, there is interest in getting systems to learn rules of
behavior from experience in some environment;
in natural language a system may learn syntactic rules from example
sentences; in vision a system may learn to recognize some object given some
example images; and
in expert systems rules may be learned from example cases.
It is also an area which is attracting interest in industry, with
many commercial products available. For example, there is
interest in analyzing data obtained from supermarket loyalty
cards in order to find rules that can be used in direct
marketing campaigns.
Alison no no yes no no
Algorithm DT:
1. pick the best attribute i.e, First last year
2. produce branch according to its value
3. find their records
4. find their categories/decision
5. if 100% correct then stop else goto 1
Try FLY, WH? And WH,D?
The general idea is to look for features which are particularly good
indicators of the result you’re interested in. These features are then
placed (as questions) in nodes of the tree.
Student First last Male? Works Drinks? First this
Year? hards? Year?
•It just takes a number of inputs (corresponding to the signals from neighbouring cells),
adjusts these using a weight to represent the strength of connections at the synapses,
sums these, and fires if this sum exceeds some threshold.
•A neuron which fire will have an output value of 1, and other wise output 0.
•More precisely, if there are n inputs ( and n associated weights) the neuron finds the
weighted sum of the inputs and outputs 1 if this exceeds a threshold t and 0 otherwise.
•If the inputs are x1…..xn, with weights w1 ..wn:
if (w1 x1 +…+ wn xn)> t, i.e. 0.5
then output = 1
else output = 0
•This basic neuron is referred to as a simple perceptron, and is illustrated in the
following figure. The name “perceptron” was proposed by Frank Rosenblatt in 1962. He
pioneered the simulation of neural networks on computers.
• A serious neural network application would require a network of
hundreds or thousands of neurons.
• Learning in neural networks, involves using example data to adjust the
weights in a network.
• Each example will have specified input-output values.
• These examples are considered one by one, and weights adjusted by a
small amount if the current network gives the incorrect output.
• The way this is done is to increase the weights on active connections if the
actual output of the network is 0 but the target output (from the example
data) is 1, and decrease the weights if the actual output is 1 and the target
is 0.
• The whole set of examples has to be considered again and again until
eventually (we hope) the network converges to give the right results for
all the given examples.
• Example: Student problem.
No. Student First last Male? Works Drinks? First this
year? hard? year? (target value)
1. X = {1,1,0,1},{1,1,1,0},{0,0,1,0},{0,1,0,1},{1,0,1,1},{0,1,1,1}
2. Target = {1,1,1,0,1,0}
3. W1=W2=W3=W4=0.2
4. REPEAT // start training
sum = W*X
IF (sum > 0.5) // threshold
Output = 1 ELSE Output = 0
IF (Output = 0 AND Target = 1)
W = W + 0.05; // increment weights on X != 0
IF (Output = 1 AND Target = 0)
W = W – 0.05; // decrement weights on X != 0
UNTIL ERROR = 0; // all correctly classified
• Test the algorithm for correctly classified with the final new weights