Skip to content

This project implements linear regression to predict data trends using Python libraries like pandas, numpy, and matplotlib. It also includes data preprocessing, model training, and visualization of the results on a split dataset.

Notifications You must be signed in to change notification settings

alireza-nasirian/LinearRegPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

LinearRegPy

LinearRegPy is a Python project that implements linear regression for predicting data trends using popular libraries such as pandas, numpy, and matplotlib.

Overview

Linear regression is a fundamental technique in machine learning and statistics used to model the relationship between a dependent variable and one or more independent variables. This project focuses on implementing linear regression in Python, specifically for predicting trends in datasets.

Features

  • Data Preprocessing: The project includes functionality for reading CSV data files into pandas DataFrames, shuffling the data, and splitting it into training and test sets.
  • Model Training: Linear regression is performed using the least squares method to find the coefficients of the fitted line.
  • Visualization: The project visualizes the original data points, the fitted line, and provides insights into the model's performance using matplotlib.
  • Error Calculation: The error between the estimated values and the actual test data values is calculated and displayed.

Usage

  1. Clone the repository:

    git clone https://github.com/alireza-nasirian/LinearRegPy.git
  2. Replace the data.csv file with your own dataset if necessary.

  3. Run the linear_regression.py script:

    python linear_regression.py

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvement, feel free to open an issue or submit a pull request.

About

This project implements linear regression to predict data trends using Python libraries like pandas, numpy, and matplotlib. It also includes data preprocessing, model training, and visualization of the results on a split dataset.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages