Professional Documents
Culture Documents
Adau
ARTIFICIALYNTELLIGENCE AND DATA ANALYTICS
UNIT -
Artificial lnielligence
Arificial Intelligence (AI) refers to the ficld of computer. science that focuses on creating intelligent
machines capable of performing tasks that typically require human intcligence. AI involves the
deveiopment of computer systems or programs that can perccive, understand, reáson, learn, and make
decisions in a manner similar to human cognitive abilities.
Alsystens are designcd to analyse vast amounts of data, recognize patterns, and make predictions or
take actiornis based on that analysis. They rely on various techniques and algorithms, including
machine learning, natural language processing, computer vision, expert systeims, and neural networks,
among others.
Machine learning is a subset .of AI that enábles systems to learn from data without explicit
programming. It involves training algorithms on Jarge datasets to recognize patterns
and make
accurate predictions or decisions. Dep learming, a type of machine learning, uses neural networks
with multiple layers to proccss and understand complex data,
Types of ArtificialIntelligence:
ATfüal Tntelligence
3. Super Al:
o Super Al is a level of Intelligence of Systems at which .machines could surpass human
intelligence, and can perform any task better than human with cognitive properties. It is an
outcome of gencral Al.
Some key .characteristics of strong Al include capability include the ability to think, to
reason,solve the puzzie, make judgments, plan, Icarn, and communicate by its own.
Super Al isstill a hypothetical concept of Artificial Intelligence. Devclopment of such systenns
in real is stillworld changing task.
Artiticial Intelligence (ype-2: Bascd on functionality
1.Reactive Maclhines
Purely reactive machines arc the most basic types of
Atiticial Intelligençe.
SuchAl systens do not store memoris or past experiences for future aclions.
Thesemachines oly focus on current sccnarios and react on it as per pössible
best action.
IBM's Deep Blue system is an cxample of rcactive machines.
Google's AlphaGo is also an example of reactive nachines.
2. Limited Memory
Limited memory machines can store past experiences or some
data fora short period of time.
These machines can use stored data for a limited
time period only.
Self-driving cars are one of the best cxamples of Limited
Memory systems. These cars can
store recent speed of' ncarby cars, the distance
of othr cars, speed limit, and othcr information
to navigate the road.
3. Theory of Mind
4. Self-Awarcness
Self-awareness Al is the future of Artificial
Intelligencc. These machines will be super
intelligent, and willhave their own consciousness,
sentiments, and self-awareness.
These machincs will be smartcr than hulnan mind.
Self-Awarcness Al does not exist reality
in still and it is a hypothetical concept.
computer programs.
and MYIN
. The development expert systems, such as DENDRAL for chemistry
of
like conversation.
.
The carly 1970s witnessed thc development
of rule-bäsed language like PROLOG. yhick
of expert systems.
facilitated the creation
Deep learning, powered by neral networks with multiple layers, revolutionized AI in areas
4
Turing Test in AI
Human Evalustor
Communication Channel
Human Participant
exchange messages.
a conversation through the
The Turing Test begins with the Human Evaluator engaging in
Communication Channel. The Evaluator interacts with both the Machine and the Human Participant
without knowing which is which. The goal of the Evaluator is to determine which entity human and
is
responses to
The Machine attempts to generate responses that are indistinguishable from human
convince the Evaluator that it is the human participant. The Human Participant, on the other hand, tries
to respond naturally as a humarn would.
5
Through a series of conversations und interactions, the tlunan Evaluator evaluates thc responscs uf
both enities and decides whether the machine can simuate human-tike belhavior effectively. II the
Evaluator consistently faits to identify the machine, it is considered to thave passcd the Turing Test and
demonstrated intelligence.
This diagram visually represents the key components and the flow of communication in theTuring
Test, where the machine aimsto convince thc human evaluator of its human-ike intelligence.
Iuriig Test
Computer
Player A Hunan responder
Player B
Interrugator
Player C
The conversation between all playcrs is via keyboard and screcn so the result would not depend on the
machine's ubility toconvert words as specch.
The test result does not depend on cach correct unswer, but only how closely its responses like a
human answer. The computer, is pernitted to do everything possible to force a wrong identification by
the interrogalor.
PlayerA (Computer): Nu
a vwhich is human,
Inthis game, if an interrogator would not be able to identify which is machine and
to be intelligent and can think
then the computer passes the test successfully, and the machine said
is
like a human.
"In T91. the New York businessan
llugh Locbner announces
ollering a S100,000 prize for the
first computer to pass the
tle priz COmpeiiliol,
progrn1 to tilldate, come close to Turing test. However, no A1
passing un undiluted Turing test".
Goals ofArificial
Intelligence.
l'ollowing are the main goals
of Artificial ntclligence:
1. Replicate human
intelligence
2. Solve Knowicdge-intensivg
tasks
3. An intelligent connection
of perccption and action
4. Building amachine
which can perforn tasks that requires
human intelligence such as:
Proving a theorem
Playing chess
Plan some surgical operation
Driving a car in traffic
5. Creating some system
which can exhibit intelligent
itself, demonstrate, cxplain, behayior, lcarn ncw things
and can advise to its user. by
Perception is a proces to interpret, acquire, select and then organize the sensory
information that is captured from the real worid.
For example: Human beings have sensory receptors such as touch, taste, smell, sight and
hearing. So, the information rcceived from these receptors is transmitted to human brain
to organize the rcccived information.
According to the reccived infonation, action is taken by interacting with the cnvironmen
to manipulate and navigate the objects.
Perception andaction arc vcry important concepis in the ficld Robotics. The followino
of
figures show the complete autonomous robot.
Percepton
ycal Cognition
Wotd
Ätion
8
Representation Requirements
What is a KnowledgeReprescntation?
2. Sennantics The semantics defines which facts in the world the sentences
the statennent about the wvorld that each sentence mnakes. refer lo, and hence
A good knowledge representation system for any particular domain should possess
following properties: the
1. Represeitational Adequacy
the ability to represent all the different kinds of knowledgc
that might be needed in that domain.
6. They should be transparent - s0 you can casily understand what is being said.
7. The implenmentation
nceds to be concise and fast –so that
retrieved and nanipulated information can be slorcd,
rapidly.
10
Intelligent Agents:
Sensors
5.
Etectors
Actions
11
devices which affect thc environnent. EffectorsÇan
EIfector's: Efectors are thc
and isplay
scrccn. beleps
whcels, arms. fingers, wings. fins,
Agent Environment in
A
Propcrties of Environment
-
Lhe cIVI Oulleit has nulifold properties
Discrctc / Continuous- If there are a limited number of distinct, clearly defined,
is discrete (For cxample,
slates of the environment, the environment chess);otherwis,
it is continuous (For cxaniple, driving).
-
Observable / Partially Observable If it is possible to determine thee complele
stale
of tlhe environunent at cach time poiint from thè percepls it is observable; otlherwiseitis
only partially observable.
ti
Static / Dynamic- if thc environment does not clhange while,an agent acung,
is hen
it is static; otherwise it is dynamic.
Single agent / Multiple agents -The environnent may contain other agents ivhick
Acccssible / Inaccessible - If the agent's sensory apparatus can havc access to the
complcte statc of thc environment, then the environiment is acccssible to that aon!
12
Characteristies of intclligent agents
Intelligent agents have some level of individualism that allows
them to perform
certain tasks on their own.
Goal-oriented habits
Typcs ofAlAgents
The Simple reflex agents arc the simplest agents. These agents
take decisions on the
basisof the current percepts and ignore the rest
of the percept history.
These agents only succeed in the fully observable environnient.
The Simple reflex agent-does not consider
aiy part of percepts history during their
decision and action process.
The Simple reflex agent works on Condition-action
rule, vhich means it maps the
current state to action. as a
Such Room Cleaner agent, it works only there
room. if is dirt in
the
Problems for the sinple reflex agent
design approach:
They havé very limited intelligence
They do not have knowledge
of non-petceptual parts of the current state
Mostly too big to generate.and to store.
Not adaptive to changes in the environment.
13
Agent
Sensots< Precepts
1What e
wertd
Actuatort
Action
2. Model-bascd reflex
agent
The Model-based agent can work a
in partially observable
situation. environment, and track the
o A
model-based agent has two
inportant factors:
o Model: Itis knowledge about "how
things lhappen in the world," so it
a Model-bascd agent. is called
o Internal
State: I is representation of the current
a
history. state based on percept
These agents have the model,
"which is knowlcdge
model thcy performn uctions. of the world" and baved on thc
Updating the agent state requires
infonnation about:
How the world evolves
b How the agcnt's action
afects the world.
\Precepts
Sensors
State
How the world evolves
Eivironment
Wa the world|
Actuators
Action
Agent
3.Goal-based agents
The knowledge of the current state
environment is not always suflicient to
decide for
an agent to what todo.
14
The agent nccdsto kow its Loal wihich deseribes desirablo situations.
Goal-bascd agents cxpand the capabilities of the nodel-based agent by having the
"goal" infornation.
They choose an action, so that they can aclhieve the goal.
These agents may have to consider a long sequence of possible actions before
deciding whether the goal is achieved or not. Such considerations of different sccnario
are called scarching and planning, which nakes an agcnt proactivc.
Prcccpts
Sensors
State :*
filow the world evolves
Envronment
What the world
is ike now
What mg actíons do
Waat it nill be
ike if I do acion A
What action i
Goals )
should do now
Actuitors Action
Ageut
4. Utility-Ibased agents
15
Sensors Preceps
sthte
Wuathe rorld
ior the world olves ke bor..
Whatnuy'xetlons do
Envirounent
What ir will
be like ifIdo action'
WLaraadat.I
Xhgutddonoi:
Action
Agent Aetuatos
5. Learning Agents
AGENT
Pertormance
Stnpdaid
Perccpts
Critie Sensors
feedback
changesPerommance Envionment
Learning knowledge
element element
leaming goal
JeNperiments
Probleu
Generacor
SEMecrors actions
environment
b Critic: Learning element takes feedback from critic which describes that how well the
agent is doing with respect to a
fxed perfornance standard.
16
Performance element: It is responsible for sclecting external action
Problem generator: This component is responsible for
uggesting actions that will
Jead to newand informativeexperiences.
Y InitialState: starting state or initial step of the agent towards its goal.
It is the
Actions: It is the description of the possible actions available to the agent.
v Transition Model: It describes what each
action does.
V Goal Test: It determines
if the given state is a goal state.
Path cost: It assigns a numeric cost to each path that follows the goal.
The problem
solving agent selects a cost function, which reflects its performance measure.
Remember, an optimalsolution has the lowest path cost among
all the solutions.
Search Problem
Artificial Intelligence is the study of building agents that act rationally. Most
of the time,
these agents perform some kind of search algorithm in the background
in order to achieve
their tasks.
A search problem consists of:
A State Space. Set of all possible states where you can be.
A Start State. The state from where the search begins.
A
Goal Test. A function that looks at the current state returns
whether or not
it is the goal state.
17
The Solution to a scarch problem is a sequence of actions, callcd the plan that
transforms the start state to the goal state.
This plan is achieved through search algorithms.
Uninformed/Blind Search:
Breadth-first search
Depth-first search
Breadth-first Search:
18
Advantages:
Disadvantages:
It requires lots of memory since cach level of the tree must be saved into memory to
expand the next level.
BFS needs lots of ine if the solution is far away from the root node.
Example:
In the below tree structure, we have shown the traversing of the tree using BFS algorithm
from the root node S to goal node K. BFS search algorithm traverse in layers, so it will follow
the path which is shown by the dotted arrow, and the traversed path wil be:
B Level i
H Leval2
Level 3
evelA
S---> A-->B---->C--->D--->G-->H--->E---->F..>-->K
Time Complexity: Time Complexity
of BFS algorithm can be obtained by the nunber
nodes traversed in BFS until the shallovest
Node. Where the d= depth
of
and b isanode at every state. of shallowest solution
19
T (b)
=
1+b'+b'+...t b'=0 (b')
Space Complexity: Space complexity of BES algorithm is given
by the Memory
frontier which is O(b').
sze
Completeness: BFS is complete, which means if the shallowest goal
node i
BFS will find a
depth, then solution. isalsomefinite
Optimality: BFS is optimal if path cost is a
non-decreasing function of
the depth ofthenode.
2. Depth-first Search
Advantage:
right path).
Disadvantage:
Example:
20
. Depth First Search
Tevel'o
H. Leveli
LLevel 2
Completeness: DFS search algorithm is complete within finite state space as it will expand
every node within a limited search tree.
TimeComplexity: Time complexity of DFS will be equivalent to the node traversed by the
algorithm. It is given by:
Space Complexity: DFS algorithm needs to store only single path from the root node,
space complexity
hence
of DFS is equivalent to the size of the fringe set, which is O(bm).
Optimal: DFS search algorithm is non-optimal, as it may generate a
large number of steps or
high cost to reach to the goal node.
f(n)= g(n).
Advantages:
Best lirst search can switch between DES and DES by gaining. the advantages of botlh
the algorithms.
This algorithm is more eflicient than BES and DFS alyorithms.
Disadvantages:
It can behave as an unguided depth-first search in the worst case scenario.
It can get stuck in a loop as DFS.
Example:
Consider the below search problenm, and we will traverse it using grccdy best-first search. At
cach iteration, cach node is expanded using cvaluation function f(n)=h(u), which is given
in
node
B
T2
B
D.
8
In this search example, we are using two lists which are OPEN and CLOSED Lists.
Following are the iteration for traversing the above examplc.
23
[83( E 9
G 2
Constraint satisfaction
is a technique where a problemn is solved when its valessanif
certain constraints or
rules of the problem. Such deeper
understanding of the type of technique leadsto a
problem structure as
Constraint satisfaction wellas its complexity.
depends on three conponents,
namely:
24
. X: It is a set of variables.
D: It is a set of domains where the variables reside. There is a specific donain for
each variable.
C:It is a set of constraints which are followed by the set of variables.
satisfaction, domains are the spaces where the variables reside, following the
In constraint
a
problem specific constraints. These are the three main elements of constraint satisfaction
technique. The constraint value consists of a pair of {scope, rel). The seope is a tuple of
variables which participate in the constraint and rel is a relation which includes a list of
yalues which the variables can take to satisfy the constraints of the problem.
state-space
A
25
Constraint Satisfaction Problems
CSP can be viewed as a standard search problem as follows:
Successor function: a value can be assigned to any unassigned variable, provided that it
does
not confict with previously assigned
variables.
Goal test:the current assignment
is complete.
Path cost: a constant cost(E.g.,1)
for every step.
Backtracking Search for CSPs
2 3 4 5 6 7
3
4
6 q6
=3x 1014 possible sequences to investigate. A better formulation woud prohibit placing a
qucen in any square that is already attacked. :
OSates! Arangements of n queens (0<n<= 8),one per column in the left most columns
,with no qucen attacking another are states.
o Successor function: Add a queen to any square in the left most empty column such that it
is not attacked by any other queen.
This fornmulation reduces the 8-queen state space from 3 x 1014 to just 2057, and solutions
are easy to find. For the 100 queens the initial formulation has roughly 10400 states whereas
the improved formulation has about 1052 states. This is a huge reduction, but the improved
state space is stilltoo big for the algorithms to handle.
The &-puzzle
An 8-puzzle consists of a 3x3 boardwith eight numbered tiles and a blank space. A tile
adjacent to the balank space can slide into the space. The object is to reach the goal state ,as
shown in figure.
7 2
27
A
typical instance of 8-puzzle
fomulation is as follows:
The problem
specifiesthe location of cach of
the cight tiles und
o States:Astate description
oneof the nine squares.
as initial state. It can bo noted
o stale can be designated the
Initial state: Any
lhatanygivCn
possible initial states.
goalcan be rcached from cxactly half of
the
possible)
infigure
2.4.(0ther goal conligurations are
so the pathh cost 1s
thcnumber of steps in the nail,
o
Path cost: Each step costs 1,
.
belongs to the family of sliding-block puzzles, which are ofen
o 'The&-uzzle
AI. This general class
problems for new search algorithms in is known as NP-complele.
= 181,440 reaclhable states and is easily solyed.
The 8-puzzle has 9!/2
The 24-puzzle (ona5x5 board) has around 1025 states and random
difficult to solve optimally with current machines and
algorithms.
28
Machine Learning
Learning is a
continuous process of
improvement over
experience.
Machinelearning is building machines that can adapt
programmed, and learn from expericnce
without
being explicitly
Definition
Input
(Testirig Dala Set)
Data Learning
(Training Data Set) Algorithm ModeI
Oulput
Machine Learning Model
4A computer program is
said to learn from experience E with respect to some class
of tasks T
and performance measure
P, if its performance at tasksin T, as
measured by P, improves with
experience E."
Experienc
e (E)
Task(T)
From the perspective
of problem, we may define the task as the real-world problem to
solved. The problem can be anything be
like finding best house price
find best marketing strategy etc.
ina specific location or to
On the other hand, if we talk about
machine learning, the
definition of task is different because
it is difficult to solve ML based
tasks by conventional
programming approach.
Performance (P)
An ML algorithm is supposed to perform task and gain cxperience with the passage time.
of
The measure which tells whether ML algorithm is performing as per expectation or not is its
performance (P). P is basically a quantitative metric that tells how a model is performing the
task, T, using its experience, E. There are many metrics that telp to understand the ML
performance, such as accuracy score, FI score, confusion matrix, precision, recall, sensitivity
etc.
2
Examples
•
Performance P: Percent of words correctly classified
Classes of Learning
to automatically learn
Machine learning isa subset of Al, which enables the machine
make prcdictions.
from data, improve performance from past experiences, and
the inputs are already mapped to the output. More preciously, we cn say; first, we train the
3
we
ask the machine
machinc with the input and corresponding oulput, and then to predictthe
output using the test datasct.
an example. Suppose we
Let's understand supervised learning with have an input dataset
of
cats and dog images. So, first,
we will provide
the training to the machine to understand
the
images, such as the shapc size of the tail of cat and dog, Shape of eyes, colour,
&
height
(dogs are taller, cats are smaller), ctc. After completion of training,
we
input the picture
of
a cat
and ask the machine to identify the object and predict the output. Now, the machine is
well traincd, so it will check all the features of the object, such as height, shape, colour,
eyes,
cars, tail, ctc., and find that it's a
cat. So, it will put it in the Cat
category. This
isthe process
of how the machine identifies the objects in Supervised Lcarning.
The main goal of the supervised learning tcchnique is to mapthe input variable(*) with
Supervised machinc learning can be classified into two types of problems, which are oi
below:
Classification
Regression
a) Classification
Classification algorithms are used to solve the classification problems in which the outout
variable is categorical, such as "Yes" or No, Male or Female, Red or Blue, etc. The
classification algorithms predict the categories present in the dataset. Some real-yortd
examples of classi fication algorithms are Spam Detection, Email filtering, etc.
b) Regression
4
Regression algorithms are used to solve regression problems in which there is a linear
relationship between input and output variables. These are used to predict continuous outpui
variables, such as market trends, weather prediction, etc.
Advantages:
Since supervised learning work with the labelled dataset so we can have an exact idea
about the classes of objects.
These algorithms are helpful in predicting the output on the basis of prior experience.
Disadvantages:
In unsupervised learning, the models are trained with the data that is neither
classified nor
labelled, and the model acts on that datawithout any supervision.
Nm 5
Let's take an example te understand it more preciously; suppose therc is a basket of fruit
images, and we input it into the machine learning model. The images are totally unknown to
the model, and the task of the machine is to find the pattcrns and categories of the objects.
So, now the machine will discover its patterns and differences, such as colour diference.
shape difference, and predict the output when it is tested with the test dataset.
Unsupervised Learning can be further classificd into tvwo types, which are given below:
Clustering
Association
1)Clustering
Theclustering technique is used when we want to find the inherent groups from the data. It is
a way to group the objects into a cluster such that the objects with the most similarities
remain in one group and have fewer or no similarities with the objects of other groups. An
example of the clustering algorithm isgrouping the customers by their purchasing behaviour.
2) Association
Some popular algorithms of Association rule learning are Apriori Algorithm, Eclat, FP
growth algorithm.
algorithms
can be used for complicated
These taskS Compared
algorithms work on the unlabeled to the supervised ones
becausethese dataset.
Unsupervised
algorithms are preferable for various
tasks as geting
casier as compared to thelabelled datasct. the unlabeled
dataset is
Disadvantages:
Reinforcement Learning
:
Reinforcement on a
learning works feedback-based process,
an
component)
in which AI agent (A
sofbvare automatically explore its surrounding by hitting & trail,
taking
learning from experiences, and improving its performance. Agent gets
action, rewarded
good| action and get punished for each bad action; hence the goal of
reinforcement
foreach
Iearming agent is to
maximize the rewards.
reinforcement a
The learning process is similar to human being; for example, a
child learns
h nhy a game, where the Game is the environment, moves of an agent at each step define
sates, and the goal of the agent is to get a high score. Agent receives feedback in termns of
punishment and rewards.
Due to its way of working, reinforcement learning is employed in differènt fields such
Categories of Reinforcement
Learning
7
Keintorcement learning is categorized mainly into two types of methods/algorithms:
Advantages
Disadvantage
1. Data Collection
2. Data Preparation
3. Choosing Learning Algorithm
4. Training Model
5. Evaluating Model
6. Predictions
Data Collectlon
on
Data Preparation
Choosing Le arning
Algorithm
Eveluatng Model
Presicton
1. Data Collection
In this stage,
2. Data Preparation
In this stage,
• Data preparation is done to clean the raw data.
• Data collected from the real world is transformed to a clean dataset.
•Raw data may contain missing values, inconsistent values,duplicate instances etc.
• So, raw data cannot be directly used for building a model.
•ltdepends upon the type of problem that needs to solved and the type of data we have.
•1ftheproblem,is'to classify and the data is labeled, classification algorithms are uscd.
•If theproblem is to perform a regression task and the data is labeled, regression
algorithms are used.
•If the problem is to create clusters and the data is unlabeled, clustering algorithms are
used.
The following chart provides the overvievv learning
of algorithms
Machine Learning
SupervIsed
Learmlng EUnsupervlsed
Learnlng
Gausslan tixtures
lassiflcation Regresslon
K-Ateans Clustering
Boosting
-Nearest Nekgnbor Linear Reyression
Hierarchical Clusteing
Naive Bayes Support Vector Regression
Spectral Clustering
Desision Ttees Decslon Tregs
4.
Training Modela.
In thisstage,
5. Evaluating Model
In this stage,
•
The model is evaluated to test if the model is any good.
•The modelis evaluated using the kept-aside testing datasct.
•lt allows to test the model against data that has never been used before for training.
•Metrics such as accuracy, precision, recall etc are used to test the performance.
• If themodel does not perform well, the model is re-built using different hyper
parameters.
•The accuracy may be further improved by tuning the hyper parameters.
Model
Qutput
6.
Predictions
In this stage,
Linear regression algorithm shows a linear relationship belween a dependent (y) and en
as
more indepcndent (y) variables, hence called lincar regression. Since lincar
rcgression
means it finds how thc value of
shows the lincar relationship, which the dependent variable is
changing according to the value of the independent variable.
a
The lincar regression model provides sloped straight linc representing the relationship
betwcen the variables. Consider the below imagc:
Datapoints
Variable
dependent
Line of
regression
independent Variables X
12
Logistic Regression in Machine Learning
Logistic regression is one of the most popular Machine Learning algorithms,
which
comes under the Supervised Learning
technique. It is used for predicting the
categorical dependent variable using a given set of independent variables.
Logistic regression predicts the output ofa categorical dependent variable. Therefore
the outcome must be a categoricalor discrete value. It can either Yes or No, 0 or 1,
b
true or False, etc. but instead of giving the exact value as 0
and 1, it gives the
probabilistic values which lie between 0 and 1.
Logistic Regression is much similar to the Linear Regression except that how they are
used. Linear Regression is used for solving Regression problems, whereas Logistic
regression is used for solving the classification problems.
In Logistic regression, instead of fitting a regression line, we fit an "S" shaped logistic
function, which predicts two maximum values (0 or 1).
The curve from the logistic function indicates the likelihood of something such as
whether the cells are cancerous or not, a mouse is obese or not based on its weight,
etc.
Logistic Regression is a significant machine learning algorithm because it has the
ability to provide probabilities and classify new data using continuous and discrete
datasets.
o Logistic Regression can be used to classify the observations using different types of
data and can easily determine the most effective variables used for the classification.
The below image is showing the logistic function:
0.5
-6 -2 0. 2
The sigmoid function is a mathematical function used to map the predicted values to
probabilities.
Itmaps any real value into another value within a range of0 and 1.
I3
1, which
cannot go beyond
logistic regression must be between 0 and
The valuc of the T he S-form
curve is callecd the
a curve like the "S" form.
this Iimit, so it foms
function.
Sigmoid function or the logistic as g in the
basically used as an input to another function such
The linear function is
following relation -
hg(z) = 0"
)where0< hy < 1
g(z) =
1
1+e-:
wherez =z
which defines the
In logistic regression, we use the concept of the threshold value,
to l, and a
probability of cither 0 or 1. Such as values above the threshold value tends
value below the threshold values tends to 0.
a or
learning process. An artificial neural network (ANN) is often called "Neural Network"
simply Neural Net (NN).
The, artificial, neural, networks are, made of interconnecting artificial neurons which
may share some properties of biological neural networks.
14
Mathematical Model of a Neuroa
-A processing unit sums the inputs, and then applies a non-linear activation function
(ie. squashing /transfer / threshold function).
-
An output line transmits the result to other neurons.
The McCulloch-Pitts Neuron This is a simplified model
of real neurons, kn0Wn as a
Threshold Logic Unit.
Input 1
Input 2 M
>Output
Input n
15
Associations
Learning
Association learning is a
rule-based machine learning and data mining
technique
or features in a data set.
relations between variables
that
Unlikeconventional
finds important
degrees of similarity, association rulelearning
association algorithms measuring
measure identifies
corelations in databases by applying some of interestingness
hjdden 10generate ar
association rule for new searches.
If A
Then B
Here the If element is called antecedent, and then statement is called as Consequent.
These
some association or relation
types relationships where we can find out
of betweentwo items
as single cardinality. It is all about creating rules, and if the number of items
is known
increases, then cardinality also increases accordingly. So, to measure the associations
between thousands of data items, there are several metrics. These metrics are given belos.
Support
Confidence
Lift
Support
Support is the frequency of A or how frequently an item appears in the dataset. lt is
defined as the fraction of the transaction T that contains the itemset X. If there are X datasets.
Freq(X)
Supp(x)=
T
Confidence
Confidence indicates how often the rule has been found to be true. Or how often the
"items X and Y occur together in the dataset when the occurrence of X
s
is already given. It
the ratio of thê transaction that contains X and Y to the number of records that contain A.
Confidence=
Freq(X,Y
Freq(X)
Lift
strength of any rule, which can be
It is the defincd as belowformula:
Supp(X,Y)
Lift=
Supp(X) xSupp(Y)
.h ratio of the observed support
neasure and cxpected support
independent of cach other. It has three
possiblevalues:
if X and Y are
o IfLift= 1:
The probability of occurrence
of antecedent and consequent is independent
of each other.
o Lift>l: It determines the degree to
which the two itemsets are dependent
to cach
other.
Lift<1: It tells us that one item is a
substitute for other items, which mecans onc
item
has a negative effect on another.
Regression
o Linear Regression
Logistic Regression
Classification
a
Unlike regression, the output variable of Classification is category, not value, such
a
as "Green or Blue", "fruit or animal", etc. Since the Classification algorithm is a Supervised
learning technique, hence it takes labeled input data, which means it contains input with thc
corresponding output.
Class A
A Class B
Binary Classifier: If the classification problem has only two possible outcomes, then
it is called as Binary Classifier.
Examples: YES or NO, MALE or FEMALE, SPAM or NOT SPAM, CAT or DOG,
etc.
Multi-class Classifier: Ifa classification problem bas more
than two outCones
it is called as Multi-class
Classificr.
Example: Classifications of types of croDs, Classification of types of mustC.
Natural Language Processing
NILP stands for Natural Laneuame Procesiu!, which is a part of Conp
Seicnee, lIuman language, and Artiicial utellipence, It is the technology
hat s
machines to understand, analyse, manipulate, amd interprct human's languages.
developers to organize knovledpe for nerloruiue tasks sucl as translation, autonnue
summarization, Named Entity Recoguition (NER), speechh recognition, relationsi
extraction, and topic segmentation.
Computer
Science
NLP)
Artificial Hüman
Intelligence 4
Language
Components of NLP
There are the following two componcnts of NLP -
1.Natural Language Understanding (NLU)
2. NaturalLanguage Generation (NLG)
Advantages
questions about any subject and get a directresponse
NLP helps users
to ask within
seconds.
means
the question
answers to it does not offer
o NLP offers cxact unneceSsary
and
unwanted information.
communicate with
humans in t heir languages.
NLPhelps computers to
efficient.
It is very time
use NLP to improve the cfficiency of
Most the companies
of documentation
documentation. and identify the information
processes, accuracy of
fromlarge
databases.
Disadvantages
A list of
disadvantages of NLP is given below:
NLP is unpredictable
NLP may require more keystrokes.
unable to adapt to the new domain, and has a
it
NLP is limited function that'swhy
NLP is built for a single and specific task only.
Intelligence (Al) techrnology to process human speech into readable text. Automatic speech
20
Lexicon
Acoustic model
Language model
Decoding
«most likely words
spokens
Lexicon
Acoustic Model
Language Model
Together, the lexicon, acoustic model, and language model enable ASR systems
to make
close-to-accurate predictions about the words and sentences in an audio input.
2)
word
system requires calculating tlhe
speech-recognition accuracy of an ASR
Figuring out the
error rate (WER).
words spoken
insertions + deletions / the number of
WER = substitutions + specch
to note that the utility of
Robotics
Robotics is a separate entity in Artificial
Intelligence that helps study the creation of
load.The primary function of the power supply is to convert electrical current to power
the load.
o. Electric Motors: These are the devices that convert electrical cnergy into, mechanical
energy and are required for the rotational motion of the machines.
Pneumatic Air Muscles: Air Muscles are soft pneumatic devices that are ideally best
fitted for robötics. They can contract andextend and operate by pressurized air filling a
Muscles wire: These are made up of nickel-titanium alloy called Nitinol and are very
thin in shape. It can also extend and contract when a specific amount of heat and electric
current is supplied into it. Also, it can be formed and bent into different shapes
when it is
22
in its martensitic lorm. They cn contract by s% when clectrical current passes through
thein.
Piezo Motors nd Ulrasonic lotors: Piczoclectric motors or Piczo motors arc the
electrical! devices that receive an clectric signal and apply a
directional force to an
opposing ceramic plate. It helps a robot to move in thc desircd direction. These are the
best suited electrical motors for industrial robots.
Sensor: They provide the ability like sec, hear, touch and movement like
humans. Sensors ure the devices or nachines which help to detect the events or
chinges
in the eviroment cnd send duta to the computer processor. These devices are usually
equipped with other electronic devices, Similar to human organs, the clectrical sensor
also plays a crucial role in Artificial Intelligence & robotics. Al algorithms control robots
by sensing the cnvironment, and it provides real-time information to computcr
processors.
Actuators
Power Electric
Supply 1****
Cemponents
of
Robot Pneumatic
Muscle Air Muscles
Wires
Piezo
Motors and Sensors
Menrs
23