0% found this document useful (0 votes)
88 views78 pages

Course Presentation AI 900 AzureAIFundamentals

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views78 pages

Course Presentation AI 900 AzureAIFundamentals

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

AI-900

Azure AI Fundamentals

1
Getting Started

Azure has 200+ services. Exam expects you to understand 20+ services related
to AI.
Exam tests your AI fundamentals and decision making abilities:
Which AI/ML service do you choose in which situation?
This course is designed to help you make these choices
Our Goal : Help you get certified and start your journey with Azure and AI

2
Our Approach
Three-pronged approach to
reinforce concepts:
Presentations (Video)
Demos (Video)
Two kinds of quizzes:
Text quizzes
Video quizzes

(Recommended) Take your


time. Do not hesitate to replay
videos!
(Recommended) Have Fun!

3
4
Artificial Intelligence

5
Artificial Intelligence - All around you

Self-driving cars
Spam Filters
Email Classification
Fraud Detection

6
What is AI? (Oxford Dictionary)
The theory and development of
computer systems able to perform
tasks normally requiring human
intelligence, such as visual
perception, speech recognition,
decision-making, and translation
between languages

7
Understanding Types of AI
Strong artificial intelligence (or general AI):
Intelligence of machine = Intelligence of human
A machine that can solve problems, learn, and plan for the
future
An expert at everything (including learning to play all sports and
games!)
Learns like a child, building on it's own experiences
We are far away from achieving this! (Estimates: few decades to
never)
Narrow AI (or weak AI): Focuses on specific task
Examples: Self-driving cars and virtual assistants
Machine learning: Learn from data (examples)

8
Exploring Machine Learning Examples
Identifying objects from images
https://azure.microsoft.com/en-in/products/ai-
services/ai-vision
Alpha Go
House Price Calculation

9
Exploring Machine Learning vs Traditional Programming
Traditional Programming: Based on Rules
IF this DO that
Example: Predict price of a home
Design an algorithm taking all factors into consideration:
Location, Home size, Age, Condition, Market, Economy etc

Machine Learning: Learning from Examples


(NOT Rules)
Give millions of examples
Create a Model
Use the model to make predictions!
Challenges:
No of examples needed
Availability of skilled personnel
Complexity in implementing MLOps

10
What you will learn?
Three approaches to building AI solutions in Azure
Use Pre-Trained Models: Azure Cognitive Services (Azure AI
Services)
Get intelligence from text, images, audio, video
Build simple models: Without needing data scientists
Limited/no-code experience
Example: Custom Vision (Azure AI Vision)
Example: Azure Machine Learning
Automated machine learning

Build complex models: Using data scientists and team


Build Your Own ML Models from ZERO (code-experienced)
Example: Using Azure Machine Learning

Use AI with caution!


Challenges, risks and principles

11
Machine Learning Fundamentals - Scenarios
Scenario Solution

Categorize: Building a computer system as intelligent as a Strong AI


human. An expert at everything (all sports and games!)

Categorize: Building a computer system that focuses on Narrow AI (or weak AI)
specific task (Self-driving cars, virtual assistants, object
detection from images)

Category of AI that focuses on learning from data (examples) Machine learning

How is ML different from traditional programming? Traditional Programming: Rules. Machine


Learning: Examples

Which Azure service helps you use Pre-Trained Models? Azure Cognitive Services (Azure AI Services)

Which Azure services helps you build simple models without Azure Machine Learning(Automated machine
needing data scientists or AI/ML skills? learning), Custom Vision (Azure AI Vision)

Which Azure service helps you build complex ML models? Azure Machine Learning

12
Different Types of AI Workloads
Example AI Workload Type

Filtering inappropriate content on social media; Recommending products based Content Moderation &
on user history; Adjusting website content based on user preferences Personalization

Facial recognition systems; Self-driving car navigation systems; Object detection Computer Vision
in surveillance videos; Augmented reality applications Workloads

Language translation services; Voice recognition and response systems; Natural Language
Sentiment analysis in customer feedback; Processing Workloads

Analyzing large datasets to uncover trends; Extracting useful information from Knowledge Mining
unstructured data; Mining customer data for insights; Predictive analytics in Workloads
business intelligence

Automated invoice processing; Resume parsing for recruitment; Document Document Intelligence
classification and archiving; Data extraction from legal documents Workloads

Creating new images or text based on learned patterns; AI-generated music or Generative AI Workloads
art; Automated content generation for social media;

13
Pre-Trained Models (APIs)

14
Exploring Pre-Trained Models - Azure AI Services
Azure AI Services - "bring AI within reach of
every developer"
AI without building custom models
Does NOT need machine-learning expertise
Exposed as APIs
Help programs see, hear, speak, search,
understand (just like humans):
Get intelligence from:
Images/videos: Azure AI vision, Azure AI Vision, Azure AI
Document Intelligence
Text: Azure AI Language, Translator Text, Text-to-Speech API
Audio :Speech-to-Text API, Language Understanding Intelligent
Service - LUIS
Others:
Conversations (QnA Maker, Azure Bot Service)

15
Cognitive Services renamed to Azure AI Services (& others)
Azure Cognitive Search has been renamed to Azure AI Search
Custom Vision is renamed to Azure AI Vision
Face Service is renamed to Azure AI Face detection
Form Recognizer is now Azure AI Document Intelligence!
Speech Service is now Azure AI Speech Service!
Translator Service is now Azure AI Translator Service!
Key things to remember:
There are no changes to pricing
The name Cognitive Services will continue to be used in Azure billing, cost
analysis, price list, and price APIs
There are no breaking changes to application programming interfaces
(APIs) or SDKs

16
Exploring Vision Related APIs
Vision: Get intelligence from videos & images
https://portal.vision.cognitive.azure.com/demo/dense-
captioning
https://portal.vision.cognitive.azure.com/demo/face-
detection
https://portal.vision.cognitive.azure.com/demo/video-
summary-and-frame-locator

Identify & analyze content within images &


video
Important APIs:
Computer Vision - Analyze content in images & videos
Face API - Detect & identify people in images
Custom Vision - Customize image recognition to fit
your business

17
Exploring Vision - Some Terminology
Image analysis: Extract tags from image
Create text description about an image
Image classification: Classify image into
different groups
Object detection: Identify objects in image
For each object:
class of object, confidence level, coordinates of a bounding box
Goes deeper than image classification
Face detection: Detect human faces
Face detection and analysis: Security, tag friends on
facebook, Identity validation
Optical character recognition (OCR): Detect
text in images (license plates, invoices etc)

18
Getting started with Computer Vision API
Computer Vision API: Process images and return information
Docs: https://centralus.dev.cognitive.microsoft.com/docs/services/
Analyze Image: Extract visual features from image content:
Can you describe the image? (description/caption)?
Can you categorize the image? (tags)
What is in the image?
objects/faces/celebrities/monuments with box co-ordinates

What type of image is it? (clip art/line drawing)


What kind of color scheme is used in the image?
Does an image have mature content?
Simple Operations:
Describe Image: Can you describe the image? (description/caption - multiple)
Detect Objects: Performs object detection on the specified image
Recognize Domain Specific Content: Identify celebrities, landmarks
Tag Image: Generates a list of words, or tags relevant to a image

Get Area of Interest: most important area of the image


Get Thumbnail: Generates a thumbnail image (user-specified width and height)

19
Understanding Computer Vision API - OCR Operations
OCR: Simple OCR (detects text in an image)
Quick extraction of small amounts of text (immediate
results)
Result: Lines > Words (each with bounding box
coordinates)
Read: Perform OCR on complex documents
Optimized for text-heavy images OR multi-page
documents OR documents with multiple languages
Executes asynchronously
Additional call to get the result
Result: Pages> Lines > Words (each with bounding box
coordinates)

20
Getting Started with Face API
Face API: Advanced Face detection:
Age, Emotion, Glasses, Hair, Makeup
Detect human faces, find similar faces, match face with a group ..
Demo: https://portal.vision.cognitive.azure.com/demo/face-detection
(Remember) Improve accuracy of face identification:
Quality of images (Higher face image quality)
Recommendations: frontal, clear, and face size - 200x200 pixels or bigger
Variety of images: From diff. angles in variety of lighting setups
Important concepts:
FaceList (up to 1K faces) & LargeFaceList (up to 1M faces)
PersonGroup (up to 1K persons) & LargePersonGroup (up to 1M
persons)
Each person can have multiple face images

