regression/

directory
v0.0.0-...-86d22a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2017 License: Apache-2.0

README

Regression

Linear regression is widely used to model continuous variables and is used as the basis for other models. It also produces models that are immediately interpretable. Thus, linear regression can provide an excellent starting point when introducing predictive capabilities in a organization.

Linear Regression / Least Squares

alt tag
from University of Cumbria

Notes

  • A linear regression model assumes that the regression function is linear in the inputs.
  • A linear regression model assumes normality of the variables.
  • Linear regression models "are simple and often provide an adequate and interpretable description of how the inputs affect the output. For prediction purposes they can sometimes outperform fancier nonlinear models, especially in situations with small numbers of training cases, low signal-to-noise ratio or sparse data." from Elements of Statistical Learning

Simple Linear Regression - Penn State

Code Review

Profile the data
Visualize correlations
Split the data into training, test, and holdout sets
Train and evaluate a linear regression model
Validate the linear regression model on the holdout

Exercises

Exercise 1

Part A Look again at the scatter plots created in example2. Select another feature (other than bmi) to add to our regression model.

Part B Add your selected feature to the model trained in example4 making it a "multiple linear regression" model. Evaluate your choice. You may be to try a few different features choices, but try to choose one that improves your model evaluation.

Template | Answer

Part C After training your new model, validate it on the holdout.

Template | Answer


All material is licensed under the Apache License Version 2.0, January 2004.

Directories

Path Synopsis
Sample program to profile our data set.
Sample program to profile our data set.
Sample program to investigate correlations between our target and our features.
Sample program to investigate correlations between our target and our features.
Sample program to create training, test, and holdout data sets.
Sample program to create training, test, and holdout data sets.
Sample program to train and test a regression model.
Sample program to train and test a regression model.
Sample program to validate a trained regression model on a holdout data set.
Sample program to validate a trained regression model on a holdout data set.
exercises
exercise1b
Sample program to train and test a multiple regression model.
Sample program to train and test a multiple regression model.
exercise1c
Sample program to validate a trained multiple regression model on a holdout data set.
Sample program to validate a trained multiple regression model on a holdout data set.
template1b
Sample program to train and test a multiple regression model.
Sample program to train and test a multiple regression model.
template1c
Sample program to validate a trained multiple regression model on a holdout data set.
Sample program to validate a trained multiple regression model on a holdout data set.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL