4.73 out of 5
4.73
3263 reviews on Udemy

Deep Learning Prerequisites: Logistic Regression in Python

Data science, machine learning, and artificial intelligence in Python for students and professionals
Instructor:
Lazy Programmer Inc.
24,901 students enrolled
English [Auto] More
program logistic regression from scratch in Python
describe how logistic regression is useful in data science
derive the error and update rule for logistic regression
understand how logistic regression works as an analogy for the biological neuron
use logistic regression to solve real-world business problems like predicting user actions from e-commerce data and facial expression recognition
understand why regularization is used in machine learning

This course is a lead-in to deep learning and neural networks – it covers a popular and fundamental technique used in machine learning, data science and statistics: logistic regression. We cover the theory from the ground up: derivation of the solution, and applications to real-world problems. We show you how one might code their own logistic regression module in Python.

This course does not require any external materials. Everything needed (Python, and some Python libraries) can be obtained for free.

This course provides you with many practical examples so that you can really see how deep learning can be used on anything. Throughout the course, we’ll do a course project, which will show you how to predict user actions on a website given user data like whether or not that user is on a mobile device, the number of products they viewed, how long they stayed on your site, whether or not they are a returning visitor, and what time of day they visited.

Another project at the end of the course shows you how you can use deep learning for facial expression recognition. Imagine being able to predict someone’s emotions just based on a picture!

If you are a programmer and you want to enhance your coding abilities by learning about data science, then this course is for you. If you have a technical or mathematical background, and you want use your skills to make data-driven decisions and optimize your business using scientific principles, then this course is for you.

This course focuses on “how to build and understand“, not just “how to use”. Anyone can learn to use an API in 15 minutes after reading some documentation. It’s not about “remembering facts”, it’s about “seeing for yourself” via experimentation. It will teach you how to visualize what’s happening in the model internally. If you want more than just a superficial look at machine learning models, this course is for you.

“If you can’t implement it, you don’t understand it”

  • Or as the great physicist Richard Feynman said: “What I cannot create, I do not understand”.

  • My courses are the ONLY courses where you will learn how to implement machine learning algorithms from scratch

  • Other courses will teach you how to plug in your data into a library, but do you really need help with 3 lines of code?

  • After doing the same thing with 10 datasets, you realize you didn’t learn 10 things. You learned 1 thing, and just repeated the same 3 lines of code 10 times…

Suggested Prerequisites:

  • calculus (taking derivatives)

  • matrix arithmetic

  • probability

  • Python coding: if/else, loops, lists, dicts, sets

  • Numpy coding: matrix and vector operations, loading a CSV file

WHAT ORDER SHOULD I TAKE YOUR COURSES IN?:

  • Check out the lecture “Machine Learning and AI Prerequisite Roadmap” (available in the FAQ of any of my courses, including the free Numpy course)

Start Here

1
Introduction and Outline

This lecture will outline what will be learned in the course. I explain the importance of knowing the math, and provide short descriptions of each section later covered. Feel free to skip it and jump right into the 3rd video.

2
How to Succeed in this Course
3
Statistics vs. Machine Learning
4
Review of the classification problem

Difference between supervised and unsupervised learning. Difference between classification and regression. Feel free to skip this one if you already know this.

5
Introduction to the E-Commerce Course Project
6
Easy first quiz

An easy first quiz

Basics: What is linear classification? What's the relation to neural networks?

1
Linear Classification

I discuss what linear classification is from a general standpoint, without invoking any specifics related to logistic regression. I provide a 2-dimensional binary classification example and go over how we would classify data into 1 of 3 cases: positive class, negative class, and don't know / not sure.

2
Biological inspiration - the neuron

In this lecture I discuss a brief history of neural networks, and talk about how the characteristics of the neuron (action potential, signal propagation, inhibitory and excitatory behavior) are modeled in different ways: the Hodgkin Huxley mdoel, the FitzHugh Nagumo model, and the logistic model.

3
How do we calculate the output of a neuron / logistic classifier? - Theory

I show the feedforward calculation for the output of a logistic unit.

4
How do we calculate the output of a neuron / logistic classifier? - Code

I show how to code the feedforward calculation for the output of a logistic unit in Python and numpy.