21
Understanding Face API Operations
Detect: Detect human faces (box co-ordinates)
Options to request for age, gender, headPose, smile, facialHair,
glasses, emotion, hair, makeup, occlusion, accessories, blur,
exposure, noise and mask details
Up to 100 faces in an image
Find Similar: Find similar faces (Find images of this
specific person)
Input 1: Image to match for (faceId)
Input 2: Images to match against (faceId array or FaceListId or
LargeFaceListId)
Output: Array of the most similar faces [along with confidence]

22
Understanding Face API Operations - 2
Group: Divide candidate faces (3-1000) into groups based on face similarity
Input: faceIds
Output: Matching groups of faceIds
Identify: 1-to-many identification
Find closest matches of the specific query person face.
Input 1: Image to match for (faceId)
Input 2: Images to match against (faceId array or FaceListId or LargeFaceListId)
Output: Person candidates for that face (ranked by confidence)

Verify: Two things you can do


Do two faces belong to same person?
Input: faceId1 vs faceId2
Does a face belong to a specific person?
Input: faceId vs (personId in a (personGroupId OR largePersonGroupId) )
Output: { "isIdentical": true, "confidence": 0.9}

23
Exploring Form Recognizer API
Form Recognizer: Get intelligence from scanned
forms
Extract information from forms & images
DEMO: https://documentintelligence.ai.azure.com/studio
Make sure to login into Azure

Operations (over pdf or image):


Analyze Business Card (Get Analyze Business Card Result)
Analyze ID Document
Analyze Invoice
Analyze Receipt
Custom Form: Design & extract key-value pairs, tables, and
semantic values from custom documents - pdf or image

24
Azure AI Services - Vision - Scenarios
Scenario Solution

Recommend Service: Detect and identify people and Face API


emotions in images

Recommend Service: Extract visual features from Computer Vision API (Azure AI Vision)
image content (description/tags)

Recommend Service: Get intelligence from scanned Form Recognizer API (Azure AI Document
forms Intelligence)

When do you use Read operation to perform OCR? Text-heavy images OR multi-page documents OR
documents with multiple languages

How can you improve accuracy of face identification? Images - frontal, clear, and face size - 200x200 pixels
or bigger.
Variety of images: From diff. angles in variety of
lighting setups

25
Azure AI Services - Face API - Scenarios
Scenario Solution

Recommend Face API Operation: Divide candidate faces (3-1000) into groups based on face Group
similarity (Do all the faces belong to a group?)

Recommend Face API Operation: Find closest matches of the specific query person face in a Identify
group

Recommend Face API Operation: Do two faces belong to same person? Verify

Recommend Face API Operation: Does a face belong to a specific person? Verify

26
Exploring Search APIs (Bing)
Web Search API: Execute web
search using API
Image Search API: search for
relevant images
News Search API: search for
relevant news articles
Visual Search API: search based
on an image

27
Azure AI Services - Natural Language Processing
Get intelligence from a conversation, speech or
written text in human languages
Language: Extract meaning from unstructured text
Text analytics: Detect sentiment, key phrases and named entities.
https://language.cognitive.azure.com/tryout/namedEntities
https://language.cognitive.azure.com/tryout/keyPhrases

Translator: Translate to/from 90 languages


Speech: Integrate speech into apps and services
Speech service: Speech to text, Text to speech, Translation and Speaker
recognition
Build Conversations:
QnA maker: Conversational question and answer layer
LUIS: Language Understanding Intelligent Service
Understands spoken (and text) commands
Get info from users natural language utterances
Examples: Book me a flight to Cairo, Order me 2 pizzas

DEMO: https://www.luis.ai/

