SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
MLCC Schedule #1
Bruce Lee ⼤大順
Outline
• Introduction to Machine Learning
• Framing: Key ML Terminology
• Descending into ML
• Reducing Loss
• First Steps with TF
Introduction to Machine
Learning
• Reduce time programming
• feed machine learning tool some examples, and get a more
reliable program in a small fraction of the time.
• Customize and scale products
• To support multiple languages, you can collect data in that
language and feeding it into the exact same machine learning
model.
• Complete seemingly "unprogrammable" tasks
• ML lets you solve problems that you, as a programmer, have no
idea how to do by hand, ex. recognize face
Introduction to Machine
Learning
• Coding
• We use assertions to prove properties of our program
are correct.
• ML
• The focus shifts from a mathematical science to a
natural science:
• We're making observations about an uncertain world,
running experiments, and using statistics, not logic, to
analyze the results of the experiment.
Framing: Key ML
Terminology
• Label
• A label is the thing we're predicting—the y variable in
simple linear regression.
• already has an answer
• Feature
• A feature is an input variable — the x variable in simple
linear regression.
• Parameter types of data we already have
Framing: Key ML
Terminology
• Example
• An example is a particular instance of data, x. (We put x in boldface to
indicate that it is a vector.)
• labeled examples
• {features, label}: (x, y)
• train the model
• unlabeled examples
• {features, ?}: (x, ?)
• we want to predict
Descending into ML
• Linear Regression
Descending into ML
• Linear Regression
• find the closest linear relationship (prediction)
between x and y
• prediction could be defined as
Descending into ML
• - Loss
• a number indicating how bad the model's prediction was on a
single example
Descending into ML
• Loss Function
• Squared Loss (L2 loss)
• = the square of the difference between the label and the
prediction
•
•
• Mean Square Error (MSE)
• sum up all the L2 loss, and then divide by the number of examples
Reducing Loss
Reducing Loss
Reducing Loss
• An iterative trial-and-error approach to training a model
• start with an initial guess for the weights and bias
• iteratively adjusting those guesses
• until learning the weights and bias with the lowest
possible loss
• overall loss stops changing or at least changes
extremely slowly
• called the model has converged
Reducing Loss
• Gradient descent
• apply for the plots of loss vs weights are convex
Reducing Loss
Reducing Loss
• Gradient descent
• find a learning rate (a hyperparameter) large enough that gradient
descent converges efficiently, but not so large that it never converges
Reducing Loss
Reducing Loss
• batch
• the total number of examples you use to calculate the
gradient in a single iteration.
• small: computing ↓ noisy ↑; large: computing ↑ noisy ↓
• Stochastic gradient descent (SGD):one example (a
batch size of 1) per iteration
• Mini-batch stochastic gradient descent (mini-batch
SGD):10 and 1,000 examples
First Steps with TensorFlow
First Steps with TensorFlow
• TensorFlow Estimators
First Steps with TensorFlow
• Pandas
• deal with examples (input data, x) before being
put into TensorFlow
• data structure
• DataFrame - like examples, has 1↑ Series
• Series - like features,
First Steps with TensorFlow
• TensorFlow
• Build the First Model
• Tweak the Model Hyperparameters
First Steps with TensorFlow
• Build the First Model
• Define and Configure Feature
• Define the Target (y)
• Configure the LinearRegressor
• Define the Input Function
• Train the Model
• Evaluate the Model
First Steps with TensorFlow
• Define and Configure Feature
• Configure data type for TF’s feature column
• Categorical Data
• Numerical Data
First Steps with TensorFlow
• Define the Target (y)
First Steps with TensorFlow
• Configure the LinearRegressor
• apply gradient clipping via clip_gradients_by_norm
• ensures the magnitude of the gradients do not
become too large during training, which can cause
gradient descent to fail.
First Steps with TensorFlow
• Define the Input Function
• instructs TensorFlow how to preprocess the data, as well as
how to batch, shuffle, and repeat it during model training.
• convert our pandas feature data into a dict of NumPy
arrays.
• use the TensorFlow Dataset API to construct a dataset
object
• break data into batches of batch_size, to be repeated for
the specified number of epochs (num_epochs).
First Steps with TensorFlow
• Define the Input Function
First Steps with TensorFlow
• Train the Model
• call train() on our linear_regressor to train the model.
First Steps with TensorFlow
• Evaluate the Model
• compare max, min, mean value to Root Mean Squared
Error (RMSE)
First Steps with TensorFlow
• Tweak the Model Hyperparameters
• learning_rate, steps, batch_size, input_feature
• tips
• Lower learning rate
• Larger number of steps or batch size
QA
• 如何有效率地調整超參參數? 有什什麼業界常⽤用的經驗法則
• learning rate, steps, batch_size, input_feature
• 如何確定 RMSE 已經夠⼩小
• 如何決定每次 batch 完後,下⼀一次 batch 後的資料應該如何處理理
• batch size = 10 執⾏行行 10 次,跟 batch size = 20 執⾏行行 5 次,如何選擇?
• 假設我的 dataframe 的資料總數有 100 個
• ds.batch(batch_size).repeat(num_epochs) 且 shuffle 關掉的狀狀況下去執⾏行行的時候,如
果 batch_size * num_epochs 等於資料總數的話,就會⽤用到 dataframe 裡所有資料 嗎?
• 如果要做商業⽤用途,可能因為 Tensorflow 的 apache license 有什什麼限制?或是有其他應
該注意?如果⾃自⼰己⽤用開源程式架 Tensorflow ⽤用在商業⽤用途就完全免責?

