simple linear regression quality
Project description
Simple Linear Regression:
An analysis of the quality of the regression is carried out
Table of Contents
Simple Linear Regression Assumptions:
- Outlier: The term anomaly indicates that there is data that deviates significantly from the rest.
- Normality: refers to the normal distribution of errors or residuals.
- Homoscedasticity: is another simple linear regression assumption and indicates whether the variance of the residuals is the same across different groups in the database.
- Independence: refers to the absence of temporal correlation between residuals.
- 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."
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file sl_regression_quality-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: sl_regression_quality-0.3.3-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f9fbfc93057eade9d865a638277e3e48be9a2c9c97f96a75cab2bde353ca7f7 |
|
MD5 | f4f95e12016730762908c87c7d5b388a |
|
BLAKE2b-256 | 6b46c3e19e40800935bec565e6f8049ecfca6fb120bef69f5c536218efe04b2e |