Google Machine Learning Crash Course Flashcards

1
Q

Google ML Crash Course

What is Rule #1 of the Rules of Machine Learning?

A

Rule #1: Don’t be afraid to launch a product without machine learning.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Google ML Crash Course

What are “labels

A

A label is the thing we’re predicting - the y variable in simple linear regression. The label could be the future price of wheat, the kind of animal shown in a picture, the meaning of an audio clip, or just about anything.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Google ML Crash Course

What variable is often used to represent the label

A

y when used for an input label or y' when used as the predicted label

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Google ML Crash Course

What are “features”?

A

A feature is an input variable - the x variable in simple linear regression. A simple machine learning project might use a single feature, while a more sophisticated machine learning project could use millions of features, specified as:

x₁, x₂, ..., xₙ

In the spam detector example, the features could include the following:

  • words int he email text
  • sender’s address
  • time of day the email was sent
  • if the email contains the phrase “one weird trick.”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Google ML Crash Course

What variable(s) are often used to represent features?

A

x or x₁, x₂, ..., xₙ

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Google ML Crash Course

What are “examples”?

A

An example is a particular instance of data, x (we put x in boldface to indicate that it is a vector.) WEe break examples into two categories:

  • labeled examples
  • unlabeled examples

A labeled example includes both feature(s) and the label. That is:

labeled examples: {features, label}: (x,y)

An unlabeled example contains features but not the label. That is:

unlabeled examples: {features, ?}: (x, ?)

Once we’ve trained our model with labeled examples, we use that model to predict the label on unlabeled examples. In the spam detector, unlabeled examples are new emails that humans haven’t yet labeled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Google ML Crash Course

What variable(s) are often used to represent an example?

A

x

The boldface x indicates that it is a vector.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Google ML Crash Course

What is a “model”?

A

A model defines the relationship between features and label. For example, a spam detection model might associate certain features strongly with “spam”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Google ML Crash Course

What are phases in a “model“‘s life cycle?

A
  • training means creating, or learning the model
  • inference means applying the trained model to unlabeled examples to make useful predictions (y')
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Google ML Crash Course

What is the difference between regression and classification”?

A
  • A regression model predicts continuous values, e.g. the price of a home, or the probability of an event happening.
  • A classification model predicts discrete values, e.g., if a given email is spam or not, or what kind of animal a picture is of.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Google ML Crash Course

Suppose you want to develop a supervised machine learning model to predict whether a given email s “spam” or “not spam”. Which of the following statements are true?

  1. Words in the subject header will make good labels.
  2. Emails not marked as “spam” or “not spam” are unlabeled examples.
  3. The labels applied to some examples might be unreliable.
  4. We’ll use unlabeled examples to train the model.
A

2 & 3 are true:

  1. Emails not marked as “spam” or “not spam” are unlabeled examples.
  2. The labels applied to some examples might be unreliable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Google ML Crash Course

Suppose an online shoe store wants to create a supervised ML model that will provide personalized show recommendations to users. That is, the model will recommend certain pairs of shoes to Marty and different pairs of shoes to Janet. The system will use past user behavior data to generate training data. Which of the following statements are true?

  1. “Shoe size” is a useful feature.
  2. “Shoe beauty” is a useful feature.
  3. “Shoes that a user adores” is a useful label.
  4. “The user clicked on the shoe’s description” is a useful label.
A

1 & 4 are true:

  1. “Shoe size” is a useful feature. It is quantifiable and will influence if a user likes it or not. E.g. if Marty is a size 9, the model shouldn’t recommend size 7 shoes.
  2. “The user clicked on the shoe’s description” is a useful label. Users probably only want to read more about shoes they like, or are interested in.

2 & 3 are false:

  1. “Shoe beauty” is a useful feature. Good features are concrete and quantifiable, but “beauty” is not quantifiable. Style and color might be better features.
  2. “Shoes that a user adores” is a useful label. Similarly “adorable” is not quantifiable.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Google ML Crash Course

What is the equation for a simple linear regression model with a single feature?

A

y' = b + w₁x₁

Where:

  • y' is the predicted label (desired output).
  • b is the bias (the y-intercept), sometimes referred to as w₀.
  • w₁ is the weight of feature 1. Weight is the same concept as the “slope” m in the traditional equation of a line.
  • x₁ is a feature (feature number 1, a known input)

This can be used to infer (predict) the value of y' for a given value x₁ in a model that has been trained (has learned the values for b and w₁)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Google ML Crash Course

If y' = b + w₁x₁ is the equation for a linear regression model with a single feature, what is the equation for a model with three features?

A

y' = b + w₁x₁ + w₂x₂ + w₃x₃

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Google ML Crash Course

What is a simple definition for “Training

In the context of Supervised Learning

A

Training a model simply means learning (determining) good values for all the weights and the bias from labeled examples. In supervised learning, a machine learning algorithm builds a model by examining many examples and attempting to find a model that minimizes loss; this process is called empirical risk minimization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Google ML Crash Course

What is “Loss

A

Loss is the penalty for a bad prediction. That is, loss is a numb er indicating how bad the model’s prediction was on a single example. If the mode’s prediction is perfect, the loss is zero; otherwise, the loss is greater. The goal of training a model is to find a set of weights and biases that have low loss, on average, across all the examples.

17
Q

Google ML Crash Course

What is the squared loss or **L₂ loss” function for a single example of a linear-regression model?

A

The square of the difference between the label and the prediction.

loss = (y - y')²

18
Q

Google ML Crash Course

What is the “Mean square error (MSE)” ?

A

The average squared loss (a.k.a. L₂ loss) per example over the whole dataset. To calculate MSE, sum up all the squred losses for individual examples and then divide by the number of examples.

19
Q

Google ML Crash Course

20
Q

Google ML Crash Course