28
Exploring Text Analytics API
Text Analytics: Natural language processing (NLP)
Demo: https://azure.microsoft.com/en-in/services/cognitive-
services/text-analytics/#overview
Sentiment analysis, key phrase extraction & language detection
Operations:
Detect Language
Language Name,ISO 6391 Code, Score (NaN-ambiguous)
Entities containing personal information: returns a list of entities with
personal information ("SSN", "Bank Account" etc) in the document
Key Phrases: returns a list of strings denoting the key phrases
Example: Summarize a document
Named Entity Recognition: list of general named entities in a given
document
Person, Location, Organization, Quantity, DateTime, URL, Phone Number, IP Address etc
Sentiment: detailed sentiment analysis
positive/negative review - example: 0.1(negative), 0.9(positive)

29
Exploring Translator and Speech API
Translator Text API: text-to-text translation
One FROM language with multiple TO languages (example: en to
fr, de)
API involving Speech:
Speech-to-Text API: Real-time & Batch transcription (speech
recognition)
Demo: https://azure.microsoft.com/en-us/products/ai-services/speech-to-text
Text-to-Speech API: Speech synthesis
Demo: https://azure.microsoft.com/en-in/products/ai-services/text-to-speech/
Translation: Speech-to-Text and Speech-to-Speech API
Demo: https://azure.microsoft.com/en-in/products/ai-services/speech-translation/

30
Getting Started with Conversational AI
Software that can carry a conversation like humans (Talk with
humans like a human)
Demo: https://www.microsoft.com/en-us/research/project/health-
bot/ (I have fever)
Use cases: Customer support, Reservations, Automation
Services:
QnA Maker: Convert your FAQ into a Q&A Bot
You need a knowledge base (cannot talk to db)
Azure Bot Service: Build your own bots
Enable multiple conversation channels
Channels: Alexa, Office 365 email, Facebook, Microsoft Teams, Skype, Slack, Telegram ....

Recommended Architecture: QnA Maker service + Azure Bot Service

31
Exploring LUIS: Language Understanding Intelligent Service
Understands spoken (and text) commands
Get info from users natural language utterances
Book me a flight to Cairo
Order me 2 pizzas
Demo 1: https://aidemos.microsoft.com/luis/demo
Demo 2
Demo 3: https://www.luis.ai
Detects:
Intents (FoodOrder, BookFlight) and
Entities (Pizzas, Cairo)
Integrate with Azure Bot Services for an end-to-end
conversational solution

32
Azure AI Services - NLP - Scenarios
Scenario Solution

Categorize: Get intelligence from a conversation, speech or written text in Natural Language
human languages Processing

Recommend Service: Detect sentiment, key phrases and named entities from Text Analytics API
text

Recommend Service: Detect Key Phrases from a document Text Analytics API

Recommend Service: Perform text-to-text translation Translator Text API

Recommend Service: Speech recognition Speech-to-Text API

Recommend Service: Speech synthesis Text-to-Speech API

33
Azure AI Services - NLP - Scenarios - 2
Scenario Solution

Recommend Service: Translate speech in one language to text in Speech-to-Text


another

Categorize: Software that can carry a conversation like humans Conversational AI

Recommend Service: Convert your FAQ into a Question and Answer QnA Maker
REST API

Recommend Service: Build a chat bot to answer questions from QnA Maker service + Azure Bot Service
your knowledge base

QnA Maker service: Can you directly connect QnA Maker service to No. You need to import the question
a database or an external system? and answers first.

Recommend Service: Understands spoken (and text) commands LUIS: Language Understanding
(Get intent and entities) Intelligent Service

Recommend Service: Perform sentiment analysis on reviews Text Analytics API


posted on a website

34
Understanding Decision Services: Make smarter decisions
Anomaly Detector: Find anomalies
Unusual actions, behavior or errors
Batch or real-time
Example Usecases:
Find Fraud
Unusual transactions on a credit card
Defective parts
Demo:https://centralus.dev.cognitive.microsoft.com/docs/services/AnomalyDetector

Content moderator: Detect unwanted content


Image, Text (PII, custom list) & Video moderation
Returns content assessment results to your systems
You can use this information to take decisions
Take content down, send to human judge ..

Examples APIs:
Image-Evaluate: Returns probabilities of image having racy or adult content
Text-Screen: Profanity scan in 100+ languages (custom & shared blacklists)

