Skip to content

Latest commit

 

History

History
93 lines (59 loc) · 3.39 KB

logit-1__logistic-regression-1.md

File metadata and controls

93 lines (59 loc) · 3.39 KB

Logistic Regression Intro

Back to Index


Objective

Learn Logistic Regression

Essentials Reading

Understanding Classifications

Read the basics of classifications

Basics of Logistic Regression

Implementing Logistic Regression in Scikit-Learn

Extra Reading

Checklist

Check your knowledge:

  • What is a sigmoid curve?
  • What is the min/max values for sigmoid?
  • How do we convert the sigmoid / logistic output to a binary classification (yes/no or true/false)
  • Why is logistic called regression, but we use it for classification?

Exercises

Difficulty Level

★☆☆ - Easy
★★☆ - Medium
★★★ - Challenging
★★★★ - Bonus

EX-1: Practice logistic regression with synthetic data

Use Scikit's make_blobs or make_classification to generate some sample data.

Try to separate them using LogisticRegression

EX-2: College Admission Data

Load college admission data

It will look like this:

    admit  gre   gpa  rank
0       0  380  3.61     3
1       1  660  3.67     3
2       1  800  4.00     1
3       0  640  3.19     4
4       0  520  2.93     4
...
  • Use input features: gre, gpa, rank, and predict output: admit
  • Use Logistic Regression to predict.
  • Create a confusion matrix
  • What is the accuracy of the model

EX-3 - BONUS Lab

More Exercises