0% found this document useful (0 votes)
12 views9 pages

Ai Imp-1

College purpose

Uploaded by

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

Ai Imp-1

College purpose

Uploaded by

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

Que1: What is Artificial Intelligence? Discuss the main branches of Artificial Intelligences.

Ans:
Artificial Intelligence:
Artificial intelligence is the simulation of human intelligence processes by machines, especially computer
systems. Specific applications of AI include expert systems, natural language processing, speech
recognition and machine vision.
Main Branches of Artificial Intelligence:
1. Machine Learning: It is one of the most demanding disciplines in advanced technology, and it
generates a lot of excitement every time a new product is released by a firm that uses ML
techniques and algorithms to serve the consumer uniquely.
a. Supervised Learning: ​Data professionals input labelled training data to algorithms and
establish variables for accessing and detecting correlations in this form of learning. The
algorithm's input and output are both specific/defined. this is the second branches of Artificial
intelligence.
b. Unsupervised Learning: Algorithms that train on unlabeled data analyze datasets to generate
meaningful connections or inferences are examples of this form of learning.
c. Reinforcement Learning: Reinforcement learning is used to educate a computer machine on
how to complete a multi-step process with clearly stated rules.
2. Neural Network: The neural network is a kind of artificial intelligence that uses neurology to
complete tasks while incorporating cognitive science and machinery. In simple terms, a neural
network is a set of algorithms that are used to uncover elemental links across large amounts of data
using a technique that mimics the human brain's operation.
3. Robotics: The design and construction of robots is a fascinating area of research and development.
a. Robotics is a multidisciplinary science and engineering field that includes mechanical
engineering, electrical engineering, computer science, and a variety of other disciplines.
b. Robotics is the science that governs how robots are designed, manufactured, operated, and
used. It deals with the control, intelligent results, and data transformation of computer
systems.
4. Expert Systems: Expert systems were among the earliest effective AI software models. They were
first designed in the 1970s and then increased in the 1980s. This is accomplished by drawing
knowledge from its knowledge base and applying reasoning and insights rules to the user's queries.
The expert system's efficiency is entirely dependent on the expert's knowledge, which is stored in a
knowledge base.
5. Fuzzy Logic: Where it is difficult to determine if a condition is true or false; its fuzzy logic allows for
significant flexibility in reasoning, which leads to mistakes and uncertainties in every situation. Fuzzy
logic, to put it another way, is a strategy for representing and modifying ambiguous information by
determining the degree to which the hypothesis is right.
6. Natural Language Processing: NLP is a branch of computer science and artificial intelligence that
allows computers and humans to communicate using natural language. It's a method of analyzing
human languages using computers. By simulating human natural language, it allows a machine to
comprehend and understand data.

Que2: Show that “If you into the sky and I am alert then, I will see a dim star or if I am not alert then I
will not see a dim star” is valid.
Ans:
Sol: Let us symbolize the statements by using propositional atoms.
P : If you into the sky.
Q : I am alert
R : I will see a dim star.
Formula corresponding to a text:
Ɑ: ((P ⋀ Q)→ R)⋁ (~Q→~R)
Truth Table:

P Q R ~Q ~R P⋀Q P ⋀ Q→ R ~Q→~R ((P ⋀ Q)→ R)⋁ (~Q→~R)

T T T F F T T T T
T T F F T T F T T
T F T T F F T F T
T F F T T F T T T
F T T F F F T T T
F T F F T F T T T
F F T T F F T F T
F F F T T F T T T

Que3: Problem Statement:


