Giter Club home page Giter Club logo

ga-ds829-logistic-regression's Introduction

Logistic Regression

Unit 3: Required


Materials We Provide

Topic Description Link
Lesson Logistic Regression Here
Practice Two activities: Bank Marketing and Multi-LogReg using Iris Here
Data College Admissions Data, Titanic Survivors, Glass, and practice data Here
Slides Sample Slides for Log Reg, Confusion Matrix, and ROC Here
Extra Materials Examples of Logistic Regression Implementation Here

These datasets were chosen because they are familiar datasets from previous lessons and have binary targets for logistic regression.


Learning Objectives

After this lesson, students will be able to:

  • Recall how to perform linear regression in scikit-learn.
  • Demonstrate why logistic regression is a better alternative for classification than linear regression.
  • Understand the concepts of probability, odds, e, log, and log-odds in relation to machine learning.
  • Explain how logistic regression works.
  • Interpret logistic regression coefficients.
  • Use logistic regression with categorical features.
  • Compare logistic regression with other models.
  • Utilize different metrics for evaluating classifier models.
  • Construct a confusion matrix based on predicted classes.

Student Requirements

Before this lesson(s), students should already be able to:

  • Load in and perform basic analysis and manipulation on data in Pandas
  • Build and interpret a linear regression model
  • Explain the basics of probability
  • Distinguish between continuous and categorical variables
  • Understand the bias-variance tradeoff and use confusion matrices to tune this balance

Lesson Outline

TOTAL (170 min)

  • Refresher: Fitting and Visualizing a Linear Regression using scikit-learn (20 min)
  • Refresher: Interpreting Linear Regression Coefficients (15 min)
  • Predicting a Categorical Response (15 min)
  • Using logistic regression for classification (10 min)
  • Probability, odds ratio, e, log, and log-odds (30 min)
    • Understanding e and the natural logarithm (20 min)
    • The log-odds ratio (10 min)
  • What is Logistic Regression? (10 min)
  • Interpreting Logistic Regression Coefficients (20 min)
  • Using Logistic Regression with Categorical Features (15 min)
  • Comparing Logistic Regression to Other Models (10 min)
  • Advanced Classifcation Metrics (25 min)
    • Accuracy, True Positive Rate, and False Negative Rate (15 min)
    • The accuracy paradox (10 min)
  • OPTIONAL: How Many Samples Are Needed?
  • Lesson Review

Additional Resources

For more information on this topic, check out the following resources:

ga-ds829-logistic-regression's People

Contributors

samuel-stack avatar danwilhelm avatar hboyan avatar lasisioo avatar richardjonathonharris avatar rickyhennessy avatar aegorenkov avatar opsman avatar

Watchers

James Cloos avatar Aidan Connolly avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.