On-screen text
machine Learning | Google for
devlopers.google.com/machine-learning
Machine Learning
Foundational courses
New
Machine Learning
Crash Course
A hands-on course to explore the critical
basics of machine learning.
Linear Regression
An introduction to linear regression, covering linear models,
loss, gradient descent, and hyperparameter tuning.
Logistic Regression
An introduction to logistic regression, where ML models are
designed to predict the probability of a given outcome.
Classification
An introduction to binary classification models, covering
thresholding, confusion matrices, and metrics like accuracy,
precision, recall, and AUC.
Working with Categorical Data
Learn the fundamentals of working with categorical data: how to distinguish categorical data from numerically using one-hot
encoding, feature hashing, and mean encoding, and how to
perform feature crosses.
ML models
Linear regression (80 min)
Logistic regression (35 min)
Classification (70 min)
Data
Working with numerical data (85 min)
Working with categorical data (50 min)
Datasets, generalization, and overfitting (105 min)
NL Concepts
Foundational courses
Advanced courses
Guides
Glossary
Exercises
Help Center
Figure 1: Car heartiness (in-pounds) versus miles per gallon rating. As a car gets heavier, its miles per gallon rating generally decreases.
We could create our own model by drawing a best fit line through the points.
Model
Miles
per gallon
(Label)
20
10
0.0
2.0
3.0
4.0
5.0
Pounds in 1000s
(Feature)
Figure 2: A best fit line drawn through the data from the previous figure.
Linear regression equation
In algebraic terms, the model would be defined as y' = b + w, x, where:
y' is the predicted label—the output.
b is the bias of the model. Bias is the same concept as the y-intercept in the algebraic equation for a line. In ML, bias is a parameter of the model and is calculated during training.
- w, is the weight of the feature. Weight is the same concept as the slope in the algebraic equation for a line. Weight is a parameter of the model and is calculated during training.
x, is a feature—the input.
In ML, we write the equation for a linear regression model as:
y' = b + w, x,
Prediction
Bias
Weight
Feature value
Calculated from training