Weitere ähnliche Inhalte

Was ist angesagt?

Overview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language ProcessingOverview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language Processingananth
 
New 2017 TCS Placement Pattern
New 2017 TCS Placement PatternNew 2017 TCS Placement Pattern
New 2017 TCS Placement PatternMayank Chandwani
 
Write programs to solve problems pascal programming
Write programs to solve problems   pascal programmingWrite programs to solve problems   pascal programming
Write programs to solve problems pascal programmingAnutthara Senanayake
 
PyData Global: Thrifty Machine Learning
PyData Global: Thrifty Machine LearningPyData Global: Thrifty Machine Learning
PyData Global: Thrifty Machine LearningRebecca Bilbro
 
Introduction to Deep Learning on Azure - Global Azure Bootcamp 2018
Introduction to Deep Learning on Azure - Global Azure Bootcamp 2018Introduction to Deep Learning on Azure - Global Azure Bootcamp 2018
Introduction to Deep Learning on Azure - Global Azure Bootcamp 2018Shashi Jeevan M. P.
 
Very Small Tutorial on Terrier 3.0 Retrieval Toolkit
Very Small Tutorial on Terrier 3.0 Retrieval ToolkitVery Small Tutorial on Terrier 3.0 Retrieval Toolkit
Very Small Tutorial on Terrier 3.0 Retrieval ToolkitKavita Ganesan
 
Narrative theory
Narrative theoryNarrative theory
Narrative theoryNINANC
 

Was ist angesagt? (8)

Overview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language ProcessingOverview of TensorFlow For Natural Language Processing
Overview of TensorFlow For Natural Language Processing
 
New 2017 TCS Placement Pattern
New 2017 TCS Placement PatternNew 2017 TCS Placement Pattern
New 2017 TCS Placement Pattern
 
Write programs to solve problems pascal programming
Write programs to solve problems   pascal programmingWrite programs to solve problems   pascal programming
Write programs to solve problems pascal programming
 
Android+TensorFlow
Android+TensorFlowAndroid+TensorFlow
Android+TensorFlow
 
PyData Global: Thrifty Machine Learning
PyData Global: Thrifty Machine LearningPyData Global: Thrifty Machine Learning
PyData Global: Thrifty Machine Learning
 
Introduction to Deep Learning on Azure - Global Azure Bootcamp 2018
Introduction to Deep Learning on Azure - Global Azure Bootcamp 2018Introduction to Deep Learning on Azure - Global Azure Bootcamp 2018
Introduction to Deep Learning on Azure - Global Azure Bootcamp 2018
 
Very Small Tutorial on Terrier 3.0 Retrieval Toolkit
Very Small Tutorial on Terrier 3.0 Retrieval ToolkitVery Small Tutorial on Terrier 3.0 Retrieval Toolkit
Very Small Tutorial on Terrier 3.0 Retrieval Toolkit
 
Narrative theory
Narrative theoryNarrative theory
Narrative theory
 

Ähnlich wie MLCC Schedule #1

MACHINE LEARNING YEAR DL SECOND PART.pptx
MACHINE LEARNING YEAR DL SECOND PART.pptxMACHINE LEARNING YEAR DL SECOND PART.pptx
MACHINE LEARNING YEAR DL SECOND PART.pptxNAGARAJANS68
 
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsMark Peng
 
machine learning workflow with data input.pptx
machine learning workflow with data input.pptxmachine learning workflow with data input.pptx
machine learning workflow with data input.pptxjasontseng19
 
Algorithm and C code related to data structure
Algorithm and C code related to data structureAlgorithm and C code related to data structure
Algorithm and C code related to data structureSelf-Employed
 
