Coursera ML Assignment 1 Part II

April 20, 2015
This is assignment 1 part 2 for ML course by Andrew Ng.
This is part of [Introduction to ML]( course by Andrew Ng on coursera using ex1data2.txt and ex1_multi.m. This assignment is done in R using the formulas suggested as part of the assignment. This assignment also tries to predict using linear regression algorithm built in Azure ML. Since algorithms in R are using the exact same approach as highlighted in the course, answers match with the results shown in the course. While the built-in algorithms are more optimized for practical applications, answers don't match exactly with the results shown in the course. The overall experiment is shown below. In the experiment, left hand side is using the built-in Azure algorithms while right hand side of the graph is using R-scripts to create gradient descent based linear regression algorithm for multiple input vectors along with feature normalization. ![]( The first part of the assignment is to write a normalization function, cost function and gradient descent function to find the feature weights Theta. The output of this function is the theta matrix for multiple input vectors. ![]( The last part of the assignment is to write a predict function that uses given input data, normalizes input data using mean/standard deviation and theta computed in previous step to predict the home price based on the home size and number of bedrooms. ![]( ##Additional References The part 1 of this assignment is located [here]( Created by a Microsoft Employee