Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 955 Bytes

README.md

File metadata and controls

34 lines (21 loc) · 955 Bytes

Salary Prediction Model

This project implements a simple linear regression model using PyTorch to predict salaries based on years of experience. This is a learning project.

Project Description

This beginner-friendly AI project demonstrates the following:

  • Loading and preprocessing data using NumPy and sklearn
  • Building a linear regression model with PyTorch
  • Training the model using gradient descent
  • Visualizing the results with Matplotlib

Dependencies

Install the dependencies using pipenv:

pipenv install

Dataset

The project uses a dataset named "Salary_dataset.csv". Ensure this file is located in a "datasets" folder in the same directory as the script.

Results

The script will output:

  • The training progress, showing the loss for each epoch
  • A plot of the training loss over time
  • A scatter plot of the original data with the fitted regression line
  • The final model parameters (weight and bias)