Skip to content

AJG91/linear-regression

Repository files navigation

Linear regression

This repository contains code that demonstrates how to apply linear regression to a polynomial using Scikit-learn and PyTorch. As an example, I use a projectile motion example.

Getting Started

  • This project relies on python=3.12. It was not tested with different versions
  • To view the entire list of required packages, see requirements.txt
  • Clone the repository to your local machine
  • Once you have, cd into this repo and create the virtual environment (assuming you have conda installed) via
conda env create -f environment.yml
  • Enter the virtual environment with conda activate linear-regression-env
  • Install the packages in the repo root directory using pip install -e . (you only need the -e option if you intend to edit the source code in linear_regression/)

Example

See my website for examples on how to use this code.

Citation

If you use this project, please use the citation information provided by GitHub via the “Cite this repository” button or cite it as follows:

@software{Garcia2025LinearRegression,
  author = {Alberto J. Garcia},
  title = {Linear Regression},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/AJG91/linear-regression},
  license = {MIT}
}

About

This repository demonstrates how to apply linear regression to a projectile motion problem using Scikit-learn and PyTorch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors