Module 1 Topic-3-ML Framework
Module 1 Topic-3-ML Framework
IIT Madras
1 ML Component Framework
2 Training Data
3 Model
4 Loss Function
5 Optimization
6 Evaluation
7 Summary
1 ML Component Framework
2 Training Data
3 Model
4 Loss Function
5 Optimization
6 Evaluation
7 Summary
Loss Label
Loss
TP vs FP rate at
a decision
threshold
w
Predicted Label
TP vs FP rate at
Metric
START HERE another decision
threshold
Negative
Starting Gradient Evaluation
Point
Final
Point
Loss
Model
w
Optimization Inference
Data
Training
ML Component Framework
• Training data
• Model
• Loss function
• Optimization procedure
• Evaluation criteria
ML Component Framework
• Training data
• Model
• Loss function
• Optimization procedure
• Evaluation criteria
ML Component Framework
• Training data
• Model
• Loss function
• Optimization procedure
• Evaluation criteria
ML Component Framework
• Training data
• Model
• Loss function
• Optimization procedure
• Evaluation criteria
ML Component Framework
• Training data
• Model
• Loss function
• Optimization procedure
• Evaluation criteria
ML Component Framework
• Training data
• Model
• Loss function
• Optimization procedure
• Evaluation criteria
1 ML Component Framework
2 Training Data
3 Model
4 Loss Function
5 Optimization
6 Evaluation
7 Summary
Training Data
• No data, no ML.
• In supervised learning, training data consists of input and
output pairs.
• Each input is represented by a bunch of numbers called
features or attributes.
• Apply certain transformations to convert input into a bunch of
numbers.
Training Data
• No data, no ML.
• In supervised learning, training data consists of input and
output pairs.
• Each input is represented by a bunch of numbers called
features or attributes.
• Apply certain transformations to convert input into a bunch of
numbers.
Training Data
• No data, no ML.
• In supervised learning, training data consists of input and
output pairs.
• Each input is represented by a bunch of numbers called
features or attributes.
• Apply certain transformations to convert input into a bunch of
numbers.
Training Data
• No data, no ML.
• In supervised learning, training data consists of input and
output pairs.
• Each input is represented by a bunch of numbers called
features or attributes.
• Apply certain transformations to convert input into a bunch of
numbers.
Training Data
• No data, no ML.
• In supervised learning, training data consists of input and
output pairs.
• Each input is represented by a bunch of numbers called
features or attributes.
• Apply certain transformations to convert input into a bunch of
numbers.
Training Data
For example,
• Input may be an image or a piece of text.
• Certain pre-processing steps or transformations have to be
applied to obtain feature representation for such input data.
Training Data
For example,
• Input may be an image or a piece of text.
• Certain pre-processing steps or transformations have to be
applied to obtain feature representation for such input data.
Training Data
For example,
• Input may be an image or a piece of text.
• Certain pre-processing steps or transformations have to be
applied to obtain feature representation for such input data.
Training Data
Training Data
Training Data
Training Data
Training Data
Training Data
Training Data
Training Data
Training Data
Training Data
Training Data
Training Data
Training Data
1 ML Component Framework
2 Training Data
3 Model
4 Loss Function
5 Optimization
6 Evaluation
7 Summary
Model
Model
Model
Model
Model
Model
Model
Model
Model
Model
Model
Model
1 ML Component Framework
2 Training Data
3 Model
4 Loss Function
5 Optimization
6 Evaluation
7 Summary
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
Loss Function
• Our job is to find the weight vector that results in the lowest
loss as per the defined loss function.
• How to estimate such a weight vector?
• Brute force search for the optimal weight vector, but that is
not at all efficient.
• What is the best way to estimate it?
• Well that’s what is the purpose of our next component:
optimization procedure.
Loss Function
• Our job is to find the weight vector that results in the lowest
loss as per the defined loss function.
• How to estimate such a weight vector?
• Brute force search for the optimal weight vector, but that is
not at all efficient.
• What is the best way to estimate it?
• Well that’s what is the purpose of our next component:
optimization procedure.
Loss Function
• Our job is to find the weight vector that results in the lowest
loss as per the defined loss function.
• How to estimate such a weight vector?
• Brute force search for the optimal weight vector, but that is
not at all efficient.
• What is the best way to estimate it?
• Well that’s what is the purpose of our next component:
optimization procedure.
Loss Function
• Our job is to find the weight vector that results in the lowest
loss as per the defined loss function.
• How to estimate such a weight vector?
• Brute force search for the optimal weight vector, but that is
not at all efficient.
• What is the best way to estimate it?
• Well that’s what is the purpose of our next component:
optimization procedure.
Loss Function
• Our job is to find the weight vector that results in the lowest
loss as per the defined loss function.
• How to estimate such a weight vector?
• Brute force search for the optimal weight vector, but that is
not at all efficient.
• What is the best way to estimate it?
• Well that’s what is the purpose of our next component:
optimization procedure.
1 ML Component Framework
2 Training Data
3 Model
4 Loss Function
5 Optimization
6 Evaluation
7 Summary
1 ML Component Framework
2 Training Data
3 Model
4 Loss Function
5 Optimization
6 Evaluation
7 Summary
Evaluation
After optimization:
• How to evaluate the model on unseen data?
• What metric to use?
• The evaluation metric changes as per the problem - different
metric for regression and classification problems.
Evaluation
After optimization:
• How to evaluate the model on unseen data?
• What metric to use?
• The evaluation metric changes as per the problem - different
metric for regression and classification problems.
Evaluation
After optimization:
• How to evaluate the model on unseen data?
• What metric to use?
• The evaluation metric changes as per the problem - different
metric for regression and classification problems.
Evaluation
After optimization:
• How to evaluate the model on unseen data?
• What metric to use?
• The evaluation metric changes as per the problem - different
metric for regression and classification problems.
Evaluation
Evaluation
Evaluation
1 ML Component Framework
2 Training Data
3 Model
4 Loss Function
5 Optimization
6 Evaluation
7 Summary
Summary
Loss
TP vs FP rate at
a decision
threshold
w
Predicted Label
TP vs FP rate at
Metric
START HERE another decision
threshold
Negative
Starting Gradient Evaluation
Point
Final
Point
Loss
Model
w
Optimization Inference
Data
Training