5
Interpretation of Logistic Regression Output
6
E-Commerce Course Project: Pre-Processing the Data
7
E-Commerce Course Project: Making Predictions
8
Feedforward Quiz
9
Prediction Section Summary
10
Suggestion Box

Solving for the optimal weights

1
Training Section Introduction
2
A closed-form solution to the Bayes classifier

I show how we can solve for the weights in a logistic regression model if we make assumptions about the distributions of the input data (equal variance, Gaussian-distributed).

3
What do all these symbols mean? X, Y, N, D, L, J, P(Y=1|X), etc.

All these symbols can get confusing so this is a lecture to give a short and simple description of what each letter "stands for". These are important to get right now, because we'll use it for this course and every later course on deep learning and machine learning.

4
The cross-entropy error function - Theory

I show the cross-entropy error formula, and describe why this is used as an appropriate objective function for logistic regression.

5
The cross-entropy error function - Code

I show how to calculate the cross-entropy error of your model in Python and numpy.

6
Visualizing the linear discriminant / Bayes classifier / Gaussian clouds
7
Maximizing the likelihood

I show how to derive the likelihood and log-likelihood of your model and data, and I show how maximizing the likelihood is equivalent to minimizing the cross-entropy.

8
Updating the weights using gradient descent - Theory

I explain how gradient descent can be used to solve for the minima of a function, and the algorithm that can be used to iteratively update the logistic weights.

9
Updating the weights using gradient descent - Code

I show how to code weight updates for logistic regression using gradient descent in Python and numpy.

10
E-Commerce Course Project: Training the Logistic Model
11
Training Section Summary

Practical concerns

1
Practical Section Introduction
2
Interpreting the Weights
3
L2 Regularization - Theory
4
L2 Regularization - Code

I show how to apply regularization for logistic regression in Python.

5
L1 Regularization - Theory
6
L1 Regularization - Code
7
L1 vs L2 Regularization
8
The donut problem

I show how logistic regression can be used to solve the donut problem (where one class is circular and is inside another circular class).

9
The XOR problem

This lecture describes how to apply logistic regression to the XOR problem by making it a 3-dimensional problem.

10
Why Divide by Square Root of D?
11
Practical Section Summary

Checkpoint and applications: How to make sure you know your stuff

1
BONUS: Sentiment Analysis

This is a clip from my natural language processing course. It shows you how to apply logistic regression to sentiment analysis - measuring how positive or negative a word is.

2
BONUS: Exercises + how to get good at this

Project: Facial Expression Recognition

1
Facial Expression Recognition Project Introduction
2
Facial Expression Recognition Problem Description
3
The class imbalance problem
4
Utilities walkthrough
5
Facial Expression Recognition in Code
6
Facial Expression Recognition Project Summary

Background Review

1
Gradient Descent Tutorial

Setting Up Your Environment (FAQ by Student Request)

1
Windows-Focused Environment Setup 2018
2
How to install Numpy, Scipy, Matplotlib, Pandas, IPython, Theano, and TensorFlow

Extra Help With Python Coding for Beginners (FAQ by Student Request)

1
How to Uncompress a .tar.gz file
2
How to Code by Yourself (part 1)
3
How to Code by Yourself (part 2)
4
Proof that using Jupyter Notebook is the same as not using it
5
Python 2 vs Python 3

Effective Learning Strategies for Machine Learning (FAQ by Student Request)

1
How to Succeed in this Course (Long Version)
2
Is this for Beginners or Experts? Academic or Practical? Fast or slow-paced?
3
Machine Learning and AI Prerequisite Roadmap (pt 1)
4
Machine Learning and AI Prerequisite Roadmap (pt 2)

Appendix / FAQ Finale

1
What is the Appendix?
2
BONUS: Where to get discount coupons and FREE deep learning material
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.7
4.7 out of 5
3263 Ratings

Detailed Rating

Stars 5
2055
Stars 4
948
Stars 3
190
Stars 2
31
Stars 1
39
30-Day Money-Back Guarantee

Includes

6 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion
Deep Learning Prerequisites: Logistic Regression in Python
Price:
$218.98 $169

Community

For Professionals

For Businesses

We support Sales, Marketing, Account Management and CX professionals. Learn new skills. Share your expertise. Connect with experts. Get inspired.

Community

Partnership Opportunities

Layer 1
samcx.com
Logo
Register New Account
Compare items
  • Total (0)
Compare
0