1) Download this mat file external link: training.mat. The "data" variable is the training values (we're only doing 1 dimension) and the "labels" variable provides the class labels (Y=0 or Y=1) for each corresponding training point in data
2) Using gradient ascent write a function which computes a logistic regression for this binary classification. Make sure your weights vector includes a bias. Remember, logistic regression models the conditional probability directly.
P(YX) = g(x*w + b) where x = data, w = weights, b= bias
g(z) = 1 / (1 + exp(z))
3) plot the data points and your logistic model
4) What are your weights?
5) What is the conditional probability P(YX) for:
Y = 1 and X = 1.8
Y = 0 and X = 1.2
Y = 1 and X = 3.0
