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.
- 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
LinearRegressionmodel usingscikit-learn - Visualizes predictions with a scatter plot
- Shows MSE and RΒ² Score
- Option to export predictions to
predictions.csv
Make sure you have Python 3 and the following libraries installed:
pip install pandas matplotlib scikit-learnYou'll be prompted to:
- Enter the path to a CSV file
- Choose the target column to predict
- 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
A scatter plot of actual vs predicted values will appear.
Terminal output will look like:
Mean Squared Error: 127.53
R2 score: 0.86