LFD Book Forum Classifying Handwritten Digits: 1 vs. 5
 Register FAQ Calendar Mark Forums Read

#11
10-13-2012, 05:15 AM
 magdon RPI Join Date: Aug 2009 Location: Troy, NY, USA. Posts: 597
Re: Classifying Handwritten Digits: 1 vs. 5

This thread has a response that might help:

Quote:
 Originally Posted by rpistu How to plot the training and the test data, together with the separators learnt by using a 3rd order polynomial transform. Actually, the 3rd order polynomial hypothesis is a unclear formula with the two features. Then, how to plot this polynomial hypothesis in a two dementional axis?
__________________
Have faith in probability
#12
10-03-2013, 07:00 PM
 admas Junior Member Join Date: Oct 2013 Posts: 3
Re: Classifying Handwritten Digits: 1 vs. 5

Hello Professor Magdon,

I have a slightly different question related to plotting.
When I am asked to "familiarize yourself with the data by giving a plot of two
of the digit images", what do we mean by plotting the data? Are we referring to
generating a digit image from the greyscale value vector? Or are you referring to
somehow plotting the numerical values in the vector, itself? I have a feeling that it is
the former, but I am not familar with image generation from greyscale pixels.

Any guidance you could provide would be greatly appreciated.
#13
10-04-2013, 08:58 AM
 magdon RPI Join Date: Aug 2009 Location: Troy, NY, USA. Posts: 597
Re: Classifying Handwritten Digits: 1 vs. 5

If you go to www.amlbook.com, click on 'supporting material' on the right and then scroll down to the `Data' section, you will find some information that can be of use. In particular, there is matlab code for plotting the digit images which takes the matrix of grayscale values and plots an image. This can be of help for developing your own code and utilities.

Quote:
 Originally Posted by admas Hello Professor Magdon, I have a slightly different question related to plotting. When I am asked to "familiarize yourself with the data by giving a plot of two of the digit images", what do we mean by plotting the data? Are we referring to generating a digit image from the greyscale value vector? Or are you referring to somehow plotting the numerical values in the vector, itself? I have a feeling that it is the former, but I am not familar with image generation from greyscale pixels. Any guidance you could provide would be greatly appreciated.
__________________
Have faith in probability
#14
10-05-2013, 03:13 PM
 admas Junior Member Join Date: Oct 2013 Posts: 3
Re: Classifying Handwritten Digits: 1 vs. 5

Thank you for your assistance. That helps me greatly.
#15
10-15-2013, 07:49 PM
 alanericy Junior Member Join Date: Oct 2013 Posts: 5
Re: Classifying Handwritten Digits: 1 vs. 5

Quote:
 Originally Posted by magdon Any one of these three can happen: 1) the linear regression weights are optimal 2) the linear regression weights are not optimal and the PLA/Pocket algorithm can improve the weights. 3) the linear regression weights are not optimal and the PLA/Pocket algorithm cannot improve the weights. In practice, we will not know which case we are in because actually finding the optimal weights is an NP-hard combinatorial optimization problem. However, no matter which case we are in, other than some extra CPU cycles, there is no harm done in running the pocket algorithm on the regression weights to see if they can be improved.
Hi Professor, how to plot the separators with the training data if I use Logistic regression for classiﬁcation using gradient descent. In this way we could compute the probabilities for every point in the figure but how to plot a separator for them?
#16
10-16-2013, 07:29 AM
 magdon RPI Join Date: Aug 2009 Location: Troy, NY, USA. Posts: 597
Re: Classifying Handwritten Digits: 1 vs. 5

You can use the weights produced by logistic regression for classification.

Quote:
 Originally Posted by alanericy Hi Professor, how to plot the separators with the training data if I use Logistic regression for classiﬁcation using gradient descent. In this way we could compute the probabilities for every point in the figure but how to plot a separator for them?
__________________
Have faith in probability
#17
10-16-2013, 09:09 AM
 admas Junior Member Join Date: Oct 2013 Posts: 3
Re: Classifying Handwritten Digits: 1 vs. 5

Hello. I have a question about the digits assignment. Are we supposed to use two
features separately {1, feature i} or have a input vector consisting of {1,feature 1, feature 2}?
#18
10-16-2013, 12:36 PM
 alanericy Junior Member Join Date: Oct 2013 Posts: 5
Re: Classifying Handwritten Digits: 1 vs. 5

Thanks for your reply. In the logistic regression will the separator still be linear or not? And should we use fixed or variable step size in the logistic regression?
#19
10-17-2013, 10:46 AM
 magdon RPI Join Date: Aug 2009 Location: Troy, NY, USA. Posts: 597
Re: Classifying Handwritten Digits: 1 vs. 5

{1,feature 1, feature 2}

Quote:
 Originally Posted by admas Hello. I have a question about the digits assignment. Are we supposed to use two features separately {1, feature i} or have a input vector consisting of {1,feature 1, feature 2}?
__________________
Have faith in probability
#20
10-17-2013, 10:47 AM
 magdon RPI Join Date: Aug 2009 Location: Troy, NY, USA. Posts: 597
Re: Classifying Handwritten Digits: 1 vs. 5

The classification function is still which is linear. The weights are obtained using logistic regression.

Quote:
 Originally Posted by alanericy Thanks for your reply. In the logistic regression will the separator still be linear or not? And should we use fixed or variable step size in the logistic regression?
__________________
Have faith in probability

 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 02:00 AM.