35
Azure AI Services - Decision Services and Others
Scenario Solution

Recommend Service: Unusual actions, Anomaly Detector


behavior or errors (Unusual transactions on a
credit card or Fraud)

Recommend Service: Detect unwanted content Content moderator


(text, image or video)

Recommend Service: Perform profanity scan Content moderator


on reviews posted on a website

Access multiple Azure Cognitive Services with a Cognitive Services Multi-service account
single key and endpoint

What do you need to invoke a Cognitive Endpoint (the HTTP address at which your service is hosted)
Service API? and key (a secret value used by client applications to
authenticate themselves)

36
Generative AI with Azure

37
Playing with ChatGPT
ChatGPT: OpenAI's Generative AI
Chatbot!
A Demo of ChatGPT:
You are Lex Friedman. You are going to
interview Sachin Tendulkar tomorrow. What
are the FIRST FIVE questions that you are
going to ask?
Act as Sachin Tendulkar. You are meeting
Roger Federer. What questions would you
ask?
Generate a bulleted list of items I need for
an 15 day Everest Base Camp trek
I will be staying in tea houses on the trek. Can you
update the list?

38
Playing with ChatGPT - Coding, Learning and Design
Write a Python function to determine if a year
is a leap year
I'm learning Python for loop. Give me a few
exercises to try?
Can you design a REST API for todos? Give me
an example request and response for each.
I want to store information about courses,
students, enrollments and reviews in a
relational table. Can you suggest a structure?
I like learning concepts using a lot of
examples. What would be the books you
would recommend to learn Design Patterns?

39
Playing with ChatGPT - Exploring Technology
Can you make list of Top 10 technologies that
I might want to learn as a cloud engineer?
For a new project, I'm considering React and
Angular as front end frameworks.
Can you compare them and present the results in a
tabular format? Feature/Factor in the column and the
framework in the row.
I like to learn in a step-by-step approach by
breaking down complex concepts into smaller,
more manageable parts.
How can I learn Docker? Give me a list of 10 step by
step exercises I can begin with. Make sure you order
them in increasing order of difficulty. Present the
results in a table.

40
Generative AI - How is it different?
Artificial Intelligence:
Create machines that
can simulate human-like
intelligence and
behavior
Machine Learning: Learning
from examples
Generative AI: Learning from
examples to create new content

41
Generative AI - Generating New Content
Goal: Generating New Content
Instead of making predictions, Generative AI
focuses on creating new data samples
Examples:
Text Generation: Writing e-mails, essays & poems.
Generating ideas.
Writing Code: Write, debug & analyze programs
Images Generation: Creating paintings, drawings, or
other forms of images

How else is Generative AI different?


Let's find out!

42
Generative AI - Needs Huge Volumes of Data
Generative AI models: Statistical models that
learn to generate new data by analyzing
existing data
More data analyzed => Better new data similar to
existing data
Example: GPT-3 model was trained on a dataset of 500
billion words of text
Datasets used include:
Images, text and code scraped from the open web:
Wikipedia
Books
Open source code (syntax of programming languages and the
semantics of code)
Conversations

43
Generative AI - Uses Self Supervised Learning
Self-supervised learning: Model learns from the data itself
WITHOUT requiring explicit labels or annotations
How does this work?
Example for text model:
1: Model tries to predict next word based on preceding words:
Model is given example sentence: "The sun is shining and the sky is __."
Model predicts the missing word
2: Model's predicted word is compared to the actual word that comes next:
Learns from its mistakes and adjusts its internal representations
Neural Networks, Loss Calculation, Backpropagation etc..

3: Repeated for all text from training dataset


Model captures the relationships between words, contextual cues, and
semantic meanings:
If prompted with "The sun is shining and the sky is," the model might generate:
"The sun is shining and the sky is clear."
"The sun is shining and the sky is blue."
"The sun is shining and the sky is filled -- with fluffy clouds."

44
Understanding Deep Learning
How does learning in Generative AI happen?
Generative AI makes use of Deep Learning
Let's consider an example:
Young artists learn by studying styles and techniques
from different art pieces
With practice, they become proficient enough to
create their own unique pieces
Deep learning: Approach where a computer
program learns from a large amount of data
Starts by understanding simple patterns
With time, it learns to recognize complex patterns
Using the skills learned through deep learning,
Generative AI can generate new content, whether it's
images, music, or text

