Over-fitting occurs especially when fitting a high-order polynomial, that we will try to do here.
Here's the points we will make a model from:
# linear regression mydata = read.csv("http://spreadsheets.google.com/pub?hl=en_GB&hl=en_GB&key=0AnypY27pPCJydGhtbUlZekVUQTc0dm5QaXp1YWpSY3c&output=csv", header = TRUE) # view data plot(mydata)
Exercise 4 is all about using Newton's Method to implement logistic regression on a classification problem.
We start with a dataset representing 40 students who were admitted to college and 40 students who were not admitted, and their corresponding...
Exercise 3 is about multivariate linear regression. First part is about finding a good learning rate (alpha) and 2nd part is about implementing linear regression using normal equations instead of the gradient descent algorithm.
As usual hosted in google docs:
mydata = read.csv("http://spreadsheets.google.com/pub?key=0AnypY27pPCJydExfUzdtVXZuUWphM19vdVBidnFFSWc&output=csv", header = TRUE) # show last 5 rows tail(mydata, 5)
area bedrooms price 43 2567 ...
The exercise is to build a linear regression implementation, I'll use R.
The point of linear regression is to come up with a mathematical function(model) that represents the data as best as possible, that is done...