Introduction to Artificial Intelligence (CIS316)Tutorial
Machine Learning – Linear Regression
Exercise 1.
Suppose you are a real estate agent and a client wants you to predict the selling price of
his house based on its area, which is 4.3 thousand feet2. It is difficult to make this
prediction but you have past data of house sales. Solve this problem using machine
learning, particularly linear regression.
(a) Assume you have the following data. The area is in thousand feet2 and selling
price is in millions. Plot this data on a graph and try to fit a linear model (i.e. a
straight line) to the data. Use the model to make the selling price prediction.
area
1.0
1.8
4.8
3.0
selling price
2.2
3.8
5.5
2.5
(b) Represent the model of (a) as a mathematical function (i.e. equation of a straight
line). What is the root mean square error of this function?
(c) Give two more examples of prediction models one with a better value of root
mean square error and one worse. Write both models as mathematical functions.