R Programming project
Budget: $10 – $30 CAD
Normalize the feature variable x1 (see the Nota-Bene below).
• Calculate the value of the objective function l(β0,β1).
• Choose a value of the learning rate η (you should try different values).
• Initialize the parameter value and calculate the gradient ∇l(β0,β1).
• Update the parameter value.
• Check whether gradient ascent has converged.
Here, it is much better to look at the convergence of the values of l(β0,β1) than the convergence of the parameters themselves.
• Complete the implementation of gradient ascent.
• Predict the labels for a set of test examples.
I am including the data set SAheart.data in which you should predict the value of the variable chd (response, coronary heart disease diagnosis) from the feature value ldl (low density lipoprotein cholesterol). You may use the first 100 rows for training and any values in the remaining rows for testing.
• Calculate the value of the objective function l(β0,β1).
• Choose a value of the learning rate η (you should try different values).
• Initialize the parameter value and calculate the gradient ∇l(β0,β1).
• Update the parameter value.
• Check whether gradient ascent has converged.
Here, it is much better to look at the convergence of the values of l(β0,β1) than the convergence of the parameters themselves.
• Complete the implementation of gradient ascent.
• Predict the labels for a set of test examples.
I am including the data set SAheart.data in which you should predict the value of the variable chd (response, coronary heart disease diagnosis) from the feature value ldl (low density lipoprotein cholesterol). You may use the first 100 rows for training and any values in the remaining rows for testing.