Assignment 1
CS60050
The purpose of this assignment is to
force you to get familiar with Matlab.
- Familiarize yourself with basics of
Matlab.
- The files q1x.dat
and q1y.dat contain the inputs x(i)
where each x(i) is a real number, and outputs
y which is a binary number (0 or 1)
respectively for a binary classification
problem, with one training example per row. Find a straight line which
acts to separate the data. This is called
the decision boundary.
Plot the training data (your axes should be x1 and x2, corresponding to
the two coordinates of the inputs, and you should use a different
symbol for each point plotted to indicate whether the example had label
1 or 0).
Also plot on the same figure the decision boundary.
- The files q2x.dat
and q2y.dat contain the inputs and outputs for a
regression problem, with one training example per row. Implement linear
regression on this dataset. Plot on the same figure the data and the
straight line resulting from the fit.