Ai-900 2021
Ai-900 2021
Ai-900 2021
Fundamentals
Scott Duffy, Instructor
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
January 2021 Updates
Microsoft Azure AI Fundamentals
Speech Services
Language Services
Decision Services
AI-900 Microsoft Azure AI
Fundamentals
Scott Duffy, Instructor
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
What Do We Mean By “AI”?
The term “Artificial
Intelligence” has
been used to
describe many
things
Oxford Dictionary
artificial intelligence (noun)
/ˌärdəˈfiSHəl inˈteləjəns/
“the theory and development of computer systems able to perform tasks that
normally require human intelligence, such as visual perception, speech recognition,
decision-making, and translation between languages.”
Incorporating
human intelligence
into machines
Artificial General Intelligence
That robot or computer in the movies that can teach itself a new task.
“Call Carol.”
Machine Learning
The study of computer algorithms that improve automatically through experience.
Supervised learning - humans label the data and gives general guidance
Covers things like facial recognition, speech recognition and object recognition.
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Describe AI Workloads and
Considerations (15-20%)
Common AI Workloads
1. Prediction and Demand Forecasting
Prediction and Demand Forecasting
Prediction and Demand Forecasting
Using Machine Learning to Predict
● Give the machine all the relevant data you know
Chatbot: Yes, we have those. Do you want me to hold one aside for you?
User: Yes.
...
AI-900 Microsoft Azure AI
Fundamentals
Scott Duffy, Instructor
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Guiding Principles in AI
The prevalence of
AI causes some
ethical and moral
challenges
Unintended
consequences of
leaving important
decisions to a
computer
Unintended Consequences:
Decisions that are wrong
Decisions that are illegal (or at least, go against your own values)
The data is never bad. No fields have blanks. No fields have accented characters.
All connected systems are functional.
How does the military unmanned drone operate when the GPS is down?
How does the self-driving car operate when an object is approaching from the side
instead of the front or back?
Principle of Privacy and Security
Many countries and regions in the world are developing new standards and laws
to try to protect the data of its citizens. Laws are always slower than technology.
Six Principles Should Guide AI Development
● Fairness
● Reliability and safety
● Privacy and security
● Inclusiveness
● Transparency
● Accountability
Principle of Inclusiveness
How does a voice assistant work for someone who has a speech impediment?
How does a fitness tracker work for someone with a mobility disability?
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Describe fundamental principles
of machine learning on Azure (30-
35%)
Common Machine Learning
Types
Regression
A type of supervised learning
C) On a scale of 1-10, how happy is someone who makes $60,000 per year?
C) On a scale of 1-10, how happy is someone who makes $60,000 per year?
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Core Machine Learning Concepts
Feature is an input
variable
Label is the thing
we’re predicting
Features and Labels in a Dataset
Given a pile of data, you (data scientist) need to determine which bits are relevant
to make decisions on
● Experiment
● Domain knowledge
● Keep in mind the principles of AI
Examples of Data
● First and last name
● Smoker or non-smoker (feature)
● Date of birth (feature)
● Marital status (feature)
● Gender (feature)
● Annual income (feature?)
● Blood type
● Number of children
● …
● Life expectancy (label)
Training the Model
The more input (historical) data you have, the more accurate the results
Divide your available labelled data into training and validation/test datasets
Ie. 1,000,000 rows of data - 500K to train the model, 500K to test the model
Split the training
and validation
datasets randomly
Evaluate the Results - Regression
Use the validation dataset to test the model, and measure how close or far the
actual results are from the predicted results
Accuracy vs precision
AI-900 Microsoft Azure AI
Fundamentals
Scott Duffy, Instructor
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Core Machine Learning Tasks
Data ingestion and preparation
Steps
1. Load your data into Azure Storage from some other source
2. Clean up the data to remove low quality / bad data
3. Transform the data into useful / standard formats, intelligent defaults
4. Create a datastore in Azure ML to link to the data
5. Create a dataset in Azure ML to work with
a. File or table data
Feature selection is one of the core concepts and has a huge impact on the
performance of the model in ML
“The process of using domain knowledge to extract features from raw data via
data mining techniques.” - Wikipedia
Deciding what
features to create
Improving existing
features by
transforming them
Brainstorming and
iterating on the best
features to achieve
the desired result
Model training and evaluation
Providing an ML
algorithm with
training data to
learn from
AutoML - try all the
algorithms to see
what is the best one
ML Designer - you
choose the
algorithm to use
Model Training is...
The process by which a machine learning algorithm “learns”
You typically use a “test dataset” which is different than the “training dataset”
Compare the prediction made by the model with the actual result that you already
know
There are various ways to determine what is a good result and what is a bad result
Classification Model Metrics
Classification - Confusion Matrix
Classification - Confusion Matrix
Confusion Matrix
True Positive (TP) - you predicted true, and it’s actually true (OK)
True Negative (TN) - you predicted false, and it’s actually false (OK)
False Positive (FP) - you predicted true, and it’s actually false (oops)
False Negative (FN) - you predicted false, and it’s actually true (oops)
Classification - Confusion Matrix
Classification - Recall
Recall = TP / (TP + FN)
RMSE (Root Mean Squared Error) = the average error between observed and
predicted; (the square-root of the mean square error); lower is better
RSE (Residual Standard Error) = accounts for the number of predictors in the
model; lower is better; not much different than RMSE
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Capabilities of No-Code ML
Azure Machine Learning
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Describe features of computer
vision workloads on Azure
(15-20%)
Computer Vision Features
Image Classification
Car
Object Detection
Object Detection
Semantic Segmentation
Optical Character Recognition
Facial Detection and Recognition
AI-900 Microsoft Azure AI
Fundamentals
Scott Duffy, Instructor
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Computer Vision Tools
In Azure, you can
use Computer
Vision service,
or you can use
Cognitive Services
Cognitive Services
includes many
other services
under one umbrella
All services require
a KEY and an
ENDPOINT
Computer Vision Service
Pre-trained ML model
Detect faces
Text recognition
Custom Vision Service
A model that you can build and train
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Describe features of NLP
workloads on Azure (15-20%)
NLP Workload Scenarios
Understands
written and spoken
language
Key Phrase Extraction
Identifying the main points of a document; context
“When I was shovelling snow in my driveway earlier today, I cut my finger. It wasn’t a
deep cut, and I will be ok. But it’s a bit painful. Snow isn’t fun sometimes.”
- Shovelling snow
- Cut my finger
- I will be ok
- A bit painful
- Snow isn’t fun
Entity Recognition
Identifying “entities” of a document; items categorized by type and subtype
“When I was shovelling snow in my driveway earlier today, I cut my finger. It wasn’t a
deep cut, and I will be ok. But it’s a bit painful. Snow isn’t fun sometimes.”
Driveway - location
Can also return
links to wikipedia
for relevant entries
I.e. “snow”
Sentiment Analysis
Pre-built ML model
“I thought the steak here was awesome and the staff was super friendly.”
Vs
“The steak was tough and the service was a bit slow. Not a great experience”.
Language Modeling
Build your own dictionary for terms in your industry
Can detect when text has multiple languages and identify the predominant
language
1. Utterances
2. Entities
3. Intents
Language Understanding - Utterances
An example of something a user will say:
● Today (DateTime)
● You (subject)
Language Understanding - Intents
The purpose or goal expressed by the user
Goal: TodayHoursOfOperation
Language Understanding - Intents
Sometimes, there is no intent
Speech to text
Audio translation
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Describe features of
conversational AI workloads on
Azure (15-20%)
Conversational AI
allows a human and
a computer to talk
Typically called
agents, or bots
Azure Bots can
operate over the
web, email, social
media, and voice
Do You Know You’re Talking to a Bot?
Conversational AI Use Cases
Webchat Bots
● Appear on a website or social media app
Conversational banking
Personal Digital Assistants
OK Google - when is my next appointment?
Yo yo, Bing - tell Mom that I’ll be home this weekend from college
Conversational AI Services
QnA Maker Service
Automatically build a chat bot based on any semi-structured source
● Your website
● FAQ
● Product manuals
● etc
Azure Bot Service
Enterprise-grade chat bots
© 2021 Scott Duffy, softwarearchitect.ca… get the course for these slides at:
http://sjd.ca/ai900
Thank you and best of luck!