Machine Learning Questions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Machine Learning Programming Exercise 2

Due 27th October, 2015. Please upload to LMS before midnight.

1 Logistic Regression [100 points]


The ex2_data1_x.dat and ex2_data1_y.dat contain the inputs
and outputs
respectively for a binary classification problem, with one training example per row.
i.

[40 points] Use fminunc function that is mentioned in class and apply it to fit a logistic
regression to the data. What are the coefficients resulting from your fit? (Remember to
include the intercept term.)
For fminunc you can use the code below:

ii.

[30 points] Plot the training data (your axes should be and , corresponding to the two
coordinates of the inputs, and you should use a different symbol for each point plotted to
indicate whether that example had label 1 or 0). Also plot on the same figure the decision
boundary fit by logistic regression. (i.e., this should be a straight line showing the
boundary separating the region where h(x) > 0.5 from where h(x) 0.5.)
[30 points] Using mapFeature.m, get more features and make regularization when
Plot decision boundary for both using plotDecisionBoundary.m.

iii.

You might also like