This project aims to predict house prices using a linear regression model. The model uses features such as the number of bathrooms, bedrooms, and the total square footage of the house.
The dataset used in this project consists of house sale prices for various houses along with associated house features. The dataset is split into a training set (train.csv) and a test set (test.csv). The training set is used to train the model, and the test set is used to evaluate the model’s performance.
The features used in this project are: HalfBath: Half bathrooms in the house FullBath: Full bathrooms in the house BsmtHalfBath: Half bathrooms in the basement BsmtFullBath: Full bathrooms in the basement BedroomAbvGr: Bedrooms above ground LotArea: Lot size in square feet
The target variable is SalePrice, which represents the price at which the house was sold.
The model used in this project is a Linear Regression model from the sklearn.linear_model library.
Load the datasets using pandas. Select the relevant features and remove any rows with missing values. Separate the features and the target variable in the training set. Train the Linear Regression model on the training set. Make predictions on the test set using the trained model. Save the predictions to a CSV file.
Python pandas numpy sklearn