https://github.com/camilajaviera91/prediction-of-housing-prices-using-linear-regression
This project provides tools to search for datasets on Kaggle, download and preprocess them, and perform predictions using a Linear Regression model. It includes interactive text-based user interfaces built with `curses`.
https://github.com/camilajaviera91/prediction-of-housing-prices-using-linear-regression
curses kaggle linear-regression matplotlib-pyplot mean-absolute-error mean-square-error numpy pandas pathlib python scikit-learn train-test-split
Last synced: 7 months ago
JSON representation
This project provides tools to search for datasets on Kaggle, download and preprocess them, and perform predictions using a Linear Regression model. It includes interactive text-based user interfaces built with `curses`.
- Host: GitHub
- URL: https://github.com/camilajaviera91/prediction-of-housing-prices-using-linear-regression
- Owner: CamilaJaviera91
- Created: 2024-12-16T16:07:06.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-12-19T14:07:23.000Z (11 months ago)
- Last Synced: 2025-04-12T20:58:29.310Z (7 months ago)
- Topics: curses, kaggle, linear-regression, matplotlib-pyplot, mean-absolute-error, mean-square-error, numpy, pandas, pathlib, python, scikit-learn, train-test-split
- Language: Python
- Homepage:
- Size: 397 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kaggle Dataset Fetcher and Predictor
This project provides tools to search for datasets on Kaggle, download and preprocess them, and perform predictions using a Linear Regression model. It includes interactive text-based user interfaces built with `curses`.
## Features
- Search for datasets on Kaggle interactively.
- Download datasets and automatically extract files.
- Load datasets into a pandas DataFrame and preprocess them.
- Train a Linear Regression model and evaluate it using RMSE and MAE.
- Visualize results with scatter plots.
---
## Prerequisites
1. **Python**: Python 3.7 or higher.
2. **Install Required Libraries**:
```bash
pip install pandas numpy matplotlib scikit-learn kaggle
```
## Set Up Kaggle API:
- Go to Kaggle Account.
- Download the kaggle.json API token.
- Place it in ~/.kaggle/ (Linux/Mac) or %USERPROFILE%\.kaggle\ (Windows).
## File Structure
```bash
.
├── kaggle_connect.py # Handles dataset search and download via Kaggle API.
├── prediction.py # Performs data preprocessing, model training, and visualization.
└── README.md # Documentation for the project.
```
## Usage
### Step 1: Search and Download a Dataset
Run the following command to search, download a kaggle dataset and prediction script:
```bash
python prediction.py
```
Or
```bash
python3 prediction.py
```
Follow the interactive prompts:
1. Enter a search term for datasets (e.g., Boston Housing Dataset).
2. Select a dataset from the list.
3. Specify a folder to store the downloaded files.
### Step 2: Train and Test a Linear Regression Model
The script:
4. Displays descriptive statistics of the data.
5. Splits the data into training and testing sets.
6. Trains a Linear Regression model and evaluates its performance.
7. Displays a scatter plot comparing actual and predicted values.
## Example Output
### Terminal Interface
**Dataset Selection**







**Model Metrics**

### Scatter Plot

## Contributions
Contributions are welcome! Feel free to submit issues or pull requests to enhance the functionality.