1. Ravi likes all kind of food.
2. Apples and Chicken are food.
3. Anything anyone eats and is not killed is food.
4. Ajay eats peanuts and is still alive.
5. Rita eats everything that Ajay eats.
Prove by resolution that Ravi likes peanuts using resolution.
Ans:
Solution:
Step 1: Converting the given statements into Predicate/Propositional Logic
i. ∀x : food(x) → likes (Ravi, x)
ii. food (Apple) ^ food (chicken)
iii. ∀a : ∀b: eats (a, b) ^ killed (a) → food (b)
iv. eats (Ajay, Peanuts) ^ alive (Ajay)
v. ∀c : eats (Ajay, c) → eats (Rita, c)
vi. ∀d : alive(d) → ~killed (d)
vii. ∀e: ~killed(e) → alive(e)
Conclusion: likes (Ravi, Peanuts)
Step 2: Convert into CNF
i. ~food(x) v likes (Ravi, x)
ii. Food (apple)
iii. Food (chicken)
iv. ~ eats (a, b) v killed (a) v food (b)
v. Eats (Ajay, Peanuts)
vi. Alive (Ajay)
vii. ~eats (Ajay, c) V eats (Rita, c)
viii. ~alive (d) v ~ killed (d)
ix. Killed (e) v alive (e)
Conclusion: likes (Ravi, Peanuts)
Step 3: Negate the conclusion
~ likes (Ravi, Peanuts)
Step 4: Resolve using a resolution tree

Que4: Write a FOL of following statements.


I. None of my friends are perfect.
II. Every student smiles.
III. Every student walks or talks.
IV. Every student who loves Yash is happy.
V. Anyone who loves everyone loves himself.
VI. Someone Dance and someone Singing.
Ans:
I. ¬∃x(F(x)∧P(x))
II. ∀x (student(x) → smile( x))
III. ∀x (student(x) → (walk (x) ∨ talk (x)))
IV. ∀x ((student(x) & love (x, Yash)) → happy (x)))
V. ∀x(∀y love (x,y)→ (love(x,x))
note: Not this: ∀x∀y (love (x,y)→ love(x,x)) What this one says is “Anyone who loves anyone loves
himself” What the correct one says is IF you love everyone, THEN you love yourself. So the ∀y
quantifier has to be inside the scope of the →.
VI. (∃x dance (x) & ∃x singing (x)) or (∃x dance (x) & ∃y singing (y))
Because neither quantifier is inside the scope of the other – i.e. their scopes are independent – it
doesn’t matter whether we use different variables here or use the same variable twice. But if one
quantifier is inside the scope of the other, then it matters a great deal. When one quantifier is inside
the scope of another, as in questions 4 and 5 above, always give them different variables! Also
equivalent: ∃x∃y(dance (x) & singing (y)).

Que4: Explain properties of good knowledges based system


Ans:
● Representational Accuracy: It should represent all kinds of required knowledge.
● Inferential Adequacy: It should be able to manipulate the representational structures to produce new
knowledge corresponding to the existing structure.
● Inferential Efficiency: The ability to direct the inferential knowledge mechanism into the most
productive directions by storing appropriate guides.
● Acquisitional efficiency: The ability to acquire new knowledge easily using automatic methods.

Que5: Explain backward chaining and forward chaining with example.


Ans:
Backward chaining:
● It is known as a top-down approach.
● Backward-chaining is based on modus ponens inference rule.
● In backward chaining, the goal is broken into sub-goal or sub-goals to prove the facts true.
● It is called a goal-driven approach, as a list of goals decides which rules are selected and used.
● Backward -chaining algorithm is used in game theory, automated theorem proving tools, inference
engines, proof assistants, and various AI applications.
● The backward-chaining method mostly used a depth-first search strategy for proof.
● Example,
B
A->B
A
Forward Chaining:
● It is a down-up approach, as it moves from bottom to top.
● It is a process of making a conclusion based on known facts or data, by starting from the initial state
and reaches the goal state.
● Forward-chaining approach is also called as data-driven as we reach to the goal using available
data.
● Forward -chaining approach is commonly used in the expert system, such as CLIPS, business, and
production rule systems.
● Example,
A
A->B
B

Ques6: Differentiate between supervised and unsupervised learning.


Ans:
Supervised Learning Unsupervised Learning
This algorithms are trained using labeled data. This algorithms are trained using unlabeled data.

This model takes direct feedback to check the correct This model does not take any feedback.
output or not.
It predicts the output. It finds the hidden patterns in data.
Input data is provided to the model along with the only input data is provided to the model.
output.
The goal of supervised learning is to train the model The goal of unsupervised learning is to find the
so that it can predict the output in given data. hidden patterns from unknown dataset.
It needs supervision to train the model. Does not need any supervision to train the model.
Categorize into Classification and Regression Clustering and Associations problems.
problems.
It’s used for those cases where we know the input as only know the input not output data.
well as corresponding outputs.
It includes various algorithms such as Linear It includes various algorithms such as Clustering,
Regression, Logistic ,Support, Vector Machine, KNN, and Apriori algorithm.
Bayesian Logic, etc.

Que7: The values of independent variable x and dependent variable y are given below.

x 0 1 2 3 4
y 2 3 5 4 6
Find the least square regression line y=ax+b. Estimate The Value Of Y When x is 10.
Ans:
a)
x y xy x2
0 2 0 0
1 3 3 1
2 5 10 4
3 4 12 9
4 6 24 16
∑x=10 ∑y=20 ∑xy=49 ∑x2=30