45
Understanding Loss Function
Let's consider an example:
Imagine you're teaching someone to paint
You give them feedback on their work:
You tell them what's good and what needs improvement
The loss function in deep learning is like this feedback
How far off is the current output of a model from the desired
result?
Goal of a deep learning system: Minimize the 'loss'

In Simple Terms: The loss function is a score


that tells us how well the AI is performing
A lower score => AI's output is close to what we want
A high score => it's far from the target
AI's goal: Adjust and learn in a way that this
score (Loss) gets lower over time

46
Getting Started with Azure OpenAI API
Azure OpenAI API: Integrate Generative AI
into your apps
Understand and generate natural language and code
Generate and edit images
Convert speech into text
Fine tune models
Models:
gpt-4, gpt-3.5-turbo, dall-e, ..
Demo:
https://learn.microsoft.com/en-us/azure/ai-
services/openai/quickstart

47
Building ML Models

48
Custom Vision (Azure AI Vision)
Custom Vision (Azure AI Vision): Create custom
models using your own images
Project Types
Classification: Predict labels for an image
Two Classification Types
1: Multilabel (Multiple tags per image)
2: Multiclass (Single tag per image)

Object Detection: Returns coordinates of objects in an image

Best Practices:
Pick the domain closest to your scenario
Different domains are available for Classification and Object
Detection projects!
Sufficient images (Add more images to improve accuracy)
From different angles

49
Understanding Machine Learning
Traditional Programming:
Based on Rules
Machine Learning: Learning
from Examples

50
Creating Machine Learning Models - Features and Labels
Goal of Machine Learning: Create a Good Model
Give inputs to a model
Model returns the prediction
Inputs are called Features
Predication is called Label

Example: House Price Prediction Model


Label: price
Features:
area: Total area of house (m^2)
rooms: No. of rooms
bedrooms: No. of bedrooms
furniture: Is it furnished?
floor: Which floor?
age: How many years?
balcony: has balcony or not

51
Creating ML Models - Features and Labels - Examples
Used Car Price Prediction Model
Label: price
Features: manufacturer, year, model, age, condition, cylinders,
location
Spam Email Classification Model
Label: isSpam
Features: sender, subject, content
Grant a Loan Model
Label: shouldWeGrantALoan
Features: doesOwnCar, doesOwnRealEstate, creditScore,
isMarried, doesHaveChildren, totalIncome, totalCredit

52
Creating ML Models - Choosing Technique
Supervised Learning: Features & Label
Label is a numeric value with a range of possibilities =>
Regression
Example: Used Car Price Prediction, House Price Calculation, Predicting sea
level, Predicting no of vehicles that use a specific high way
How much will it rain tomorrow?
Label has limited set of possibilities (YES or NO, 0 or 1, Type 1 or
Type 2 or Type 3) => Classification
Spam Email, Grant a Loan, Determine the type of cloud
Will it rain today?
Summary: Supervised machine learning models
Classification: Predicting category
Regression: Predicting numeric value

Unsupervised Learning: No Label


Clustering: Divide customers into groups
Group similar entities based on their features

53
Machine Learning Fundametals - Scenarios
Scenario Solution

Categorize into features and labels for house price prediction: price, area, price is label. Others can
rooms, age be features

Categorize into features and label for used vehicle price prediction: price is label. Others can
manufacturer, year, model, age, condition, cylinders, location, price be features

Categorize: Used Car Price Prediction Regression

Categorize: Spam Email Identification Classification

Categorize: Predict amount of rainfall in the next year Regression

Categorize: Should we grant a loan? Classification

Categorize: Identify the type of vehicle in an image Classification

Categorize: Find a specific dance form in a video Classification

Categorize: Divide customers into groups Clustering

54
Creating Machine Learning Models - Steps
1: Obtain Data
2: Clean Data
3: Feature Engineering: Identify Features and Label
4: Create a Model using the Dataset and the ML
algorithm
5: Evaluate the accuracy of the model
6: Deploy the model for use

