Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 1.07 KB

File metadata and controls

16 lines (13 loc) · 1.07 KB

HousePrediction-LinearRegression

How did we implement it?

First of all, we included the necessary libraries for processing our data and using our algorithm (lines 1-6).
After included our libraries, we loaded the prices.csv file as a dataframe into the data variable
and created the linearReg object to implementation linear regression (line 9 and 12).
Afterwards, we pre-process our data and assign our feature data and the data
we want to predict according to our features as dataframes to two separate variables (line 15 and 17).
After the above processes, our data is divided into 20% for testing and 80% for training (line 19).
We tried to learn the values of y_train by values of x_train with using the fit method with the linearReg object.
We predicted our y_test data according to our x_test data using the predict method with
the linearReg object and assigned our prediction to the y_predictions variable (line 21 and 22).

Output

UML