Aritificial - Intelligence Complete Notes
Aritificial - Intelligence Complete Notes
In today's world, technology is growing very fast, and we are getting in touch with
different new technologies day by day.
Here, one of the booming technologies of computer science is Artificial Intelligence which is
ready to create a new revolution in the world by making intelligent machines. The Artificial
Intelligence is now all around us. It is currently working with a variety of subfields, ranging from
general to specific, such as self-driving cars, playing chess, proving theorems, playing music,
Painting, etc.
AI is one of the fascinating and universal fields of Computer science which has a great
scope in future. AI holds a tendency to cause a machine to work as a human.
Artificial Intelligence is composed of two words Artificial and Intelligence, where Artificial defines
"man-made," and intelligence defines "thinking power", hence AI means "a man-made thinking
power."
Microsoft accmsount 1
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
to make decisions."
Artificial Intelligence exists when a machine can have human based skills such as
learning, reasoning, and solving problems
With Artificial Intelligence you do not need to preprogram a machine to do some work,
despite that you can create a machine with programmed algorithms which can work with
own intelligence, and that is the awesomeness of AI.
IMPORTANCE OF AI:
o With the help of AI, you can create such software or devices which can solve real-world
problems very easily and with accuracy such as health issues, marketing, traffic issues,
etc.
o With the help of AI, you can create your personal virtual Assistant, such as Cortana,
Google Assistant, Siri, etc.
o With the help of AI, you can build such Robots which can work in an environment where
survival of humans can be at risk.
o AI opens a path for other new technologies, new devices, and new Opportunities.
o High Accuracy with less errors: AI machines or systems are prone to less errors and
high accuracy as it takes decisions as per pre-experience or information.
o High-Speed: AI systems can be of very high-speed and fast-decision making, because of
that AI systems can beat a chess champion in the Chess game.
o High reliability: AI machines are highly reliable and can perform the same action
multiple times with high accuracy.
o Useful for risky areas: AI machines can be helpful in situations such as defusing a
bomb, exploring the ocean floor, where to employ a human can be risky.
o Digital Assistant: AI can be very useful to provide digital assistant to the users such as AI
technology is currently used by various E-commerce websites to show the products as per
customer requirement.
Microsoft accmsount 2
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
o Useful as a public utility: AI can be very useful for public utilities such as a self-driving
car which can make our journey safer and hassle-free, facial recognition for security
purpose, Natural language processing to communicate with the human in human-
language, etc
o High Cost: The hardware and software requirement of AI is very costly as it requires
lots of maintenance to meet current world requirements.
o Can't think out of the box: Even we are making smarter machines with AI, but still
they cannot work out of the box, as the robot will only do that work for which they are
trained, or programmed.
o No feelings and emotions: AI machines can be an outstanding performer, but still it
does not have the feeling so it cannot make any kind of emotional attachment with
human, and may sometime be harmful for users if the proper care is not taken.
o Increase dependency on machines: With the increment of technology, people are
getting more dependent on devices and hence they are losing their mental capabilities.
o No Original Creativity: As humans are so creative and can imagine some new ideas
but still AI machines cannot beat this power of human intelligence and cannot be creative
and imaginative
APPLICATIONS OF AI:
• SPEECH RECOGNITION: It is also known as automatic speech recognition
(ASR), computer speech recognition, or speech-to-text, and it is a capability which uses
natural language processing (NLP) to process human speech into a written format. Many
mobile devices incorporate speech recognition into their systems to conduct voice search
—e.g. Siri—or provide more accessibility around texting.
• CUSTOMER SERVICE: Online virtual agents are replacing human agents along the
customer journey. They answer frequently asked questions (FAQs) around topics, like
shipping, or provide personalized advice, cross-selling products or suggesting sizes for
users, changing the way we think about customer engagement across websites and social
media platforms. Examples include messaging bots on e-commerce sites with virtual
agents, messaging apps, such as Slack and Facebook Messenger, and tasks usually done
by virtual assistants and voice assistants.
Microsoft accmsount 3
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
INTRODUCTION TO AI ON AZURE
INTRODUCTION TO AI:
1. What is AI?
Artificial Intelligence is a way of making a computer, a computer-controlled robot, or a
software think intelligently, in the similar manner the intelligent humans think.
What is Azure?
Azure is a cloud computing platform and an online portal that allows you to access and
manage cloud services and resources provided by Microsoft.
Microsoft accmsount 4
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
• Data is also created by millions of sensors in homes, cars, cities and factories.
• Data-scientists can use the data to train ML-models.
• The models can make predictions and inferences based on the
relationships in the data.
Microsoft accmsount 5
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 6
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
FEATURE CAPABILITY
Automated machine learning This feature enables non-experts to quickly create an
effective machine learning model from data.
Data and compute management Cloud-based data storage and compute resources that
professional data scientists can use to run data experiment
code at scale.
Microsoft accmsount 7
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 8
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 9
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
1) IMAGE ANALYSIS: You can create solutions that combine machine learning models with
advanced image analysis techniques to extract information from images, including "tags" that
could help catalog the image or even descriptive captions that summarize the scene shown in the
image.
Microsoft accmsount 10
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
SERVICE CAPABILITIES
Computer Vision You can use this service to analyze images and video, and
extract descriptions, tags, objects, and text.
Custom Vision Use this service to train custom image classification and object
detection models using your own images.
Face The Face service enables you to build face detection and
facial recognition solutions.
Form Recognizer Use this service to extract information from scanned forms
and invoices.
Microsoft accmsount 11
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 12
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Users must trust a complex system An AI-based financial tool makes investment
recommendations - what are they based on?
Microsoft accmsount 13
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
TRANSPARENCY:
AI systems should be understandable. Users should be made fully aware of the
purpose of the system, how it works, and what limitations may be expected.
ACCOUNTABILITY:
People should be accountable for AI systems. Designers and developers of AI-
based solutions should work within a framework of governance and organizational
principles that ensure the solution meets ethical and legal standards that are clearly
defined.
Microsoft accmsount 14
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Machine Learning is the foundation for most artificial intelligence solutions. Creating an
intelligent solution often begins with the use of machine learning to train predictive models using
historic data that you have collected.
Azure Machine Learning is a cloud service that you can use to train and manage machine
learning models.
2. What is Machine-Learning?
Machine learning is a branch of Artificial Intelligence and computer science which focuses on
the use of data and algorithms to imitate the way that humans learn, gradually improving its
accuracy.
• ML uses mathematics & statistics to create a model that can predict unknown
values.
a) Mathematically, machine-learning is a function (f): The function (f) operates on one or more
features (x) to calculate a predicted-label (y).
i.e., f(x) = y
Microsoft accmsount 15
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
2) Unsupervised ML
b) In both approaches, you train a model to make predictions.
1) Supervised Machine-Learning: is a machine learning
Supervised learning
approach in which a data scientist acts like a tutor and trains the AI system by feeding basic rules
and labeled datasets. The datasets will include labeled input data and expected output results. In
this machine learning method, the system is explicitly told what to look for in the input data.
• You to start with a dataset with known label-values.
Microsoft accmsount 16
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 17
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Automated machine learning allows you to train models without extensive data science or
programming knowledge. For people with a data science and programming background, it
provides a way to save time and resources by automating algorithm selection and hyper-
parameter tuning.
You can create an automated machine learning job in Azure Machine Learning studio.
Microsoft accmsount 18
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
In Azure Machine Learning, operations that you run are called jobs. You can configure multiple
settings for your job before starting an automated machine learning run. The run configuration
provides the information needed to specify your training script, compute target, and Azure ML
environment in your run configuration and run a training job.
Microsoft accmsount 19
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
1. Prepare data: Identify the features and label in a dataset. Pre-process, or clean and
transform, the data as needed.
2. Train model: Split the data into two groups, a training and a validation set. Train a machine
learning model using the training data set. Test the machine learning model for
performance using the validation data set.
3. Evaluate performance: Compare how close the model's predictions are to the known
labels.
4. Deploy a predictive service: After you train a machine learning model, you can deploy the
model as an application on a server or device so that others can use it.
These are the same steps in the automated machine learning process with Azure Machine
Learning:
Prepare data
Machine learning models must be trained with existing data. Data scientists expend a lot
of effort exploring and pre-processing data, and trying various types of model-training algorithms
to produce accurate models, which is time consuming, and often makes inefficient use of expensive
compute hardware.
In Azure Machine Learning, data for model training and other operations is usually encapsulated
in an object called a dataset. You can create your own dataset in Azure Machine Learning
studio.
Microsoft accmsount 20
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Train model
The automated machine learning capability in Azure Machine Learningsupports supervised
machine learning models - in other words, models for which thetraining data includes known
label values. You can use automated machine learningto train models for:
Automated Machine Learning you can select from several types of tasks:
In Automated Machine Learning, you can select configurations for the primary metric, type of model used for
training, exit criteria, and concurrency limits.
Microsoft accmsount 21
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Importantly, AutoML will split data into a training set and a validation set. You can configure the details in the
settings before you run the job.
Evaluate performance:
After the job has finished you can review the best performing model. In this case, you
used exit criteria to stop the job. Thus the "best" model the job generated might not be the best
possible model, just the best one found within the time allowed for this exercise.
Microsoft accmsount 22
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 23
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 24
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
An endpoint that provides the HTTP address at which your resource can be
accessed.
1) Describing an Image
• Computer-vision has the ability to
Analyse an image
Evaluate the objects that are detected and
Generate a human-readable phrases that describes objects in the image.
• Consider the following image of the building in New York.
• The returned phrases are listed below in the order of confidence.
Tagging Visual Features: The image descriptions can be used to suggest tags for the image. The tags can be
associated with the image as metadata that summarizes attributes of the image. These tags can be associated
with the image as metadata that summarizes attributes of the image; and can be particularly useful if you want to
index an image along with a set of key terms that might be used to search for images with specific attributes
or contents.
Microsoft accmsount 25
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
2) Detecting Objects:
The object detection capability is similar to tagging, in that the service can identify
common objects; but rather than tagging, or providing tags for the recognized objects only, this
service can also return what is known as bounding box coordinates. Not only will you get the
type of object, but you will also receive a set of coordinates that indicate the top, left, width, and
height of the object detected, which you can use to identify the location of the object in the
image.
3) Detecting Brands:
This feature provides the ability to identify commercial brands. The service has an existing
database of thousands of globally recognized logos from commercial brands of products.
When you call the service and pass it an image, it performs a detection task and determine if any of
the identified objects in the image are recognized brands. The service compares the brands against
its database of popular brands spanning clothing, consumer electronics, and many more categories.
If a known brand is detected, the service returns a response that contains the brand name, a
confidence score (from 0 to 1 indicating how positive the identification is), and a bounding box
Microsoft accmsount 26
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
(coordinates) for where in the image the detected brand was found.
For example, in the following image, a laptop has a Microsoft logo on its lid, which is identified and
located by the Computer Vision service.
4) Detecting Faces:
The Computer Vision service can detect and analyze human faces in an image, including the ability
to determine age and a bounding box rectangle for the location of the face(s).
The following example shows an image of a person with their face detected and approximate
age estimated.
5) Categorizing an Image: Computer Vision can categorize images based on their contents.
The service uses a parent/child hierarchy with a "current" limited set of categories. When
analyzing an image, detected objects are compared to the existing categories to determine the best
way to provide the categorization. As an example, one of the parent categories is people_. This
image of a person on a roof is assigned a category of people_.
Microsoft accmsount 27
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
A slightly different categorization is returned for the following image, which is assigned to the category
people group because there are multiple people in the image:
Celebrities - The service includes a model that has been trained to identify thousands of
well-known celebrities from the worlds of sports, entertainment, and business.
Landmarks - The service can identify famous landmarks, such as the Taj Mahal and the
Statue of Liberty.
The following example shows an image of Mysore palace.
Microsoft accmsount 28
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
7) Optical Character Recognition: This service can use OCR capabilities to detect
printed and handwritten text in images.
• As an example, you might read some text and identify some key phrases that indicate the main
talking points of the text. You might also recognize names of people or well-known landmarks such
as the Eiffel Tower. Although difficult at times, you might also be able to get a sense for how the
person was feeling when they wrote the text, also commonly known as sentiment.
Statistical analysis of terms used in the text. For example, removing common "stop
words" (words like "the" or "a", which reveal little semantic information about the text).
Frequency analysis of the remaining words (counting how often each word appears) can
provide clues about the main subject of the text.
Sentiment analysis: Encoding words or terms as numeric features that can be used to
train a machine learning model. For example, to classify a text document based on the
Microsoft accmsount 29
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
terms it contains. This technique is often used to perform sentiment analysis, in which a
document is classified as positive or negative.
Applying stemming or lemmatization algorithms to normalize words before
counting them - for example, so that words like "power", "powered", and "powerful" are
interpreted as being the same word.
Applying linguistic structure rules to analyze sentences - for example, breaking down
sentences into tree-like structures such as a noun phrase, which itself contains nouns,
verbs, adjectives, and so on
Creating vectorized models that capture semantic relationships between words by
assigning them to locations in n-dimensional space. This modeling technique might, for
example, assign values to the words "flower" and "plant" that locate them close to one
another, while "skateboard" might be given a value that positions it much further away.
• A Language resource - choose this resource type if you only plan to use natural language
processing services, or if you want to manage access and billing for the resource separately from
other services.
Microsoft accmsount 30
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
• A Cognitive Services resource - choose this resource type if you plan to use the Language
service in combination with other cognitive services, and you want to manage access and billing
for these services together.
1) Language detection
• Use the language detection capability of the Language service to identify the language in
which text is written. You can submit multiple documents at a time for analysis. For each
document submitted to it, the service will detect
For example, consider a scenario where you own and operate a restaurant where customers can
complete surveys and provide feedback on the food, the service, staff, and so on. Suppose you
have received the following reviews from customers.
• Review 1: "A fantastic place for lunch. The soup was delicious."
• Review 3: "The croque monsieur avec frites was terrific. Bon appetit!"
Document Language ISO 6391 Score
Name Code
Review 1 English en 1.0
Review 2 Spanish es 1.0
Review 3 English en 0.9
• Notice that the language detected for review 3 is English, despite the text containing a mix of
English and French. The language detection service will focus on the predominant language in
the text. The service uses an algorithm to determine the predominant language, such as length of
phrases or total amount of text for the language compared to other languages in the text. The
predominant language will be the value returned, along with the language code. The confidence
score may be less than 1 as a result of the mixed language text.
Microsoft accmsount 31
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
• There may be text that is ambiguous in nature, or that has mixed language content. These
situations can present a challenge to the service. An ambiguous content example would be a case
where the document contains limited text, or only punctuation. For example, using the service to
analyze the text results in a value of unknown for the language name and the language identifier,
and a score of NaN (which is used to indicate not a number).
2) Sentiment analysis
• The text analytics capabilities in the Language service can evaluate text and return sentiment
scores and labels for each sentence. This capability is useful for detecting positive and negative
sentiment in social media, customer reviews, discussion forums and more.
• Using the pre-built machine learning classification model, the service evaluates the text and
returns a sentiment score in the range of 0 to 1, with values closer to 1 being a positive
sentiment. Scores that are close to the middle of the range (0.5) are considered neutral or
indeterminate, with value closer to 0 indicate being negative statement.
• For example, the following two restaurant reviews could be analyzed for sentiment.
• "We had dinner at this restaurant last night and the first thing I noticed was how courteous the
staff was. We were greeted in a friendly manner and taken to our table right away. The table was
clean, the chairs were comfortable, and the food was amazing.
• Our dining experience at this restaurant was one of the worst I've ever had. The service was
slow, and the food was awful. I'll never eat at this establishment again.“
• The sentiment score for the first review might be around 0.9, indicating a positive sentiment;
while the score for the second review might be closer to 0.1, indicating a negative sentiment.
3) Indeterminate sentiment
• A score of 0.5 might indicate that the sentiment of the text is indeterminate, and could result
from text that does not have sufficient context to discern a sentiment or insufficient phrasing. For
example, a list of words in a sentence that has no structure, could result in an indeterminate
score. Another example where a score may be 0.5 is in the case where the wrong language code
was used. A language code (such as "en" for English, or "fr" for French) is used to inform the
service which language the text is in. If you pass text in French but tell the service the language
code is en for English, the service will return a score of precisely 0.5.
Microsoft accmsount 32
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
previously. Depending on the volume of surveys that you have collected, it can take a long time to
read through the reviews. Instead, youcan use the key phrase extraction capabilities of the
Language service to summarizethe main points.
• We had dinner here for a birthday celebration and had a fantastic experience. We were greeted
by a friendly hostess and taken to our table right away. The ambiance was relaxed, the food was
amazing, and service was terrific. If you like great food and attentive service, you should try this
place.
• Key phrase extraction can provide some context to this review by extracting the following
phrases:
• Attentive service
• Great food
• Birthday celebration
• Fantastic experience
• Table
• Friendly hostess
• Dinner
• Ambiance
• Place
5) Entity recognition
You can provide the Language service with unstructured text and it will return a list of entities in
the text that it recognizes.
For example, suppose you use the Language service to detect entities in the following restaurant review
extract:
Microsoft accmsount 33
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
EXPLORE CONVERSATIONAL AI
INTRODUCTION: Conversational AI is a type of artificial intelligence (AI) that can simulate
human conversation.
Conversational AI systems are trained on large amounts of data, such as text and speech. This
data is used to teach the system how to understand and process human language. The system then
uses this knowledge to interact with humans in a natural way. It’s constantly learning from its
interactions and improving its response quality over time.
- Deliver better customer experience, achieve higher customer engagement and satisfaction
For example, conversational AI can provide a more personalized and engaging experience by
remembering customer preferences and helping customers 24/7 when no human agents are
around.
Examples of conversational AI
To give a few application examples of the constantly evolving conversational AI technology:
Chatbots: often used in customer service applications to answer questions and provide support.
Virtual assistants: often voice-activated and can be used on mobile devices and smart speakers.
Microsoft accmsount 34
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Speech recognition software: used to transcribe lectures, create transcripts of phone calls, or
generate automatic captions for videos.
BOT: A bot is an application with a conversational interface.
Some common features of bots include:
• Users interact with a bot by initiating activities in turns.
• Activities are events, such as a user joining a conversation or sending a message.
• Messages can be text, speech, or visual interface elements (such as cards or buttons).
• A flow of activities can form a dialog, in which state is maintained to manage a multi-turn
conversation.
• Activities are exchanged across channels, such as web chat, email, Microsoft Teams, and
others.
• We except organizations to engage with us individually, and to be able to answer complex
questions at a personal level
• Many organizations publish support information that answer through a web browser or
a dedicated app.
Microsoft accmsount 35
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 36
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
• Bot Framework Service: A component of Azure Bot Service that provides a REST API
for handling bot activities.
• Bot Framework SDK. A set of tools and libraries for end-to-end bot
development enabling bot development in a range of programming languages.
Bot templates:
The easiest way to get started with the Bot Framework SDK is to base your new bot on
one the templates it provides:
• Empty Bot - a basic bot skeleton
• Echo Bot - a simple "hello world" sample in which the bot responds to messages by echoing
the message text back to the user.
• Core Bot - a more comprehensive bot that includes common bot functionality, such as
integration with the Language Understanding service.
ii. Machine learning Machine learning is a field of artificial intelligence that enables computers
to learn from data without being explicitly programmed. Machine learning is used to train
computers to understand language, as well as to recognize patterns in data. It is also used to
create models of how different things work, including the human brain.
iii. Text analysis Text analysis is the process of extracting information from text data. This
involves identifying the different parts of a sentence, such as the subject, verb, and object,
different types of words in a sentence, such as nouns, verbs, and adjectives. Text analysis is
used to understand the meaning of a sentence, as well as the relationships between different
words. It is also used to identify the topic of a text, as well as the sentiment (positive or
Microsoft accmsount 37
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 38
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
iv. Computer vision Computer vision is the ability of a computer to interpret and understand
digital images. This involves identifying the different objects in an image, as well as the location
and orientation of those objects Computer vision is used to identify the contents of an image, as
well as the relationships between different objects in the image. It is also used to interpret the
emotions of people in photos, and to understand the context of a photo.
Microsoft accmsount 39
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
1. Add the Tune Model Hyper parameters component to your pipeline in the designer.
2. Connect an untrained model to the leftmost input.
3. Add the dataset that you want to use for training, and connect it to the middle input of
Tune Model Hyper parameters.
Optionally, if you have a tagged dataset, you can connect it to the rightmost input port
(Optional validation dataset). This lets you measure accuracy while training and tuning.
Entire grid: When you select this option, the component loops over a grid
predefined by the system, to try different combinations and identify the best learner.
This option is useful when you don't know what the best parameter settings might be
and want to try all possible combinations of values.
Random sweep: When you select this option, the component will randomly select
parameter values over a system-defined range. You must specify the maximum
number of runs that you want the component to execute. This option is useful
when you want to increase model performance by using the metrics of your choice
but still conserve computing resources.
5. For Label column, open the column selector to choose a single label column.
Microsoft accmsount 40
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
1. Maximum number of runs on random sweep: If you choose a random sweep, you can
specify how many times the model should be trained, by using a random
combination of parameter values.
6. For Ranking, choose a single metric to use for ranking the models.
When you run a parameter sweep, the component calculates all applicable metrics for the
model type and returns them in the Sweep results report. The component uses separate
metrics for regression and classification models.
However, the metric that you choose determines how the models are ranked. Only the top
model, as ranked by the chosen metric, is output as a trained model to use for scoring.
7. For Random seed, enter an integer number as a pseudo random number generator state
used for randomly selecting parameter values over a pre-defined range. This parameter is
only effective if Parameter sweeping mode is Random sweep.
8. Submit the pipeline.
To view the sweep results, you could either right-click the component, and then select
Visualize, or right-click left output port of the component to visualize.
The Sweep results includes all parameter sweep and accuracy metrics that apply to the
model type, and the metric that you selected for ranking determines which model is
considered "best."
To save a snapshot of the trained model, select the Outputs+logs tab in the right panel
of the Train model component. Select the Register dataset icon to save the model as a
reusable component.
Random sweep: This option trains a model by using a set number of iterations.
You specify a range of values to iterate over, and the component uses a randomly chosen
Microsoft accmsount 41
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
subset of those values. Values are chosen with replacement, meaning that numbers
previously chosen at random are not removed from the pool of available numbers. So the
chance of any value being selected stays the same across all passes.
Entire grid: The option to use the entire grid means that every combination is tested.
This option is the most thorough, but it requires the most time.
Iterating over many combinations of settings can be time-consuming, so the component provides
several ways to constrain the process:
We recommend that you pipeline with the settings to determine the most efficient method of
training on a particular dataset and model.
At the end of testing, the model presents a report that contains the accuracy for each model so
that you can review the metric results:
However, during training, you must choose a single metric to use in ranking the models that
are generated during the tuning process. You might find that the best metric varies, depending
on your business problem and the cost of false positives and false negatives.
Microsoft accmsount 42
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Mean absolute error averages all the errors in the model, where error means the distance
of the predicted value from the true value. It's often abbreviated as MAE.
Root of mean squared error measures the average of the squares of the errors, and then
takes the root of that value. It's often abbreviated as RMSE.
Relative absolute error represents the error as a percentage of the true value.
Relative squared error normalizes the total squared error by dividing by the total
squared error of the predicted values.
Coefficient of determination is a single number that indicates how well data fits a model. A
value of one means that the model exactly matches the data. A value of zero means that
2 2
the data is random or otherwise can't be fit to the model. It's often called r , R , or r-
squared.
Almost all learners in Azure Machine Learning support cross-validation with an integrated
parameter sweep, which lets you choose the parameters to pipeline with. If the learner doesn't
support setting a range of values, you can still use it in cross- validation. In this case, a range of
allowed values is selected for the sweep.
You can train the model by providing the model and the tagged dataset as an input to Train
Model. The trained model can then be used to predict values for the new input examples.
Microsoft accmsount 43
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
If you accept the default neural network architecture, use the Properties pane to set
parameters that control the behavior of the neural network, such as the number of nodes
in the hidden layer, learning rate, and normalization.
Start here if you are new to neural networks. The component supports many
customizations, as well as model tuning, without deep knowledge of neural networks.
Use this option if you want to add extra hidden layers, or fully customize the network
architecture, its connections, and activation functions.
This option is best if you are already somewhat familiar with neural networks. You use
the Net# language to define the network architecture.
1. Add the Neural Network Regression component to your pipeline in the designer. You
can find this component under Machine Learning, Initialize, in the Regression category.
2. option.
Single Parameter: Choose this option if you already know how you want to
configure the model.
Parameter Range: Select this option if you are not sure of the best parameters, and
want to run a parameter sweep. Select a range of values to iterate over, and the Tune
Model Hyper parameters iterates over all possible combinations of the settings you
provided to determine the hyper parameters that produce the optimal results.
3. In Hidden layer specification, select fully connected case. This option creates a model using
the default neural network architecture, which for a neural network regression model, has
these attributes:
The network has exactly one hidden layer.
The output layer is fully connected to the hidden layer and the hidden layer is
fully connected to the input layer.
The number of nodes in the hidden layer can be set by the user (default value is
100).
Microsoft accmsount 44
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
4. Indicate how you want the model to be trained, by setting the Create trainer mode
Because the number of nodes in the input layer is determined by the number of
features in the training data, in a regression model there can be only one node in the
output layer.
5. For Number of hidden nodes, type the number of hidden nodes. The default is one
hidden layer with 100 nodes. (This option is not available if you define a custom
architecture using Net#.)
6. For learning rate, type a value that defines the step taken at each iteration, before
correction. A larger value for learning rate can cause the model to converge faster,
but it can overshoot local minima.
7. For Number of learning iterations, specify the maximum number of times the algorithm
processes the training cases.
8. For The momentum, type a value to apply during learning as a weight on nodes from
previous iterations.
9. Select the option, Shuffle examples, to change the order of cases between iterations. If
you deselect this option, cases are processed in exactly the same order each time you
run the pipeline.
10. For Random number seed, you can optionally type a value to use as the seed. Specifying a
seed value is useful when you want to ensure repeatability across runs of the same pipeline.
11. Connect a training dataset and train the model:
If you set Create trainer mode to Single Parameter, connect a tagged dataset
and the Train Model component.
If you set Create trainer mode to Parameter Range, connect a tagged dataset and
train the model by using Tune Model Hyper parameters.
Results
To save a snapshot of the trained model, select the Outputs tab in the right panel of the
Train model component. Select the Register dataset icon to save the model as a reusable
component.
Microsoft accmsount 45
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
COURSE- 02
DATA ANALYST ASSOCIATE [DA-100]
Introduction
With data and information as the most strategic asset of a business, the underlying challenge that organizations
have today is understanding and using their data to positively affect change within the business. Businesses continue
to struggle to use their data in a meaningful and productive way, which impacts their ability to act.
A retail business should be able to use their vast amounts of data and information in such a way that
impacts the business, including:
Tracking inventory
Identifying purchase habits
Detecting user trends and patterns
Recommending purchases
Determining price optimizations
Identifying and stopping fraud
Data analysis is the process of identifying, cleaning, transforming, and modeling data to discover meaningful and useful
information. The data is then crafted into a story through reports for analysis to support the critical decision-making
process.
As the world becomes more data-driven, storytelling through data analysis is becoming a vital component and aspect
of large and small businesses. It is the reason that organizations continue to hire data analysts.
Data-driven businesses make decisions based on the story that their data tells, and in today's data-driven world, data
is not being used to its full potential, a challenge that most businesses face. Data analysis is, and should be, a critical
aspect of all organizations to help determine the impact to their business, including evaluating customer sentiment,
performing market and product research, and identifying trends or other data insights.
While the process of data analysis focuses on the tasks of cleaning, modeling, and visualizing data, the
concept of data analysis and its importance to business should not be understated. To analyze data, core
components of analytics are divided into the following categories:
Descriptive
Microsoft accmsount 46
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Diagnostic
Predictive
Prescriptive
Cognitive
Descriptive analytics
Descriptive analytics help answer questions about what has happened based on historical data. Descriptive
analytics techniques summarize large datasets to describe outcomes to stakeholders.
By developing key performance indicators (KPIs), these strategies can help track the success or failure
of key objectives. Metrics such as return on investment (ROI) are used in many industries, and
specialized metrics are developed to track performance in specific industries.
An example of descriptive analytics is generating reports to provide a view of an organization's sales and
financial data.
Diagnostic analytics
Diagnostic analytics help answer questions about why events happened. Diagnostic analytics techniques
supplement basic descriptive analytics, and they use the findings from descriptive analytics to discover the
cause of these events. Then, performance indicators are further investigated to discover why these events
improved or became worse. Generally, this process occurs in three steps:
1. Identify anomalies in the data. These anomalies might be unexpected changes in a metric or a
particular market.
2. Collect data that's related to these anomalies.
3. Use statistical techniques to discover relationships and trends that explain these anomalies.
Predictive analytics
Predictive analytics help answer questions about what will happen in the future. Predictive analytics
techniques use historical data to identify trends and determine if they're likely to recur. Predictive
analytical tools provide valuable insight into what might happen in the future. Techniques include a
variety of statistical and machine learning techniques such as neural networks, decision trees, and
regression.
Microsoft accmsount 47
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Prescriptive analytics
Prescriptive analytics help answer questions about which actions should be taken to achieve a goal or target.
By using insights from prescriptive analytics, organizations can make data-driven decisions. This
technique allows businesses to make informed decisions in the face of uncertainty. Prescriptive analytics
techniques rely on machine learning as one of the strategies to find patterns in large datasets. By
analyzing past decisions and events, organizations can estimate the likelihood of different outcomes.
Cognitive analytics
Cognitive analytics attempt to draw inferences from existing data and patterns, derive conclusions based
on existing knowledge bases, and then add these findings back into the knowledge base for future
inferences, a self-learning feedback loop. Cognitive analytics help you learn what might happen if
circumstances change and determine how you might handle these situations.
Inferences aren't structured queries based on a rules database; rather, they're unstructured hypotheses
that are gathered from several sources and expressed with varying degrees of confidence. Effective
cognitive analytics depend on machine learning algorithms, and will use several natural language
processing concepts to make sense of previously untapped data sources, such as call center
conversation logs and product reviews.
these different roles in data and the specific responsibility in the overall spectrum of data discovery and understanding:
Business analyst
Data analyst
Data engineer
Data scientist
Database administrator
Business analyst
Microsoft accmsount 48
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
While some similarities exist between a data analyst and business analyst, the key differentiator between
the two roles is what they do with data. A business analyst is closer to the business and is a
specialist in interpreting the data that comes from the visualization. Often, the roles of data analyst and
business analyst could be the responsibility of a single person.
Data analyst
A data analyst enables businesses to maximize the value of their data assets through visualization and
reporting tools such as Microsoft Power BI. Data analysts are responsible for profiling, cleaning, and
transforming data. Their responsibilities also include designing and building scalable and effective data
models, and enabling and implementing the advanced analytics capabilities into reports for analysis. A data
analyst works with the pertinent stakeholders to identify appropriate and necessary data and reporting
requirements, and then they are tasked with turning raw data into relevant and meaningful insights.
A data analyst is also responsible for the management of Power BI assets, including reports,
dashboards, workspaces, and the underlying datasets that are used in the reports. They are tasked with
implementing and configuring proper security procedures, in conjunction with stakeholder
requirements, to ensure the safekeeping of all Power BI assets and their data.
Data analysts work with data engineers to determine and locate appropriate data sources that meet
stakeholder requirements. Additionally, data analysts work with the data engineer and database
administrator to ensure that the analyst has proper access to the needed data sources. The data analyst
also works with the data engineer to identify new processes or improve existing processes for collecting
data for analysis.
Data engineer
Data engineers provision and set up data platform technologies that are on-premises and in the cloud.
They manage and secure the flow of structured and unstructured data from multiple sources. The data
platforms that they use can include relational databases, nonrelational databases, data streams, and file
stores. Data engineers also ensure that data services securely and seamlessly integrate across data
platforms.
Primary responsibilities of data engineers include the use of on-premises and cloud data services and
tools to ingest, egress, and transform data from multiple sources. Data engineers collaborate with
business stakeholders to identify and meet data requirements. They design and implement solutions.
While some alignment might exist in the tasks and responsibilities of a data engineer and a database
administrator, a data engineer's scope of work goes well beyond looking after a database and the server
where it's hosted and likely doesn't include the overall operational data management.
Microsoft accmsount 49
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
A data engineer adds tremendous value to business intelligence and data science projects. When the
data engineer brings data together, often described as data wrangling, projects move faster because
data scientists can focus on their own areas of work.
As a data analyst, you would work closely with a data engineer in making sure that you can access the
variety of structured and unstructured data sources because they will support you in optimizing data
models, which are typically served from a modern data warehouse or data lake.
Both database administrators and business intelligence professionals can transition to a data engineer
role; they need to learn the tools and technology that are used to process large amounts of data.
Data scientist
Data scientists perform advanced analytics to extract value from data. Their work can vary from descriptive
analytics to predictive analytics. Descriptive analytics evaluate data through a process known as exploratory
data analysis (EDA). Predictive analytics are used in machine learning to apply modeling techniques that
can detect anomalies or patterns. These analytics are important parts of forecast models. Descriptive and
predictive analytics are only partial aspects of data scientists' work. Some data scientists might work in the
realm of deep learning, performing iterative experiments to solve a complex data problem by using
customized algorithms.
Anecdotal evidence suggests that most of the work in a data science project is spent on data wrangling
and feature engineering. Data scientists can speed up the experimentation process when data engineers
use their skills to successfully wrangle data.
On the surface, it might seem that a data scientist and data analyst are far apart in the work that they do,
but this conjecture is untrue. A data scientist looks at data to determine the questions that need answers
and will often devise a hypothesis or an experiment and then turn to the data analyst to assist with the
data visualization and reporting.
Database administrator
A database administrator implements and manages the operational aspects of cloud-native and hybrid
data platform solutions that are built on Microsoft Azure data services and Microsoft SQL Server. A
database administrator is responsible for the overall availability and consistent performance and
optimizations of the database solutions. They work with stakeholders to identify and implement the
policies, tools, and processes for data backup and recovery plans.
The role of a database administrator is different from the role of a data engineer. A database
administrator monitors and manages the overall health of a database and the hardware that it
resides on, whereas a data engineer is involved in the process of data wrangling, in other words, ingesting,
transforming, validating, and cleaning data to meet business needs and requirements.
The database administrator is also responsible for managing the overall security of the data, granting and
restricting user access and privileges to the data as determined by business needs and requirements.
Microsoft accmsount 50
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
The following figure shows the five key areas that you'll engage in during the data analysis process
Prepare
As a data analyst, you'll likely divide most of your time between the prepare and model tasks. Deficient
or incorrect data can have a major impact that results in invalid reports, a loss of trust, and a negative
effect on business decisions, which can lead to loss in revenue, a negative business impact, and more.
Microsoft accmsount 51
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Before a report can be created, data must be prepared. Data preparation is the process of
profiling, cleaning, and transforming your data to get it ready to model and visualize.
Data preparation is the process of taking raw data and turning it into information that is trusted and
understandable. It involves, among other things, ensuring the integrity of the data, correcting wrong or
inaccurate data, identifying missing data, converting data from one structure to another or from one type
to another, or even a task as simple as making data more readable.
Data preparation also involves understanding how you're going to get and connect to the data and the
performance implications of the decisions. When connecting to data, you need to make decisions to
ensure that models and reports meet, and perform to, acknowledged requirements and expectations.
Privacy and security assurances are also important. These assurances can include anonymizing data to avoid
oversharing or preventing people from seeing personally identifiable information when it isn't needed.
Alternatively, helping to ensure privacy and security can involve removing that data completely if it
doesn't fit in with the story that you're trying to shape.
Data preparation can often be a lengthy process. Data analysts follow a series of steps and methods to
prepare data for placement into a proper context and state that eliminate poor data quality and allow it to
be turned into valuable insights.
Model
When the data is in a proper state, it's ready to be modeled. Data modeling is the process of determining
how your tables are related to each other. This process is done by defining and creating relationships
between the tables. From that point, you can enhance the model by defining metrics and adding custom
calculations to enrich your data.
Creating an effective and proper data model is a critical step in helping organizations understand and gain
valuable insights into the data. An effective data model makes reports more accurate, allows the data to
be explored faster and more efficient, decreases time for the report writing process, and simplifies future
report maintenance.
The model is another critical component that has a direct effect on the performance of your report and
overall data analysis. A poorly designed model can have a drastically negative impact on the general
accuracy and performance of your report. Conversely, a well-designed model with well- prepared data
will ensure a properly efficient and trusted report. This notion is more prevalent when you are working
with data at scale.
From a Power BI perspective, if your report is performing slowly, or your refreshes are taking a long
time, you will likely need to revisit the data preparation and modeling tasks to optimize your report.
The process of preparing data and modeling data is an iterative process. Data preparation is the first task
in data analysis. Understanding and preparing your data before you model it will make the modeling step
much easier.
Microsoft accmsount 52
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Visualize
The visualization task is where you get to bring your data to life. The ultimate goal of the visualize task is to
solve business problems. A well-designed report should tell a compelling story about that data, which will
enable business decision makers to quickly gain needed insights. By using appropriate visualizations and
interactions, you can provide an effective report that guides the reader through the content quickly and
efficiently, therefore allowing the reader to follow a narrative into the data.
The reports that are created during the visualization task help businesses and decision makers
understand what that data means so that accurate and vital decisions can be made. Reports drive the
overall actions, decisions, and behaviors of an organization that is trusting and relying on the information
that is discovered in the data.
The business might communicate that they need all data points on a given report to help them make
decisions. As a data analyst, you should take the time to fully understand the problem that the business
is trying to solve. Determine whether all their data points are necessary because too much data can
make detecting key points difficult. Having a small and concise data story can help find insights
quickly.
With the built-in AI capabilities in Power BI, data analysts can build powerful reports, without writing
any code, that enable users to get insights and answers and find actionable objectives. The AI capabilities
in Power BI, such as the built-in AI visuals, enable the discovering of data by asking questions, using the
Quick Insights feature, or creating machine learning models directly within Power BI.
An important aspect of visualizing data is designing and creating reports for accessibility. As you build
reports, it is important to think about people who will be accessing and reading the reports. Reports
should be designed with accessibility in mind from the outset so that no special modifications are
needed in the future.
Many components of your report will help with storytelling. From a color scheme that is complementary
and accessible, to fonts and sizing, to picking the right visuals for what is being displayed, they all come
together to tell that story.
Analyze
The analyze task is the important step of understanding and interpreting the information that is
displayed on the report. In your role as a data analyst, you should understand the analytical
capabilities of Power BI and use those capabilities to find insights, identify patterns and trends,
predict outcomes, and then communicate those insights in a way that everyone can understand.
Advanced analytics enables businesses and organizations to ultimately drive better decisions
throughout the business and create actionable insights and meaningful results. With advanced
analytics, organizations can drill into the data to predict future patterns and trends, identify activities
and behaviors, and enable businesses to ask the appropriate questions about their data.
Microsoft accmsount 53
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 54
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Previously, analyzing data was a difficult and intricate process that was typically performed by data
engineers or data scientists. Today, Power BI makes data analysis accessible, which simplifies the data
analysis process. Users can quickly gain insights into their data by using visuals and metrics directly from
their desktop and then publish those insights to dashboards so that others can find needed information.
This feature is another area where AI integrations within Power BI can take your analysis to the next
level. Integrations with Azure machine learning, cognitive services, and built-in AI visuals will help to
enrich your data and analysis.
Manage
Power BI consists of many components, including reports, dashboards, workspaces, datasets, and more.
As a data analyst, you are responsible for the management of these Power BI assets, overseeing the
sharing and distribution of items, such as reports and dashboards, and ensuring the security of Power BI
assets.
Apps can be a valuable distribution method for your content and allow easier management for large
audiences. This feature also allows you to have custom navigation experiences and link to other assets
within your organization to complement your reports.
The management of your content helps to foster collaboration between teams and individuals. Sharing
and discovery of your content is important for the right people to get the answers that they need. It is also
important to help ensure that items are secure. You want to make sure that the right people have access
and that you are not leaking data past the correct stakeholders.
Proper management can also help reduce data silos within your organization. Data duplication can make
managing and introducing data latency difficult when resources are overused. Power BI helps reduce data
silos with the use of shared datasets, and it allows you to reuse data that you have prepared and modeled.
For key business data, endorsing a dataset as certified can help to ensure trust in that data.
The management of Power BI assets helps reduce the duplication of efforts and helps ensure
security of the data.
Microsoft accmsount 55
BHARATH MATHA DEGREE COLLEGE | ARTIFICIAL INTELLIGENCE
Microsoft accmsount 56