We now calculate a and b using the least square regression formulas for a and b.
a = (nΣx*y - Σx*Σy) / (nΣx2 - (Σx)2) = (5*49 - 10*20) / (5*30 - 102) = 0.9
b = (1/n)(Σy - a*Σx) = (1/5)(20 - 0.9*10) = 2.2
b) Now that we have the least square regression line y = 0.9 x + 2.2, substitute x by 10 to find the value of
the corresponding y.
y = 0.9 * 10 + 2.2 = 11.2

Que8: The values of independent variable x and dependent variable y are given below.

x 0 1 2 3 4
y 2 3 5 6 6
Find the least square regression line y=ax+b. Estimate The Value Of Y When x is 10.
Ans:
a)
x y xy x2
0 2 0 0
1 3 3 1
2 5 10 4
3 6 18 9
4 6 24 16
∑x=10 ∑y=22 ∑xy=52 ∑x2=30

We now calculate a and b using the least square regression formulas for a and b.
a = (nΣx*y - Σx*Σy) / (nΣx2 - (Σx)2) = (5*52 - 10*22) / (5*30 - 102) = 0.8
b = (1/n)(Σy - a*Σx) = (1/5)(22 - 0.8*10) = 2.8
b) Now that we have the least square regression line y = 0.8 x + 2.8, substitute x by 10 to find the value of
the corresponding y.
y = 0.8 * 10 + 2.8 = 10.8
Que9: To evaluate the performance of a trained model confusion matrix plotted which is given
below.
0 1
0 61 3
1 3 104
Ans:

↓ ACTUAL
TP FP
Predict→
FN TN

True 171 no yes


Label no(0) 61 3 64
yes(1) 3 104 107
64 107
Predicated label
Here,
TP = 61 : 61 positive class data points were correctly classified by the model.
FP = 3 : 3 negative class data points were incorrectly classified as belonging to the positive
FN = 3
TN = 104
To evaluate performance
Accuracy = TP+TN /TP+FP+TN+FN =61+104/61+3+104+3 = 165/171 =0.96
96% Accuracy
Precision = TP/TP+FP =61/61+3 = 61/64 =0.95
95% of the correctly predicted cases turned out to be positive cases.
Recall = TP/TP+FN =61/61+3 =61/64 =0.95
95% of positives were successfully predicted by our model.

Que10: Explain Robotics Process Automation Chatbot.


Ans:
A chatbot is a piece of software or computer program that mimics human interaction via voice or text
exchange. More uses is uses chatbot on social sites.
It is used for any major messaging application chatbot takes three simple actions such as:(1)Understanding
(2)Action on it (3)Answering.
Types Of Chatbot:
● Text-based-chatbot: User question and bot answer in text interface.
● Voice based chatbot: bot answer and user questions via human voice interface.

Que11: Explain logistic regression algorithm with suitable example.


Ans:
Logistic regression is an example of supervised learning. It is used to calculate or predict the probability of a
binary (yes/no) event occurring. An example of logistic regression could be applying machine learning to
determine if a person is likely to be infected with COVID-19 or not. Since we have two possible outcomes to
this question - yes they are infected, or no they are not infected - this is called binary classification.
In this imaginary example, the probability of a person being infected with COVID-19 could be based on the
viral load and the symptoms and the presence of antibodies, etc.

