Skip to main content

The purpose of this package is to provide simplified tools to apply several different linear regression models

Project description

lr_for_the_masses

Linear Regression as an Educational Tool

By Samuel Vélez and Mandar Kathe

Build Status

The purpose of this package is to provide simplified tools to apply several different linear regression models. The main package has tools to load custom data from a .csv, Excel, or the practice sets available in the Seaborn package and visualize it, while the remainder of the package is stored in its subpackages and modules, each dedicated to a different type of linear regression: simple linear regression, multiple linear regression, linear mixed effects regression and ridge regression. These modules hold functions to summarize, diagnose and plot these different implementations. The team members have followed the required structural formats for the class. Overall, we have two sub-packahes each containing two modules. The modules also have inheritance as required by the assignment

The following is the structure and explanation on each function's function:

  1. Subpackage 1: Linear regression

1.1. Module 1: Simple Linear Regression This module aims to provide a simplified tool to fit and diagnose linear regression models after it is provided with a predictor and a response variable.

1.1.1 Linear regression summary: summarylin()
    This function prints the slope and intercept of the fitted linear regression model.

1.1.2 Linear regression diagnosis: diagnoselin()
    Prints the R-squared, p-value and standard error of the fitted linear regression model.

1.1.3 Original data plot: plotoriginaldata()
    Plots a scatterplot showing the predictor and the response.

1.1.4 Fitted line plot: plotfittedline()
    Plots the fitted line created by the linear regression model.

1.1.5 Confidence interval plot: plotconfidence_intervals()
    Plots the confidence intervals with a 95% confidence for the fitted linear regression.

1.2 Module 2: Multiple Linear Regression Simplified application of multiple linear regression asking the user to provide a response variables and predictors.

1.2.1 Multiple linear regression summary: summary_mullin()
    This function prints the coefficients, intercept and form of the fitted multiple linear regression model.

1.2.2 Multiple linear regression diagnosis: diag_Rval()
    Prints the R-squared of the fitted model.
  1. Subpackage 2: Linear Mixed Effects and Ridge Regression

2.1 Module 1: Linear mixed effects Provides an easy application of linear mixed effects, asking the user to choose a response variable, a fixed variable and a random variable.

2.1.1 Summary of the linear mixed effects model: summarymlm()
    Provides information such as coefficients, number of groups, number of observations and other general information on this application.

2.1.2 Linear mixed effects plot: plotmlm()
    Plot of the residuals of the fit linear mixed effects model.

2.2 Module 2: Ridge Linear regression Implementation of ridge linear regression asking the user to provide a predictor, response and a regularization alpha.

2.2.1 Ridge regression summary: ridgelin()
    Requests the input of a regularization alpha and provides the coefficients and intercept of the model.

2.2.2 Regularization alpha plot: visridgealpha()
    Plots the ridge regression implementation against its regularization alpha.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lr_for_the_masses-SamV01-1.0.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lr_for_the_masses_SamV01-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file lr_for_the_masses-SamV01-1.0.0.tar.gz.

File metadata

  • Download URL: lr_for_the_masses-SamV01-1.0.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for lr_for_the_masses-SamV01-1.0.0.tar.gz
Algorithm Hash digest
SHA256 394edbc9b0c89ad5f7193cd8790fd81a100542d989624814b520c7b62ba47018
MD5 ac0eb1533aa4231caf2865c51b8ef59a
BLAKE2b-256 39a83decd1c948c7f360bf443a858e29beac3dd153afca8f611eb0093ef1109c

See more details on using hashes here.

File details

Details for the file lr_for_the_masses_SamV01-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: lr_for_the_masses_SamV01-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.3

File hashes

Hashes for lr_for_the_masses_SamV01-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 875f2721563d1bc0ea1fb1fe1fa9de2ddf1ca026ba713e3f5e5ce9116d39f56c
MD5 552958a4bc547cfb25136777ba7c27a9
BLAKE2b-256 3c5df92144054b87f691d48c8dc28480ee646c9b2c5a35ee3383e164580bb567

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page