<< Chapter < Page
  Machine learning   Page 1 / 1
Chapter >> Page >

The perceptron and large margin classifiers

In this final set of notes on learning theory, we will introduce a different model of machine learning. Specifically, we have sofar been considering batch learning settings in which we are first given a training set to learn with, and our hypothesis h is then evaluated on separate test data. In this set of notes, we will consider the online learning setting in which the algorithm has to make predictions continuously even while it's learning.

In this setting, the learning algorithm is given a sequence of examples ( x ( 1 ) , y ( 1 ) ) , ( x ( 2 ) , y ( 2 ) ) , ... ( x ( m ) , y ( m ) ) in order. Specifically, the algorithm first sees x ( 1 ) and is asked to predict what it thinks y ( 1 ) is. After making its prediction, the true value of y ( 1 ) is revealed to the algorithm (and the algorithm may use this information to performsome learning). The algorithm is then shown x ( 2 ) and again asked to make a prediction, after which y ( 2 ) is revealed, and it may againperform some more learning. This proceeds until we reach ( x ( m ) , y ( m ) ) . In the online learning setting, we are interested in the total number oferrors made by the algorithm during this process. Thus, it models applications in which the algorithm has to make predictions even while it'sstill learning.

We will give a bound on the online learning error of the perceptron algorithm. To make our subsequent derivations easier, we willuse the notational convention of denoting the class labels by y = { - 1 , 1 } .

Recall that the perceptron algorithm has parameters θ R n + 1 , and makes its predictions according to

h θ ( x ) = g ( θ T x )

where

g ( z ) = 1 if z 0 - 1 if z < 0 .

Also, given a training example ( x , y ) , the perceptron learning rule updates the parameters as follows. If h θ ( x ) = y , then it makes no change to the parameters.Otherwise, it performs the update This looks slightly different from the update rule we had written down earlier in the quarterbecause here we have changed the labels to be y { - 1 , 1 } . Also, the learning rate parameter α was dropped. The only effect of the learning rate is to scale all the parameters θ by some fixed constant, which does not affect the behavior of the perceptron.

θ : = θ + y x .

The following theorem gives a bound on the online learning error of the perceptron algorithm, when it is run as an online algorithm that performs an updateeach time it gets an example wrong. Note that the bound below on the number of errors does not have an explicit dependence on the number ofexamples m in the sequence, or on the dimension n of the inputs (!).

Theorem (Block, 1962, and Novikoff, 1962) . Let a sequence of examples ( x ( 1 ) , y ( 1 ) ) , ( x ( 2 ) , y ( 2 ) ) , ... ( x ( m ) , y ( m ) ) be given.Suppose that | | x ( i ) | | D for all i , and further that there exists a unit-length vector u ( | | u | | 2 = 1 ) such that y ( i ) · ( u T x ( i ) ) γ for all examples in the sequence (i.e., u T x ( i ) γ if y ( i ) = 1 , and u T x ( i ) - γ if y ( i ) = - 1 , so that u separates the data with a margin of at least γ ). Then the total number of mistakes that the perceptron algorithm makes on this sequence is atmost ( D / γ ) 2 .

Proof. The perceptron updates its weights only on those examples on which it makes a mistake. Let θ ( k ) be the weights that were being used when it made its k -th mistake. So, θ ( 1 ) = 0 (since the weights are initialized to zero), and if the k -th mistake was on the example ( x ( i ) , y ( i ) ) , then g ( ( x ( i ) ) T θ ( k ) ) y ( i ) , which implies that

( x ( i ) ) T θ ( k ) y ( i ) 0 .

Also, from the perceptron learning rule, we would have that θ ( k + 1 ) = θ ( k ) + y ( i ) x ( i ) .

We then have

( θ ( k + 1 ) ) T u = ( θ ( k ) ) T u + y ( i ) ( x ( i ) ) T u ( θ ( k ) ) T u + γ

By a straightforward inductive argument, implies that

( θ ( k + 1 ) ) T u k γ .

Also, we have that

| | θ ( k + 1 ) | | 2 = | | θ ( k ) + y ( i ) x ( i ) | | 2 = | | θ ( k ) | | 2 + | | x ( i ) | | 2 + 2 y ( i ) ( x ( i ) ) T θ ( i ) | | θ ( k ) | | 2 + | | x ( i ) | | 2 | | θ ( k ) | | 2 + D 2

The third step above used Equation  [link] . Moreover, again by applying a straightfoward inductiveargument, we see that  [link] implies

| | θ ( k + 1 ) | | 2 k D 2 .

Putting together  [link] and  [link] we find that

k D | | θ ( k + 1 ) | | ( θ ( k + 1 ) ) T u k γ .

The second inequality above follows from the fact that u is a unit-length vector (and z T u = | | z | | · | | u | | cos φ | | z | | · | | u | | , where φ is the angle between z and u ). Our result implies that k ( D / γ ) 2 . Hence, if the perceptron made a k -th mistake, then k ( D / γ ) 2 .

Questions & Answers

what does preconceived mean
sammie Reply
physiological Psychology
Nwosu Reply
How can I develope my cognitive domain
Amanyire Reply
why is communication effective
Dakolo Reply
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
Wekolamo Reply
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Manix Reply
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
JESSY Reply
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
Simon Reply
compare and contrast skinner's perspective on personality development on freud
namakula Reply
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
Amesalu Reply
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
Zyryn Reply
good👍
Jonathan
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
Kelu Reply
interpersonal relationships
Abdulfatai Reply
What would be the best educational aid(s) for gifted kids/savants?
Heidi Reply
treat them normal, if they want help then give them. that will make everyone happy
Saurabh
What are the treatment for autism?
Magret Reply
hello. autism is a umbrella term. autistic kids have different disorder overlapping. for example. a kid may show symptoms of ADHD and also learning disabilities. before treatment please make sure the kid doesn't have physical disabilities like hearing..vision..speech problem. sometimes these
Jharna
continue.. sometimes due to these physical problems..the diagnosis may be misdiagnosed. treatment for autism. well it depends on the severity. since autistic kids have problems in communicating and adopting to the environment.. it's best to expose the child in situations where the child
Jharna
child interact with other kids under doc supervision. play therapy. speech therapy. Engaging in different activities that activate most parts of the brain.. like drawing..painting. matching color board game. string and beads game. the more you interact with the child the more effective
Jharna
results you'll get.. please consult a therapist to know what suits best on your child. and last as a parent. I know sometimes it's overwhelming to guide a special kid. but trust the process and be strong and patient as a parent.
Jharna
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Machine learning. OpenStax CNX. Oct 14, 2013 Download for free at http://cnx.org/content/col11500/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Machine learning' conversation and receive update notifications?

Ask