Skip to content

mitanshhh/PredictPlot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ˆ PredictPlot

PredictPlot is a simple yet powerful command-line tool that performs linear regression on linear CSV dataset and visualizes predictions vs actual values using matplotlib. It also provides essential metrics such as Mean Squared Error and RΒ² Score, along with the option to save the predicted results.


πŸ”§ Features

  • Import CSV dataset
  • Choose your target and feature columns
  • Automatically drops non-numeric features and handles missing values
  • View correlation of all numeric columns with the target
  • Splits data into train/test using train_test_split
  • Trains a LinearRegression model using scikit-learn
  • Visualizes predictions with a scatter plot
  • Shows MSE and RΒ² Score
  • Option to export predictions to predictions.csv

πŸš€ Getting Started

πŸ“¦ Prerequisites

Make sure you have Python 3 and the following libraries installed:

pip install pandas matplotlib scikit-learn

▢️ Usage

You'll be prompted to:

  1. Enter the path to a CSV file
  2. Choose the target column to predict
  3. Choose a numeric feature column to use for prediction

πŸ“Š The tool will:

  • Show correlation of columns
  • Train a linear regression model
  • Plot predictions vs actual values
  • Display error metrics
  • Optionally save results to predictions.csv

πŸ“· Example Output

A scatter plot of actual vs predicted values will appear.

Terminal output will look like:

Mean Squared Error: 127.53
R2 score: 0.86

About

CSV Data Predictor & Visualizer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages