{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Regression\n", "\n", "We start our machine learning applications with regression for a few simple reasons:\n", "- Regression is fundamental method for estimating the relationship between a variable (\"y\") that condition on many (\"X\") variables. \n", "- But the coefficients obtained can also be used to generate predictions. \n", "- _Note: The focus in this section is on RELATIONSHIP paradigm_\n", "- Many issues that confront researchers have well understood solutions when regression is the model being used. \n", "- Regression coefficients are easy to interpret.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "

Overall objectives

\n", "\n", "After this subchapter,\n", "\n", "1. You can fit a regression with `statsmodels` or `sklearn`\n", "2. You can view the results visually or numerically of your model with either method\n", "5. You can measure the goodness of fit on a regression\n", "3. You can interpret the mechanical meaning of the coefficients for\n", " - continuous variables\n", " - categorical a.k.a qualitative variables with two or more values (aka \"dummy\", \"binary\", and \"categorical\" variables\n", " - interaction terms between two X variables changes interpretation \n", " - variables in models with other controls included (including categorical variables)\n", "4. You understand what a t-stat / p-value does and does not tell you\n", "6. You are aware of common regression analysis pitfalls and disasters\n", "\n", "![](https://media.giphy.com/media/yoJC2K6rCzwNY2EngA/giphy.gif)\n" ] } ], "metadata": { "celltoolbar": "Tags", "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" } }, "nbformat": 4, "nbformat_minor": 4 }