Que12: Define machine learning? Briefly explain the types of machine learning.
Ans:
Machine Learning:Machine learning is a subset of AI, which enables the machine to automatically learn
from data, improve performance from past experiences, and make predictions.
Types of Machine Learning:
1. Supervised Learning: Supervised learning technique, we train the machines using the "labelled"
dataset, and based on the training, the machine predicts the output.Supervised machine learning
can be classified into two types of problems, which are given below:
● Classification
● Regression
2. Unsupervised ML: In unsupervised learning, the models are trained with the data that is neither
classified nor labelled, and the model acts on that data without any supervision.Unsupervised
Learning can be further classified into two types, which are given below:
● Clustering
● Association
3. Semi-Supervised Learning: Semi-Supervised learning is a type of Machine Learning algorithm that
lies between Supervised and Unsupervised machine learning.
4. Reinforcement Learning: Reinforcement learning works on a feedback-based process, in which an
AI agent (A software component) automatically explore its surrounding by hitting & trail, taking
action, learning from experiences, and improving its performance. Reinforcement learning is
categorized mainly into two types of methods/algorithms:
● Positive Reinforcement Learning
● Negative Reinforcement Learning

Que13: Why do we use pooling layers in CNN?


Ans: CNN:
● CNN stands for Convolution Neural Network.
● Pooling layers are used to reduce the dimensions of the feature maps. Thus, it reduces the number
of parameters to learn and the amount of computation performed in the network.
● The pooling layer summarises the features present in a region of the feature map generated by a
convolution layer.

Que14: How ReLU activation function works in CNN?


Ans: ReLU:
ReLU stands for rectified linear activation unit and is considered one of the few milestones in the deep
learning revolution. It is simple yet really better than its predecessor activation functions such as sigmoid or
tanh.
ReLU activation function formula
f(x)=max(0,x)
ReLU function is its derivative both are monotonic. The function returns 0 if it receives any negative input,
but for any positive value x, it returns that value back. Thus it gives an output that has a range from 0 to
infinity.
def ReLU(x):
if x>0:
return x
else:
return 0

Que15: Explain uses and applications of Deep Learning.


Ans:
Deep learning applications are used in industries from automated driving to medical devices.
Automated Driving: Automotive researchers are using deep learning to automatically detect objects such as
stop signs and traffic lights. In addition, deep learning is used to detect pedestrians, which helps decrease
accidents.
Applications of Deep Learning:
1. Automatic text generation
2. Healthcare
3. Image recognition
4. Predicting Earthquakes
5. Automatic Machine Translation: Certain words,phases,sentences transform one lang to another.
6. Fraud detection
7. Virtual Assistance
8. Automatic game playing
9. Adding sound to silent movies

Que16: Why we need Back propagation? Explain Back propagation Algorithm.


Ans:
● Backpropagation, or backward propagation of errors, is an algorithm that is designed to test for
errors working back from output nodes to input nodes.
● It is an important mathematical tool for improving the accuracy of predictions in data mining and
machine learning. Essentially, backpropagation is an algorithm used to calculate derivatives quickly.
● There are two leading types of backpropagation networks:
1. Static backpropagation. Static backpropagation is a network developed to map static inputs for
static outputs. Static backpropagation networks can solve static classification problems, such as
optical character recognition (OCR).
2. Recurrent backpropagation. The recurrent backpropagation network is used for fixed-point
learning. Recurrent backpropagation activation feeds forward until it reaches a fixed value.

Que17: Write A Short Notes.


