![]() |
#11
|
||||
|
||||
![]() Quote:
![]()
__________________
Where everyone thinks alike, no one thinks very much |
#12
|
|||
|
|||
![]()
For Pr(f(x) != g(x)), you would want to generate a lot of random points. However, I would not include the training data for this calculation. f & g would always agree on this training data, and wouldn't represent Pr(f(x) != g(x)) fairly.
|
#13
|
|||
|
|||
![]() Quote:
Can you kindly explain how we can calculate this number. How can we ensure that the number is "sufficiently large" Thanks, Bipin |
#14
|
|||
|
|||
![]()
Hi all,
it would be great if any of you could tell me if my understanding of this algorithm is correct. 1)pick a target function(f)(i.e a line in the [-1,1] * [-1,1] plane) 2)generate a set of training examples of the form ((x_d,y_d),output) (I am confused from this point onwards,please correct me if I am wrong ![]() 3)we initially set H as a vector of 0.0s 4)apply the perceptron iteration till the h function 'linearly seperates' all the data points.(we call this g). 5)test this g on a set of new data points (test_data,f(test_data)). 6)compare this with h and calculate error probability. |
#15
|
||||
|
||||
![]() Quote:
![]() ![]() ![]() ![]()
__________________
Where everyone thinks alike, no one thinks very much |
#16
|
||||
|
||||
![]() Quote:
![]()
__________________
Where everyone thinks alike, no one thinks very much |
#17
|
|||
|
|||
![]()
thank you professor
![]() |
#18
|
|||
|
|||
![]()
Hi Prof. Yaser,
I need help in implementation of PLA in JAVA . How i did it is generate two random points , and calculate the line in ax+by = 1 format. After this i generate 100 random points and calculate yn of each point and put them in a 100x3 matrix. I start with a weight vector of size 2 ( 1 for calculating a , other for b) with initial values of zero. Now i loop through the random point matrix and apply the PLA formula for the misclassified points . The program stops when there are no misclassified points. The problem i am facing is for 100 points its not converging quite frequently . And for 10 points it is converging in 2-3 iterations. So this is my problem professor , can you olease help me in catching what i am missing. Thanks, Trk. |
#19
|
|||
|
|||
![]()
The weight vector should include a bias term. In this case dimension of input is 2, so weight vector will be of size 3. Right now you have ax + by = 1, while "1" never gets updated. I suspect when there are small number of pts, the algorithm could converge without the bias term, but with more pts (requiring higher accuracy for no pts to be misclassifed), it doesn't.
|
#20
|
|||
|
|||
![]() Quote:
Each line can crosses two of the sides of the square. (I suppose it could also go right through a corner, but not likely). Handling all the possible combinations of the two lines is a lot of work. In another thread I discussed how I did it, only counting, and computing the area of, cases where both lines go through the top and bottom. That is about 30% in my tests. By symmetry, there should also be 30% where both go through the left and right sides of the square The remaining cases might have a little less area, but I based my answer on just the lines going through the top and bottom of the square. Seemed more interesting than the choose random point method. |
![]() |
Tags |
convergence, iterations, perceptron, pla |
Thread Tools | |
Display Modes | |
|
|