Deep Learning Introduction - WeCloudData
Deep Learning Introduction - WeCloudDataDeep Learning Introduction - WeCloudData
Deep Learning Introduction - WeCloudDataWeCloudData
 
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...
"A Framework for Developing Trading Models Based on Machine Learning" by Kris..."A Framework for Developing Trading Models Based on Machine Learning" by Kris...
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...Quantopian
 
Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Bo...
Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Bo...Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Bo...
Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Bo...WithTheBest
 
Regularization in deep learning
Regularization in deep learningRegularization in deep learning
Regularization in deep learningKien Le
 
classVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxclassVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxssusere336f4
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkIvo Andreev
 
Chapter1.1 Introduction.ppt
Chapter1.1 Introduction.pptChapter1.1 Introduction.ppt
Chapter1.1 Introduction.pptTekle12
 
Chapter1.1 Introduction to design and analysis of algorithm.ppt
Chapter1.1 Introduction to design and analysis of algorithm.pptChapter1.1 Introduction to design and analysis of algorithm.ppt
Chapter1.1 Introduction to design and analysis of algorithm.pptTekle12
 
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...Maninda Edirisooriya
 
Practical deep learning for computer vision
Practical deep learning for computer visionPractical deep learning for computer vision
Practical deep learning for computer visionEran Shlomo
 

Ähnlich wie MLCC Schedule #1 (20)

MACHINE LEARNING YEAR DL SECOND PART.pptx
MACHINE LEARNING YEAR DL SECOND PART.pptxMACHINE LEARNING YEAR DL SECOND PART.pptx
MACHINE LEARNING YEAR DL SECOND PART.pptx
 
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle Competitions
 
machine learning workflow with data input.pptx
machine learning workflow with data input.pptxmachine learning workflow with data input.pptx
machine learning workflow with data input.pptx
 
Regression ppt
Regression pptRegression ppt
Regression ppt
 
Algorithm and C code related to data structure
Algorithm and C code related to data structureAlgorithm and C code related to data structure
Algorithm and C code related to data structure
 
tensorflow.pptx
tensorflow.pptxtensorflow.pptx
tensorflow.pptx
 
Deep Learning Introduction - WeCloudData
Deep Learning Introduction - WeCloudDataDeep Learning Introduction - WeCloudData
Deep Learning Introduction - WeCloudData
 
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...
"A Framework for Developing Trading Models Based on Machine Learning" by Kris..."A Framework for Developing Trading Models Based on Machine Learning" by Kris...
"A Framework for Developing Trading Models Based on Machine Learning" by Kris...
 
Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Bo...
Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Bo...Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Bo...
Like-for-Like Comparisons of Machine Learning Algorithms - Dominik Dahlem, Bo...
 
Regularization in deep learning
Regularization in deep learningRegularization in deep learning
Regularization in deep learning
 
classVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxclassVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptx
 
Design pattern
Design patternDesign pattern
Design pattern
 
The Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it WorkThe Power of Auto ML and How Does it Work
The Power of Auto ML and How Does it Work
 
Chapter1.1 Introduction.ppt
Chapter1.1 Introduction.pptChapter1.1 Introduction.ppt
Chapter1.1 Introduction.ppt
 
Chapter1.1 Introduction to design and analysis of algorithm.ppt
Chapter1.1 Introduction to design and analysis of algorithm.pptChapter1.1 Introduction to design and analysis of algorithm.ppt
Chapter1.1 Introduction to design and analysis of algorithm.ppt
 
Mit6 094 iap10_lec01
Mit6 094 iap10_lec01Mit6 094 iap10_lec01
Mit6 094 iap10_lec01
 
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...
Lecture 7 - Bias, Variance and Regularization, a lecture in subject module St...
 
Practical deep learning for computer vision
Practical deep learning for computer visionPractical deep learning for computer vision
Practical deep learning for computer vision
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
 
Deep learning - a primer
Deep learning - a primerDeep learning - a primer
Deep learning - a primer
 

