intro to ai: a statistical approach (aka machine learning)
TRANSCRIPT
![Page 1: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/1.jpg)
Intro to AI: A Statistical Approach(aka Machine Learning)
Instructor: Taylor Berg-KirkpatrickSlides: Sanjoy Dasgupta
Course website: http://cseweb.ucsd.edu/classes/fa19/cse151-a/
![Page 2: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/2.jpg)
Machine learning versus Algorithms
A central goal of both fields:develop procedures that exhibit a desired input-output behavior.
• Algorithms: input-output mapping can be precisely defined.Input: Graph G , two nodes u, v in the graph.Output: Shortest path from u to v in G
• Machine learning: mapping cannot easily be made precise.Input: Picture of an animal.Output: Name of the animal.
Instead, provide examples of (input,output) pairs.Ask the machine to learn a suitable mapping itself.
![Page 3: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/3.jpg)
Machine learning versus Algorithms
A central goal of both fields:develop procedures that exhibit a desired input-output behavior.
• Algorithms: input-output mapping can be precisely defined.Input: Graph G , two nodes u, v in the graph.Output: Shortest path from u to v in G
• Machine learning: mapping cannot easily be made precise.Input: Picture of an animal.Output: Name of the animal.
Instead, provide examples of (input,output) pairs.Ask the machine to learn a suitable mapping itself.
![Page 4: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/4.jpg)
Prediction problems: inputs and outputs
Basic terminology:
• The input space, X .E.g. 32× 32 RGB images of animals.
• The output space, Y.E.g. Names of 100 animals.
x :
y : “bear”
After seeing a bunch of examples (x , y), pick a mapping
f : X → Y
that accurately recovers the input-output pattern of the examples.
Categorize prediction problems by the type of output space:(1) discrete, (2) continuous, or (3) probability values
![Page 5: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/5.jpg)
Prediction problems: inputs and outputs
Basic terminology:
• The input space, X .E.g. 32× 32 RGB images of animals.
• The output space, Y.E.g. Names of 100 animals.
x :
y : “bear”
After seeing a bunch of examples (x , y), pick a mapping
f : X → Y
that accurately recovers the input-output pattern of the examples.
Categorize prediction problems by the type of output space:(1) discrete, (2) continuous, or (3) probability values
![Page 6: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/6.jpg)
Prediction problems: inputs and outputs
Basic terminology:
• The input space, X .E.g. 32× 32 RGB images of animals.
• The output space, Y.E.g. Names of 100 animals.
x :
y : “bear”
After seeing a bunch of examples (x , y), pick a mapping
f : X → Y
that accurately recovers the input-output pattern of the examples.
Categorize prediction problems by the type of output space:(1) discrete, (2) continuous, or (3) probability values
![Page 7: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/7.jpg)
Discrete output space: classification
Binary classification
E.g., Spam detectionX = {email messages}Y = {spam, not spam}
Multiclass
E.g., News article classificationX = {news articles}Y = {politics, business, sports, . . .}
Structured outputs
E.g., ParsingX = {sentences}Y = {parse trees}
x = “John hit the ball”
y =
![Page 8: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/8.jpg)
Discrete output space: classification
Binary classification
E.g., Spam detectionX = {email messages}Y = {spam, not spam}
Multiclass
E.g., News article classificationX = {news articles}Y = {politics, business, sports, . . .}
Structured outputs
E.g., ParsingX = {sentences}Y = {parse trees}
x = “John hit the ball”
y =
![Page 9: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/9.jpg)
Discrete output space: classification
Binary classification
E.g., Spam detectionX = {email messages}Y = {spam, not spam}
Multiclass
E.g., News article classificationX = {news articles}Y = {politics, business, sports, . . .}
Structured outputs
E.g., ParsingX = {sentences}Y = {parse trees}
x = “John hit the ball”
y =
![Page 10: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/10.jpg)
Continuous output space: regression
• Pollution level predictionPredict tomorrow’s air quality index in my neighborhoodY = [0,∞) (< 100: okay, > 200: dangerous)
• Insurance company calculationsWhat is the expected life expectancy of this person?Y = [0, 120]
What are suitable predictor variables (X ) in each case?
![Page 11: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/11.jpg)
Probability estimation
Y = [0, 1] represents probabilities
Example: Credit card transactions
• x = details of a transaction
• y = probability this transaction is fraudulent
Why not just treat this as a binary classification problem?
![Page 12: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/12.jpg)
Probability estimation
Y = [0, 1] represents probabilities
Example: Credit card transactions
• x = details of a transaction
• y = probability this transaction is fraudulent
Why not just treat this as a binary classification problem?
![Page 13: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/13.jpg)
Perequisites
• ProbabilityConditional probability, Bayes’ rule, random variables, independence
• Linear algebraMatrix-matrix product, rank, matrix inverse, determinant, eigen decomp
• Vector calculusMultivariate differentiation, partial gradients, chain rule, Hessian
• Coding experiencePython, Numpy, PyTorch
![Page 14: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/14.jpg)
Perequisites
• ProbabilityConditional probability, Bayes’ rule, random variables, independence
• Linear algebraMatrix-matrix product, rank, matrix inverse, determinant, eigen decomp
• Vector calculusMultivariate differentiation, partial gradients, chain rule, Hessian
• Coding experiencePython, Numpy, PyTorch
![Page 15: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/15.jpg)
Perequisites
• ProbabilityConditional probability, Bayes’ rule, random variables, independence
• Linear algebraMatrix-matrix product, rank, matrix inverse, determinant, eigen decomp
• Vector calculusMultivariate differentiation, partial gradients, chain rule, Hessian
• Coding experiencePython, Numpy, PyTorch
![Page 16: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/16.jpg)
Perequisites
• ProbabilityConditional probability, Bayes’ rule, random variables, independence
• Linear algebraMatrix-matrix product, rank, matrix inverse, determinant, eigen decomp
• Vector calculusMultivariate differentiation, partial gradients, chain rule, Hessian
• Coding experiencePython, Numpy, PyTorch
![Page 17: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/17.jpg)
Roadmap for the course
1 Introduction / Prediction problemsClassification, regression, probability estimation
2 Generative models for classificationMaximum-likelihood estimation, Gaussian generative models
3 Linear predictionLinear regression, logistic regression, perceptron, support vector machines
4 Non-linear models / Deep learningNearest neighbors, decision trees, neural networks
5 Representation learningClustering, PCA, embeddings, autoencoders
![Page 18: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/18.jpg)
Roadmap for the course
1 Introduction / Prediction problemsClassification, regression, probability estimation
2 Generative models for classificationMaximum-likelihood estimation, Gaussian generative models
3 Linear predictionLinear regression, logistic regression, perceptron, support vector machines
4 Non-linear models / Deep learningNearest neighbors, decision trees, neural networks
5 Representation learningClustering, PCA, embeddings, autoencoders
![Page 19: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/19.jpg)
Roadmap for the course
1 Introduction / Prediction problemsClassification, regression, probability estimation
2 Generative models for classificationMaximum-likelihood estimation, Gaussian generative models
3 Linear predictionLinear regression, logistic regression, perceptron, support vector machines
4 Non-linear models / Deep learningNearest neighbors, decision trees, neural networks
5 Representation learningClustering, PCA, embeddings, autoencoders
![Page 20: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/20.jpg)
Roadmap for the course
1 Introduction / Prediction problemsClassification, regression, probability estimation
2 Generative models for classificationMaximum-likelihood estimation, Gaussian generative models
3 Linear predictionLinear regression, logistic regression, perceptron, support vector machines
4 Non-linear models / Deep learningNearest neighbors, decision trees, neural networks
5 Representation learningClustering, PCA, embeddings, autoencoders
![Page 21: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/21.jpg)
Roadmap for the course
1 Introduction / Prediction problemsClassification, regression, probability estimation
2 Generative models for classificationMaximum-likelihood estimation, Gaussian generative models
3 Linear predictionLinear regression, logistic regression, perceptron, support vector machines
4 Non-linear models / Deep learningNearest neighbors, decision trees, neural networks
5 Representation learningClustering, PCA, embeddings, autoencoders
![Page 22: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/22.jpg)
Quizzes / Homeworks• Quizzes
One quiz for each of the five sectionsAnnounced in advance and taken in class, drop lowest
• HomeworksOne HW for each of the five sections + warmup HWMixture of math and coding problems using PyTorchUse latex and turn in pdf Graded on random subset of problems, drop lowest
• Grading50% Quizzes / 50% HWs. No midterm! No final!
• Getting helpCome to office hours and discussion!We will help your learn PyTorch!Join Piazza!
![Page 23: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/23.jpg)
Quizzes / Homeworks• Quizzes
One quiz for each of the five sectionsAnnounced in advance and taken in class, drop lowest
• HomeworksOne HW for each of the five sections + warmup HWMixture of math and coding problems using PyTorchUse latex and turn in pdf Graded on random subset of problems, drop lowest
• Grading50% Quizzes / 50% HWs. No midterm! No final!
• Getting helpCome to office hours and discussion!We will help your learn PyTorch!Join Piazza!
![Page 24: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/24.jpg)
Quizzes / Homeworks• Quizzes
One quiz for each of the five sectionsAnnounced in advance and taken in class, drop lowest
• HomeworksOne HW for each of the five sections + warmup HWMixture of math and coding problems using PyTorchUse latex and turn in pdf Graded on random subset of problems, drop lowest
• Grading50% Quizzes / 50% HWs. No midterm! No final!
• Getting helpCome to office hours and discussion!We will help your learn PyTorch!Join Piazza!
![Page 25: Intro to AI: A Statistical Approach (aka Machine Learning)](https://reader034.vdocument.in/reader034/viewer/2022052013/62860c8c990ad0501b7afaa6/html5/thumbnails/25.jpg)
Quizzes / Homeworks• Quizzes
One quiz for each of the five sectionsAnnounced in advance and taken in class, drop lowest
• HomeworksOne HW for each of the five sections + warmup HWMixture of math and coding problems using PyTorchUse latex and turn in pdf Graded on random subset of problems, drop lowest
• Grading50% Quizzes / 50% HWs. No midterm! No final!
• Getting helpCome to office hours and discussion!We will help your learn PyTorch!Join Piazza!