LFD Book Forum PLA - Need Guidance
 Register FAQ Calendar Mark Forums Read

#1
07-11-2012, 04:48 PM
 samirbajaj Member Join Date: Jul 2012 Location: Silicon Valley Posts: 48
PLA - Need Guidance

Greetings!

I am working on the Perceptron part of the homework, and having spent several hours on it, I'd like to know if I am proceeding in the right direction:

1) My implementation converges in 'N' iterations. This looks rather fishy. Any comments would be appreciated. (Otherwise I may have to start over :-( maybe in a different programming language)

2) I don't understand the Pr( f(x) != g(x) ) expression -- what exactly does this mean? Once the algorithm has converged, presumable f(x) matches g(x) on all data, so the difference is zero.

Thanks.

-Samir
#2
07-11-2012, 06:13 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,478
Re: PLA - Need Guidance

Quote:
 Originally Posted by samirbajaj I don't understand the Pr( f(x) != g(x) ) expression -- what exactly does this mean? Once the algorithm has converged, presumable f(x) matches g(x) on all data, so the difference is zero
On all data, yes. However, the probability is with respect to over the entire input space, not restricted to being in the finite data set used for training.
__________________
Where everyone thinks alike, no one thinks very much
#3
07-12-2012, 08:30 AM
 jakvas Member Join Date: Jul 2012 Posts: 17
Re: PLA - Need Guidance

If we try to evaluate Pr(f(x)!=g(x)) experimentaly how many random verification points should we use to get a significant answear?

I am tempted to believe that Hoeffding's inequality is applicable in this case to a single experiment but since we are averaging out over very many experiments I'm not sure on how to choose the amount of those verification data points (I ultimately worked with 10000 per experiment just to be sure).
#4
07-12-2012, 10:56 AM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,478
Re: PLA - Need Guidance

Quote:
 Originally Posted by jakvas I am tempted to believe that Hoeffding's inequality is applicable in this case to a single experiment but since we are averaging out over very many experiments I'm not sure on how to choose the amount of those verification data points (I ultimately worked with 10000 per experiment just to be sure).
Indeed, the average helps smooth out statistical fuctuations. Your choice of 10000 points is pretty safe.
__________________
Where everyone thinks alike, no one thinks very much
#5
07-16-2012, 10:19 PM
 jtwang Junior Member Join Date: Jul 2012 Posts: 1
Re: PLA - Need Guidance

How would you determine f(x) == g(x) exactly - since the set of possible hypotheses is infinite (3 reals), wouldn't Pr(f(x) != g(x)) == 1? Obviously you could choose some arbitrary epsilon but then that wouldn't be "exactly."
#6
07-16-2012, 10:39 PM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,478
Re: PLA - Need Guidance

Quote:
 Originally Posted by jtwang How would you determine f(x) == g(x) exactly - since the set of possible hypotheses is infinite (3 reals), wouldn't Pr(f(x) != g(x)) == 1? Obviously you could choose some arbitrary epsilon but then that wouldn't be "exactly."
is per point . It may be true for some 's and false for others, hence the notion of probability that it's true (probability with respect to ). We are not saying that is identically equal to .
__________________
Where everyone thinks alike, no one thinks very much
#7
01-08-2013, 03:15 PM
 dobrokot Junior Member Join Date: Jan 2013 Posts: 3
Re: PLA - Need Guidance

Quote:
 Originally Posted by jakvas I'm not sure on how to choose the amount of those verification data points (I ultimately worked with 10000 per experiment just to be sure).
Hoeffding inequality given in same lesson can help to choose number of points. g(x)!=f(x) can be thinked as red marble
#8
01-09-2013, 08:18 AM
 nroger Member Join Date: Jan 2013 Posts: 10
Re: PLA - Need Guidance

I still don't understand this Pr() function. Given two (linear) functions f and g, what is the Pr() of f and g?
Thanks...Neil
#9
01-09-2013, 09:12 AM
 yaser Caltech Join Date: Aug 2009 Location: Pasadena, California, USA Posts: 1,478
Re: PLA - Need Guidance

Quote:
 Originally Posted by nroger I still don't understand this Pr() function. Given two (linear) functions f and g, what is the Pr() of f and g? Thanks...Neil
This is the probability of an event, the event in the case discussed in this thread being that , which means you pick at random according to the probability distribution over the input space and evaluate "the fraction of time" that does not give the same value as for the you pick.

BTW, anyone who wants to refresh some of the prerequisite material for the course, here are some recommendations:

__________________
Where everyone thinks alike, no one thinks very much
#10
01-12-2013, 03:21 PM
 sricharan92 Junior Member Join Date: Jan 2013 Posts: 1
Re: PLA - Need Guidance

Sir

If I understand correctly, we are using N = 10 training points out of a randomly generated x points according to the target function f for perceptron learning and Pr(f(x) != g(x)) should be calculated considering all x points and not just the training data. Am I right ?

 Tags convergence, iterations, perceptron, pla

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home General     General Discussion of Machine Learning     Free Additional Material         Dynamic e-Chapters         Dynamic e-Appendices Course Discussions     Online LFD course         General comments on the course         Homework 1         Homework 2         Homework 3         Homework 4         Homework 5         Homework 6         Homework 7         Homework 8         The Final         Create New Homework Problems Book Feedback - Learning From Data     General comments on the book     Chapter 1 - The Learning Problem     Chapter 2 - Training versus Testing     Chapter 3 - The Linear Model     Chapter 4 - Overfitting     Chapter 5 - Three Learning Principles     e-Chapter 6 - Similarity Based Methods     e-Chapter 7 - Neural Networks     e-Chapter 8 - Support Vector Machines     e-Chapter 9 - Learning Aides     Appendix and Notation     e-Appendices

All times are GMT -7. The time now is 05:20 AM.