55
Understanding Machine Learning Terminology
Process
Training: The process of creating a model
Evaluation: Is the model working?
Inference: Using model to do predictions in production
Dataset: Data used to create, validate & test the model
Features: Inputs
Label: Output/Prediction
Dataset Types
Training Dataset: Dataset used to create a model
Validation Dataset: Dataset used to validate the model (and choose the right
algorithm) - Model Evaluation
Testing Dataset: Dataset used to do final testing before deployment

56
ML Stages and Terminology - Scenarios
Scenario Solution

Determine Stage: You remove data having null values from your dataset Clean Data (Data Preparation)

Determine Stage: Normalize or split data into multiple features Feature Engineering

Determine Stage: You evaluate the accuracy metrics of a model Model Evaluation

Terminology: Using model to do predictions in production Inference

Terminology: The process of creating a model Training

Terminology: Dataset used to (train) or create a model Training Dataset

Terminology: Dataset used to evaluate a model Validation Dataset

Terminology: Dataset used to do final testing before deployment Testing Dataset

57
Azure Machine Learning
Azure Machine Learning: Simplifies creation of your models
Manage data, code, compute, models etc
Prepare data
Train models
Publish models
Monitor models
Multiple options to create models
Automated machine learning: Build custom models with minimum ML
expertise
Azure Machine Learning designer: Enables no-code development of
models
Build Your Own Models: Data Scientists
Data and compute management, pipelines

58
Sample Pipeline - Classification

59
Sample Pipeline - Regression

60
Model Evaluation - Regression Models
Mean Absolute Error (MAE): How close is a prediction to
actual value?
Lower the better
Mean Squared Error (MSE): Average of squares of the distance
between actual and predicted
When you want to penalize large prediction errors (housing value
predictions)
Lower the better
Alternative:
Root Mean Squared Error: Square root of Root of MSE
Lower the better

61
Model Evaluation - Classification Models
Terminology:
Predicted label: What's predicated?
True label: What's expected?
Confusion matrix: Matrix matching predicted label vs true label
Different usecases have different needs:
Examples: Spam, fraud, sick patient detection
Metrics:
Accuracy: Proportion of accurate results to total cases
Precision: (True Positive)/ (True Positive + False Positive)
Recall: (True Positive)/ (True Positive + False Negative)
F1 Score: 2 ( (Precision Recall) / (Precision + Recall) )
When you need balance between Precision and Recall

62
ML Model Evaluation - Scenarios
Scenario Solution

Model Evaluation Terminology: What's Predicted label


predicated?

Model Evaluation Terminology: What's expected? True label

Model Evaluation Terminology: Matrix matching Confusion matrix


predicted label vs true label

Model Evaluation metrics for Classification Accuracy, Precision, Recall, F1 Score

Model Evaluation metrics for Regression Mean Absolute Error (MAE), Mean Squared Error (MSE),
Root Mean Squared Error(RMSE)

63
Azure Machine Learning - Terminology
Studio: Website for Azure Machine Learning
Workspace: Top-level resource for Azure Machine Learning
Azure Machine Learning designer: drag-and-drop interface to create your ML workflows
(Canvas)
Pipelines: Reusable workflows (training and re-training)
Datasets: Manage your data
Module: An algorithm to run on your data
Data preparation: Data Transformation, Feature Selection
Machine learning algorithms: Regression, Classification, Clustering
Building and evaluating models: Model Training, Model Scoring and Evaluation
Compute:
Compute Instances: Development machines (CPU or GPU instances) for data engineers and data scientists
Pre-configured with tools such as Jupyter,ML packages etc

Compute Clusters: Training machines


Single or multi node compute cluster for your training

Inference Clusters: Deployment machines


Deploy your model to Azure Kubernetes Service or Azure Container Instances

Attached Compute: Use HDInsight cluster, a Virtual Machine, or a Databricks cluster as target for Azure Machine Learning workspace

64
Building Custom ML Models in Azure - Scenarios
Scenario Solution

Recommend Service: Create custom models using your own images Custom Vision (Azure AI Vision
service)