Kürzlich hochgeladen

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Kürzlich hochgeladen (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

MLCC Schedule #1

  • 1. MLCC Schedule #1 Bruce Lee ⼤大順
  • 2. Outline • Introduction to Machine Learning • Framing: Key ML Terminology • Descending into ML • Reducing Loss • First Steps with TF
  • 3. Introduction to Machine Learning • Reduce time programming • feed machine learning tool some examples, and get a more reliable program in a small fraction of the time. • Customize and scale products • To support multiple languages, you can collect data in that language and feeding it into the exact same machine learning model. • Complete seemingly "unprogrammable" tasks • ML lets you solve problems that you, as a programmer, have no idea how to do by hand, ex. recognize face
  • 4. Introduction to Machine Learning • Coding • We use assertions to prove properties of our program are correct. • ML • The focus shifts from a mathematical science to a natural science: • We're making observations about an uncertain world, running experiments, and using statistics, not logic, to analyze the results of the experiment.
  • 5. Framing: Key ML Terminology • Label • A label is the thing we're predicting—the y variable in simple linear regression. • already has an answer • Feature • A feature is an input variable — the x variable in simple linear regression. • Parameter types of data we already have
  • 6. Framing: Key ML Terminology • Example • An example is a particular instance of data, x. (We put x in boldface to indicate that it is a vector.) • labeled examples • {features, label}: (x, y) • train the model • unlabeled examples • {features, ?}: (x, ?) • we want to predict
  • 7. Descending into ML • Linear Regression
  • 8. Descending into ML • Linear Regression • find the closest linear relationship (prediction) between x and y • prediction could be defined as
  • 9. Descending into ML • - Loss • a number indicating how bad the model's prediction was on a single example
  • 10. Descending into ML • Loss Function • Squared Loss (L2 loss) • = the square of the difference between the label and the prediction • • • Mean Square Error (MSE) • sum up all the L2 loss, and then divide by the number of examples
  • 13. Reducing Loss • An iterative trial-and-error approach to training a model • start with an initial guess for the weights and bias • iteratively adjusting those guesses • until learning the weights and bias with the lowest possible loss • overall loss stops changing or at least changes extremely slowly • called the model has converged
  • 14. Reducing Loss • Gradient descent • apply for the plots of loss vs weights are convex
  • 16. Reducing Loss • Gradient descent • find a learning rate (a hyperparameter) large enough that gradient descent converges efficiently, but not so large that it never converges
  • 18. Reducing Loss • batch • the total number of examples you use to calculate the gradient in a single iteration. • small: computing ↓ noisy ↑; large: computing ↑ noisy ↓ • Stochastic gradient descent (SGD):one example (a batch size of 1) per iteration • Mini-batch stochastic gradient descent (mini-batch SGD):10 and 1,000 examples
  • 19. First Steps with TensorFlow
  • 20. First Steps with TensorFlow • TensorFlow Estimators
  • 21. First Steps with TensorFlow • Pandas • deal with examples (input data, x) before being put into TensorFlow • data structure • DataFrame - like examples, has 1↑ Series • Series - like features,
  • 22. First Steps with TensorFlow • TensorFlow • Build the First Model • Tweak the Model Hyperparameters
  • 23. First Steps with TensorFlow • Build the First Model • Define and Configure Feature • Define the Target (y) • Configure the LinearRegressor • Define the Input Function • Train the Model • Evaluate the Model
  • 24. First Steps with TensorFlow • Define and Configure Feature • Configure data type for TF’s feature column • Categorical Data • Numerical Data
  • 25. First Steps with TensorFlow • Define the Target (y)
  • 26. First Steps with TensorFlow • Configure the LinearRegressor • apply gradient clipping via clip_gradients_by_norm • ensures the magnitude of the gradients do not become too large during training, which can cause gradient descent to fail.
  • 27. First Steps with TensorFlow • Define the Input Function • instructs TensorFlow how to preprocess the data, as well as how to batch, shuffle, and repeat it during model training. • convert our pandas feature data into a dict of NumPy arrays. • use the TensorFlow Dataset API to construct a dataset object • break data into batches of batch_size, to be repeated for the specified number of epochs (num_epochs).
  • 28. First Steps with TensorFlow • Define the Input Function
  • 29. First Steps with TensorFlow • Train the Model • call train() on our linear_regressor to train the model.
  • 30. First Steps with TensorFlow • Evaluate the Model • compare max, min, mean value to Root Mean Squared Error (RMSE)
  • 31. First Steps with TensorFlow • Tweak the Model Hyperparameters • learning_rate, steps, batch_size, input_feature • tips • Lower learning rate • Larger number of steps or batch size
  • 32. QA • 如何有效率地調整超參參數? 有什什麼業界常⽤用的經驗法則 • learning rate, steps, batch_size, input_feature • 如何確定 RMSE 已經夠⼩小 • 如何決定每次 batch 完後,下⼀一次 batch 後的資料應該如何處理理 • batch size = 10 執⾏行行 10 次,跟 batch size = 20 執⾏行行 5 次,如何選擇? • 假設我的 dataframe 的資料總數有 100 個 • ds.batch(batch_size).repeat(num_epochs) 且 shuffle 關掉的狀狀況下去執⾏行行的時候,如 果 batch_size * num_epochs 等於資料總數的話,就會⽤用到 dataframe 裡所有資料 嗎? • 如果要做商業⽤用途,可能因為 Tensorflow 的 apache license 有什什麼限制?或是有其他應 該注意?如果⾃自⼰己⽤用開源程式架 Tensorflow ⽤用在商業⽤用途就完全免責?