Linear regression with multiple variables
The aim of this project was to predict the prices of houses via linear regression with multiple variables. This was done by taking into account information on recent houses sold and construct a predictive model of housing prices.
The input dataset contains information about the size of each house in square feet, the number of bedrooms, as well as the price of the house.

Figure 1: Input Dataset
Creating the plot of computed cost in each iteration enables us to realise if the training process converges to optimal values.

Figure 2: Values of cost function over the iterations
By using the optimisation technique of gradient descent, the parameters along with the predicted value for a 1650 square feet house with 3 bedrooms are presented in Figure 3.
Figure 3: Calculated theta values and predicted house price via gradient descent
Moreover, a predicted model based on normal equations was built, resulting in a prediction which can be shown in Figure 4.
Figure 4: Calculated theta values and predicted house price via normal equations
We can clearly see that the two trained models predicted house prices which differ by 47,000 $.
A more detailed description of this project’s implentation in Matlab can be seen in this github repository: Link to Github repository