Terminology: Website for Azure Machine Learning Azure Machine Learning Studio

Drag-and-drop interface to create your ML workflows Azure Machine Learning designer

Reusable workflows (training and re-training) Pipelines

Data used for training Dataset

What are the components that can be dragged on to canvas to build a Modules
pipeline?

What are training machines for Azure Machine Learning called? Compute Clusters

65
Building Custom ML Models in Azure - Scenarios - 2
Scenario Solution

What are deployment machines for Azure Machine Inference Clusters


Learning called?

Why do you split data when you build a ML model? To use a part of training and rest of data for
validation of model

How can you consume an Azure Machine Learning model? Publish it and access it as a web service (REST
API endpoint)

Languages popularly used with ML Python and R

Store and version your models. Organize and keep track of Model registration
your trained models.

66
Most important AI
considerations

67
Challenges in Building AI Solutions
Importance of Datasets
What if the data has a bias? (Bias can affect results)
(Solutions may not work for everyone)
Obtaining data
Evolving field
What if an AI system causes errors?
Accident made by a self driving car
Errors may cause harm

Scarcity of skills (Data Scientists, ...)


ML lifecycle (MLOps)
Security (What if the data used to build the model is exposed?)
Explainability of model (Users must trust a complex system)
Who will face the consequences?
Who's liable for AI-driven decisions?

68
Responsible AI Principles
AI without unintended negative consequences:
1: Fairness - Fair to all groups of people
"System's decisions don't discriminate or run a gender, race, sexual orientation, or
religion bias toward a group or individual"
Data should reflect diversity, Model should evolve with time

2: Reliability and safety - Continues working under high loads,


unexpected situations etc
What happens in bad weather? What if GPS is down? What happens if data is bad?
Test, Test and Test

3: Privacy and security - Of people and data! (information and controls)


Important consideration from day ZERO!
4: Inclusiveness - Nobody left out
Violation: Leaving out a certain group of people (ex: people with disabilities)
5: Transparency - Explainability, debuggability
Clear explanation to users
6: Accountability - Meets ethical and legal standards
AI is NOT the final decision maker An enterprise a team or a person is

69
AI considerations - Scenarios
Scenario Solution

Identify violated principle: You find that a ML model does not grant loans to people of Fairness
certain gender

Identify violated principle: More accidents caused by a self driving car in bad weather Reliability and
Safety

Identify related principle: Securing data used to create the model Privacy and
security

Identify related principle: Making sure that the dataset used does not have any errors Reliability and
(missing values etc) Safety

Identify violated principle: People with disabilities cannot use a specific AI solution Inclusiveness

70
AI considerations - Scenarios - 2
Scenario Solution

Identify related principle: Giving your customers control/choice over the data that is Privacy and
used by your AI system security

Identify related principle: Ensuring that an AI system works reliably under unexpected Reliability and
situation Safety

Identify violated principle: You do not know how a AI system reached a specific Transparency
inference

Identify related principle: Ensuring that there is sufficient information to debug Transparency
problems with an AI system

Identify related principle: Having a team that can override decision made by an AI Accountability
system

71
Get Ready

72
Certification Exam
Certification Home Page
https://docs.microsoft.com/en-gb/learn/certifications/exams/AI-900

Different Types of Multiple Choice Questions


Type 1 : Single Answer - 2/3/4 options and 1 right answer
Type 2 : Multiple Answer - 5 (or more) options and 2 (or more) right answers
No penalty for wrong answers
Feel free to guess if you do not know the answer
40 questions and 60 minutes
Should be a pretty easy exam
Mark questions for future consideration and review them before final submission
Result immediately shown after exam completion
Email with detailed scores (a couple of days later)

73
You are all set!

74
Let's clap for you!
Congratulations
You have put your best foot forward to become
Microsoft Certified: Azure AI Fundamentals
Make sure you prepare well and
Good Luck!

75
Do Not Forget!
Recommend the course to your friends!
Do not forget to review!
Your Success = My Success
Share your success story with me on LinkedIn (Ranga
Karanam)
Share your success story and lessons learnt in Q&A with other
learners!

76
What Next?

77
78

You might also like