“I wouldn’t be where I was without Dataquest. Be confident in what you learn with Dataquest. If you take the time to learn, you will be one of the few people in the world that can do what you do.”

Vicknesh Mano

Data Science Manager @Accenture

Course overview

Gradient descent is one of the most commonly used optimization algorithms to train machine learning models, such as linear regression models, logistic regression, or even neural networks. It finds the minimum of any convex function by gradually converging toward it.

In this course, you’ll learn the fundamentals of gradient descent and how to implement this algorithm in Python. You’ll learn the difference between gradient descent and stochastic gradient descent, as well as how to use stochastic gradient descent for logistic regression.

Best of all, you’ll learn by doing — you’ll practice and get feedback directly in the browser. At the end of the course, you’ll combine your new skills in a project to optimize a stochastic gradient descent algorithm on linear regression.

Key skills

  • Coding a basic gradient descent algorithm
  • Understanding the basic batch and stochastic gradient descent uses
  • Visualizing stochastic gradient descent using matplotlib
  • Applying stochastic gradient descent in Python using scikit-learn

Course outline

Gradient Descent Modeling in Python [4 lessons]

Understanding Gradient Descent 1h

Lesson Objectives
  • Find the minimum value in arrays.
  • Train machine learning models with gradient descent.
  • Write simple algorithms for finding minimum values.
  • Code the basic building blocks of a gradient descent algorithm.

Implementing Gradient Descent in Python 1h

Lesson Objectives
  • Test how learning rate affects Gradient Descent
  • Build a basic Gradient Descent algorithm in Python
  • Code a Basic Gradient Descent function

Gradient Descent in Scikit-Learn 1h

Lesson Objectives
  • Identify the limitations of the basic gradient descent algorithm
  • Compare basic gradient descent and stochastic gradient descent
  • Make predictions with gradient descent using scikit-learn
  • Create a classifier with gradient descent

Guided Project: Stochastic Gradient Descent on Linear Regression 1h

Lesson Objectives
  • Explore a new dataset
  • Prepare the data to build a model using SGDRegression
  • Measure the efficiency of the model

Projects in this course

Guided Project: Stochastic Gradient Descent on Linear Regression

For this project, we’ll step into the role of data scientists aiming to predict the optimal time to go to the gym to avoid crowds. We’ll build a stochastic gradient descent linear regression model using Python.

The Dataquest guarantee


Dataquest has helped thousands of people start new careers in data. If you put in the work and follow our path, you’ll master data skills and grow your career.


We believe so strongly in our paths that we offer a full satisfaction guarantee. If you complete a career path on Dataquest and aren’t satisfied with your outcome, we’ll give you a refund.

Master skills faster with Dataquest

Go from zero to job-ready

Go from zero to job-ready

Learn exactly what you need to achieve your goal. Don’t waste time on unrelated lessons.

Build your project portfolio

Build your project portfolio

Build confidence with our in-depth projects, and show off your data skills.

Challenge yourself with exercises

Challenge yourself with exercises

Work with real data from day one with interactive lessons and hands-on exercises.

Showcase your path certification

Showcase your path certification

Share the evidence of your hard work with your network and potential employers.

Grow your career with

of learners recommend
Dataquest for career advancement
Dataquest rating
SwitchUp Best Bootcamps
Average salary boost
for learners who complete a path

Aaron Melton

Business Analyst at Aditi Consulting

“Dataquest starts at the most basic level, so a beginner can understand the concepts. I tried learning to code before, using Codecademy and Coursera. I struggled because I had no background in coding, and I was spending a lot of time Googling. Dataquest helped me actually learn.”


Jessica Ko

Machine Learning Engineer at Twitter

“I liked the interactive environment on Dataquest. The material was clear and well organized. I spent more time practicing then watching videos and it made me want to keep learning.”


Victoria E. Guzik

Associate Data Scientist at Callisto Media

“I really love learning on Dataquest. I looked into a couple of other options and I found that they were much too handhold-y and fill in the blank relative to Dataquest’s method. The projects on Dataquest were key to getting my job. I doubled my income!”

Join 1M+ data learners on


Create a free account


Choose a learning path


Complete exercises and projects


Advance your career

Start learning today