Skip to main content

simple linear regression quality

Project description

Simple Linear Regression:

An analysis of the quality of the regression is carried out

methodology

Table of Contents

Simple Linear Regression Assumptions:

  1. Outlier: The term anomaly indicates that there is data that deviates significantly from the rest.
  2. Normality: refers to the normal distribution of errors or residuals.
  3. Homoscedasticity: is another simple linear regression assumption and indicates whether the variance of the residuals is the same across different groups in the database.
  4. Independence: refers to the absence of temporal correlation between residuals.
  5. Linearity: is associated with the presence of a constant change of the variable to be predicted with respect to the predictor.

Simple linear regression Quality

Database structure

The first columns of the database correspond to the repetitions performed for variable x. Once all repetitions for variable x are completed, the repetitions for variable y are recorded. The following image shows an example of how to organize the data before using the "regression_quality" program. The database includes three repetitions for variable "x" and four for variable "y."

database

Installation

Instructions on how to install the project. For example:

pip install sl-regression-quality

Code Example

For instance, the following code can be executed in Google Colab. Simply copy and paste it into a new Colab notebook.

#--------------------------------------------------------------------------------
# 1) Load libraries:
import pandas as pd
from sl_regression_quality.main_routine import regression_quality
from sl_regression_quality.load_data import load_csv

#--------------------------------------------------------------------------------
# 2) Load data
#dataset = load_csv('data_x_y_example.csv') # example data (uncomment line)
#dataset = pd.read_csv('Data_y_full.csv') # example for your data (uncomment line)


number_repetitions_x = 3 # number of repetitions in x
alpha = 0.05 # significance level
dL = 1.055 # dL
dU = 1.211 # dU

#--------------------------------------------------------------------------------
# 3) Run analysis
regression_quality(dataset,number_repetitions_x,alpha,dL,dU)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

sl_regression_quality-0.3.5-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file sl_regression_quality-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for sl_regression_quality-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c0f657f3cf57392b74bc18d502b656f51b15c70972be94f05f2ec1680b3720a9
MD5 4dd2a0837f71a4e8703caf1b5ac61539
BLAKE2b-256 1e5b2bd9baf3f9a57924d886eda9e37154d49cdfc8f02019ed174ce5a5cd1ee6

See more details on using hashes here.

Supported by

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