Ans:
a. Application of AI: Artificial Intelligence has various applications in today's society. It is becoming
essential for today's time because it can solve complex problems with an efficient way in multiple
industries, such as
i. Social Media vii. Entertainment
ii. Robotics viii. E-commerce
iii. Gaming ix. Education
iv. Finance x. Agriculture
v. Data Security xi. Transport
vi. Health care xii. Astronomy
b. LSTM:
i. LSTM Stands for Long Short Term Memory.
ii. LSTM is an artificial neural network used in the field of artificial intelligence and deep
learning.
iii. LSTMs are predominately used to learn, process, and classify sequential data because
these networks can learn long-term dependencies between time steps of data.
iv. Common LSTM applications include sentiment analysis, language modelling, speech
recognition, and video analysis.
c. NLP:
i. NLP stands for Natural Language Processing, which is part of computer science, human
language and artificial intelligence. It is technology that is used by machines to understand,
analyze, manipulate and interpret the human language.
ii. It helps developers to organize knowledge for performing task such as translation,
automation, speech recognition and topic segmentation.
iii. NLP consists of various application like speech recognition, machine translation and text
reading, example, amazon,alexa.
d. Image Processing:
i. It is process of transforming an image into a digital form and performing certain operations to
get some useful information from it. Asuall all images treat as 2D signals when applying
certain predetermined signal processing method.
ii. Types of image processing:
1. Visualization
2. Recognization
3. Pattern recognition
4. Retrival
5. Sharpening and Restoration.
e. Speech Recognization:
i. It is also know as automatic speech recognization. It is a conversion in between speech to
text.
ii. It is a capability which enables a program to process human speech into a written format.
iii. Speech recognition focuses on the translation of speech from a verbal format to tex.
iv. Application:
1. Voice speech
2. Speech to text
3. Voice command to smart home device
f. Data Center:
i. It is a physical room building or facility that houses IT infrastructure for building, running and
delivering applications and services for storing and managing the data associated with
application and services.
ii. Data Center provides housing virtualised IT infrastructure for the shared use of multiple
companies and customers.
g. Key Processor of AI: Which are designed on the basic of machine learning and artificial neural
network. These processor are fast and able to read the human behavioural connection.
h. FPGA:
i. The term FPGA stands for Field Programmable Gate Array and, it is a one type of
semiconductor logic chip which can be programmed to become almost any kind of system or
digital circuit, similar to PLDs.
ii. PLDS are limited to hundreds of gates, but FPGAs supports thousands of gates. The
configuration of the FPGA architecture is generally specified using a language, i.e., HDL
(Hardware Description language).
i. Chatbot:
i. A chatbot is a piece of software or a computer program that mimics human
interaction via voice or text exchanges. More users are using chatbot virtual
assistants to complete basic activities or get a solution addressed in
business-to-business (B2B) and business-to-consumer (B2C) settings.
ii. Chatbots take three simple actions:
1. Understanding
2. acting on it,
3. answering.
j. Limitation of AI:
i. PROS:
1. Doesn’t get tired & wear out easily
2. Rational decision maker
3. Applications in medical industry
4. Accurate decision making
5. Selfless with no breaks
ii. CONS:
1. Incurs high cost
2. Leads to unemployment
3. No improvement with experience
4. Lacks in creativity
k. Linear Regression:
i. Linear Regression is a machine learning algorithm based on supervised learning.
ii. It performs a regression task. Regression models a target prediction value based on
independent variables.
iii. It is mostly used for finding out the relationship between variables and forecasting.
l. Essential of Data Analysis:
i. Data Analysis is essential as it helps businesses understand their customers better,
improves sales, improves customer targeting, reduces costs, and allows for the creation of
better problem-solving strategies.
ii. This badge earner has demonstrated a foundational knowledge of Data Analytics.
iii. Data Analysis is the process of systematically applying statistical and/or logical techniques to
describe and illustrate, condense and recap, and evaluate data.
m. Training Data & Testing Data:
i. In machine learning, datasets are split into two subsets.
ii. The first subset is known as the training data - it's a portion of our actual dataset that is fed
into the machine learning model to discover and learn patterns.
iii. In this way, it trains our model.
iv. The other subset is known as the testing data.

Que18: Find the least square regression line for the following dataset.

X 2 2 6 8 10
Y 0 1 2 3 3
Ans:
Sol:

x y x2 xy
2 0 4 0
2 1 4 2
6 2 36 12
8 3 64 24
10 3 100 30
2
∑x=28 ∑y=9 ∑x =208 ∑xy=68
In the last line of the table we have the sum of the numbers in each column. Using them we compute:

The errors in fitting data with the least squares regression line.

You might also like