This project uses a linear regression model to predict land prices based on the land's square footage. The dataset consists of land area (in square feet) and corresponding land prices. The goal is to build a model that can accurately predict the price of land based on its size.
The dataset used for this project is a CSV file containing the following columns:
land
: The area of land in square feet.price
: The price of the land in dollars.
You can find the dataset in the file landpriceprediction.csv
.
- LandPricePrediction.ipynb: Jupyter notebook containing the code for loading, preprocessing, visualizing the dataset, training the linear regression model, and making predictions.
- landpriceprediction.csv: The dataset file.
To run this project, you need the following libraries:
- pandas
- numpy
- scikit-learn
- matplotlib
You can install them using the following command:
pip install pandas numpy matplotlib scikit-learn
If you're using Google Colab, you can also upload the dataset using the file upload feature.
- Clone the repository:
git clone https://github.com/SAMI-CODEAI/LandPricePrediction.git
- Navigate to the project directory:
cd LandPricePrediction
- Open the Jupyter notebook:
jupyter notebook LandPricePrediction.ipynb
- Upload the dataset file (
landpriceprediction.csv
) when prompted.
The project uses a simple linear regression model from scikit-learn
to predict land prices based on the area of land. The training process involves the following steps:
- Load and preprocess the dataset.
- Visualize the data.
- Split the data into input features (
X
) and target labels (Y
). - Train the linear regression model.
- Make predictions and evaluate the model's performance.
For example, if you want to predict the price of a land area of 6660 square feet, the model will return a predicted price of approximately $14,060.75.
The model coefficients (slope and intercept) are displayed as follows:
- Coefficient (
m
): 2.0407 - Intercept (
b
): 469.47
The prediction formula used by the model is:
Price = m * Area + b
If you'd like to contribute to this project, feel free to fork the repository and submit pull requests.
This project is licensed under the MIT License.
For any questions, feel free to reach out:
- Email: [email protected]
- GitHub: SAMI-CODEAI