Latest AI Book + Sample Paper 2025 PDF
Latest AI Book + Sample Paper 2025 PDF
FACILITATOR HANDBOOK
Artificial
Intelligence
Curriculum
Class 10
Curated with support from Intel®
Acknowledgements
Patrons:
• Sh. Ramesh Pokhriyal 'Nishank', Minister of Human Resource Development, Government
of India
• Sh. Dhotre Sanjay Shamrao, Minister of State for Human Resource Development,
Government of India
Human Resource Development, Government of India Advisory, Editorial and Creative Inputs:
• Ms. Anita Karwal, IAS, Chairperson, Central Board of Secondary Education
• Ms. Shweta Khurana, Director, Programs, Partnerships and Policy Group, Intel India
Feedback By:
• Ms. Neelam Roy, ITL Public School, Delhi
• Ms. Mehreen Shamim, TGT, DPS Bangalore East, Bengaluru
• Ms. Saswati Sarangi, PGT Computer Science, RCIS Kalyan Nagar, Bengaluru
• Ms. Aayushi Agrawal, Salwan Girls School, Delhi
• Ms. Isha, HOD Computer Science, Salwan Public School, Delhi
India’s own AI strategy identifies AI as a n opportunity and solution provider for inclusive economic
growth and social development. The report also identifies the importance of skills-based education
(as opposed to knowledge intensive education), and the value of project related work in order to
“effectively harness the potential of AI in a sustainable manner” to make India’s next generation ‘AI
ready’.
As a beginning in this direction, CBSE introduced Artificial Intelligence as an optional subject at Class
IX from the Session 2019-2020 onwards. Also, to enhance the multidisciplinary approach in teaching-
learning so as to sensitize the new generation, it was decided that schools may start AI “Inspire
Module” of 12 hours at class VIII itself. CBSE has extended this subject to class X as well from the
Session 2020-2021.
CBSE is already offering various skill subjects at secondary and senior secondary level to upgrade the
skills and proficiency of the young generation and also to provide them awareness to explore various
career options. Ai secondary level, a skill subject may be offered as additional sixth subject along with
the existing five compulsory subjects.
CBSE acknowledges the initiative by Intel India in curating this Facilitator Handbook, the AI training
video and managing the subsequent trainings of trainers on the Artificial Intelligence Curriculum.
The aim is to strive together to make our students future ready and help them work on incorporating
Artificial Intelligence to improve their learning experience.
Table of Contents
Life without machines today is unimaginable, and because of this, humans have been putting efforts
into making them even more sophisticated and smart. As a result, we are surrounded by smart devices
and gadgets like smartphones, smartwatches, smart TV, etc. But what makes them smart?
For example, how is a smartphone today different from the telephones we had in the last century?
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Today’s phones can do much more than just call-up
people. They can help us in navigating, recommend
which songs we should listen to or which movies we
should watch according to our own likes and
dislikes. Our phones can help us connect with like-
minded people, make our selfies fun with face
filters, help us maintain a record of our health and
fitness and a lot more. These drastic technological
advancements lead us to recognize one key
concept: the concept of Artificial Intelligence.
What is Artificial Intelligence anyway? Well, the answer lies in the term itself. If we break up this term
up, we get the words “Artificial” and “Intelligence”. Artificial is something which is man-made, which
does not occur naturally. But what about Intelligence, how do we define that?
According to researchers, intelligence is the ‘ability to perceive or infer information, and to retain it as
knowledge to be applied towards adaptive behaviours within an environment or context.’
If we try to define intelligence with the help of its traits, these are the abilities that are involved in
intelligence:
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Let us define each term mentioned above to get a proper understanding:
Spatial Visual •It is defined as the ability to perceive the visual world and the
Intelligence relationship of one object to another.
Kineasthetic •Ability that is related to how a person uses his limbs in a skilled
Intelligence manilr.
Musical •As the name suggests, this intelligence is about a person's ability to
Intelligence recognize and create sounds, rhythms, and sound patterns.
Intrapersonal •Describes how high the level of self-awareness someone has is.
Intelligence Starting from realizing weakness, strength, to his own feelings.
But even though one is more skilled in intelligence than the other, it should be noted that in fact all humans have all 9 of
these intelligences only at different levels. One might be an expert at painting, while the other might be an expert in
mathematical calculations. One is a musician, the other is an expert dancer.
In other words, we may define intelligence as:
For example, if someone starts talking to us, we know how to keep the conversation going. We can
understand what people mean and can reply in the same way. When we are hungry, we can come up
with various options on what to eat depending upon the food we have at our homes. When we read
something, we are able to understand its meaning and answer anything regarding it.
While understanding the term intelligence, it must be noticed that decision making comprises of a
crucial part of intelligence. Let us delve deeper into it.
Decision Making
You’re trapped. All the doors seem to have started shrinking and only one of them leads you out.
Which door would you pick?
We can’t make “good” decisions without information because then we have to deal with unknown
factors and face uncertainty, which leads us to make wild guesses, flipping coins, or rolling a dice.
Having knowledge, experience, or insights given a certain situation, helps us visualize what the
outcomes could be. and how we can achieve/avoid those outcomes.
Scenario 1
You are locked inside a room with 3 doors to move out of the locked room and you need to find a safe
door to get your way out. Behind the 1st door is a lake with a deadly shark. The 2nd door has a mad
psychopath ready to kill with a weapon and the third one has a lion that has not eaten since the last 2
months.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Which door would you choose? and Why?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
The answer is gate number 3. The reason being that since the lion has not eaten for 2 months, he
wouldn't have survived till now and would already be dead . This makes going out from gate 3 the
correct option.
Scenario 2
Aarti invited four of her friends to her House.. They hadn't seen each other in a long time, so they
chatted all night long and had a good time. In the morning, two of the friends Aarti had invited, died.
The police arrived at the house and found that both the friends were poisoned and that the poison
was in the strawberry pie. The three surviving friends told the police that they hadn't eaten the pie.
The police asked," Why didn’t you eat the pie ?". Shiv said, " I am allergic to strawberries.". Seema
said, " I am on a diet." And Aarti said, "I ate too many strawberries while cooking the pie, I just didn't
want anymore."
The policemen looked at the pictures of the party and immediately identified the murderer.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Look at the picture and identify who is the murderer? Also state why do you think this is the murderer?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
The answer is Seema, can you guess how the police could tell? It’s because she said she is on a diet
and in the picture, she is eating a burger and fries which means she lied.
The above scenarios show that it’s the information which helps humans take good decisions.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
For example, in elementary school, we learn about alphabets and eventually we move ahead to
making words with them. As we grow, we become more and more fluent in the language as we keep
learning new words and use them in our conversations.
Every now and then, we surf the internet for things on Google
without realizing how efficiently Google always responds to us
with accurate answers. Not only does it come up with results
to our search in a matter of seconds, it also suggests and auto-
corrects our typed sentences.
To help us navigate to places, apps like UBER and Google Maps come in haman.
Thus, one no longer needs to stop repeatedly to ask for directions.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
AI has not only made our lives easier but has also been
taking care of our habits, likes, and dislikes. This is why
platforms like Netflix, Amazon, Spotify, YouTube etc.
show us recommendations on the basis of what we
like.
A fully automatic washing machine can work on its own, but it requires human
intervention to select the parameters of washing and to do the necessary preparation for
it to function correctly before each wash, which makes it an example of automation, not
AI.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
An air conditioner can be turned on and off remotely with the help of internet but still
needs a human touch. This is an example of Internet of Things (IoT). Also, every now and
then we get to know about robots which might follow a path or maybe can avoid
obstacles but need to be primed accordingly each time.
We also get to see a lot of projects which can automate our surroundings with the
help of sensors. Here too, since the bot or the automation machine is not trained with
any data, it does not count as AI.
Also, it would be valid to say that not all the devices which are termed as "smart" are AI-enabled. For
example, a TV does not become AI-enabled if it is a smart one, it gets the power of AI when it is able
to think and process on its own.
Just as humans learn how to walk and then improve this skill with the help of their experiences, an AI
machine too gets trained first on the training data and then optimises itself according to its own
experiences which makes AI different from any other technological device/machine.
But well, surely these other technologies too can be integrated with AI to provide the users with a
much better and immersive experience!
Robotics and AI can definitely open the doors to humanoids and self-driving cars, AI when merged
with Internet of things can give rise to cloud computing of data and remote access of AI tools,
automation along with AI can help in achieving voice automated homes and so on. Such integrations
can help us get the best of both worlds!
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Introduction to AI: Basics of AI
As discussed in the last chapter, Artificial Intelligence has always been a term which intrigues people
all over the world. Various organisations have coined their own versions of defining Artificial
Intelligence. Some of them are mentioned below:
European Artificial Intelligence (AI) leadership, the path for an integrated vision
AI is not a well-defined technology and no universally agreed definition exists. It is rather a cover term
for techniques associated with data analysis and pattern recognition. AI is not a new technology,
having existed since the 1950s. While some markets, sectors and individual businesses are more
advanced than others, AI is still at a relatively early stage of development, so that the range of
potential applications, and the quality of most existing applications, have ample margins left for
further development and improvement.
Encyclopaedia Britannica
Artificial intelligence (AI), is the ability of a digital computer or computer-controlled robot to
perform tasks commonly associated with intelligent beings. The term is frequently applied to the
project of developing systems endowed with the intellectual processes characteristic of humans, such
as the ability to reason, discover meaning, generalize, or learn from past experience.
As you can see, Artificial Intelligence is a vast domain. Everyone looks at AI in a different way according
to their mindset. Now, according to your knowledge of AI, start filling the KWLH chart:
K • What I Know?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
In other words, AI can be defined as:
AI theory and development of computer systems (both machines and software) enables machines to
perform tasks that normally require human intelligence.
Artificial Intelligence covers a broad range of domains and applications and is expected to impact every
field in the future. Overall, its core idea is building machines and algorithms which are capable of
performing computational tasks that would otherwise require human like brain functions.
AI, ML & DL
As you have been progressing towards building AI readiness, you must have come across a very
common dilemma between Artificial Intelligence (AI) and Machine Learning (ML). Many times, these
terms are used interchangeably but are they the same? Is there no difference in Machine Learning
and Artificial Intelligence? Is Deep Learning (DL) Also Artificial Intelligence? What exactly is Deep
Learning? Let us see.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Deep Learning (DL)
It enables software to train itself to perform tasks with vast amounts of data. In Deep Learning, the
machine is trained with huge amounts of data which helps it in training itself around the data. Such
machines are intelligent enough to develop algorithms for themselves. Deep Learning is the most
advanced form of Artificial Intelligence out of these three. Then comes Machine Learning which is
intermediately intelligent and Artificial Intelligence covers all the concepts and algorithms which, in
some way or the other mimic human intelligence.
There are a lot of applications of AI out of which few are those which come under ML out of which
very few can be labelled as DL. Therefore, Machine Learning (ML) and Deep Learning (DL) are part of
Artificial Intelligence (AI), but not everything that is Machine learning will be Deep learning.
Introduction to AI Domains
Artificial Intelligence becomes intelligent according to the training which it gets. For training, the
machine is fed with datasets. According to the applications for which the AI algorithm is being
developed, the data which is fed into it changes. With respect to the type of data fed in the AI
model, AI models can be broadly categorised into three domains:
Data Sciences
Data sciences is a domain of AI related to data systems and processes, in which the system collects
numerous data, maintains data sets and derives meaning/sense out of them.
The information extracted through data science can be used to make a decision about it.
Computer Vision
Computer Vision, abbreviated as CV, is a domain of AI that depicts the capability of a machine to get
and analyse visual information and afterwards predict some decisions about it. The entire process
involves image acquiring, screening, analysing, identifying and extracting information. This extensive
processing helps computers to understand any visual content and act on it accordingly. In computer
vision, Input to machines can be photographs, videos and pictures from thermal or infrared sensors,
indicators and different sources.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Computer vision related projects translate digital visual data into descriptions. This data is then turned
into computer-readable language to aid the decision-making process. The main objective of this
domain of AI is to teach machines to collect information from pixels.
The ultimate objective of NLP is to read, decipher, understand, and make sense of the human languages
in a manilr that is valuable.
Email filters
Email filters are one of the most basic and
initial applications of NLP online. It started
out with spam filters, uncovering certain
words or phrases that signal a spam
message.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Smart assistants
Smart assistants like Apple’s Siri and Amazon’s Alexa recognize
patterns in speech, then infer meaning and provide a useful
response.
AI Ethics
Nowadays, we are moving from the Information era to Artificial Intelligence era. Now we do not use
data or information, but the intelligence collected from the data to build solutions. These solutions
can even recommend the next TV show or movies you should watch on Netflix.
We can proudly say that India is leading in the AI usage trends, so we need to keep aspects relating to
ethical practices in mind while developing solutions using AI. Let us understand some of the ethical
concerns in detail.
Scenario 1:
Let us imagine that we are in year 2030. Self-Driving cars which are just a concept in today’s time are
now on roads. People like us are buying them for ease and are using it for our daily transits. Of-course
because of all the features which this car has, it is expensive. Now, let us assume, one day your father
is going to office in his self-driving car. He is sitting in the back seat as the car is driving itself. Suddenly,
a small boy comes in front of this car. The incident was so sudden that the car is only able to make
either of the two choices:
1. Go straight and hit the boy who has come in front of the car and injure him severely.
2. Take a sharp right turn to save the boy and smash the car into a metal pole thus damaging the car
as well as injuring the person sitting in it.
With the help of this scenario, we need to understand that the developer of the car goes through all
such dilemmas while developing the car’s algorithm. Thus, here the morality of the developer gets
transferred into the machine as what according to him/her is right would have a higher priority and
hence would be the selection made by the machine.
If you were in the place of this developer and if there was no other alternative to the situation, which
one of the two would you prioritise and why?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Scenario 2:
Let us now assume that the car has hit the boy who came in front of it. Considering this as an accident,
who should be held responsible for it? Why?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Here, the choices might differ from person to person and one must understand that nobody is wrong
in this case. Every person has a different perspective and hence he/she takes decisions according to
their moralities.
Data Privacy
The world of Artificial Intelligence revolves around Data. Every company whether small or big is mining
data from as many sources as possible. More than 70% of the data collected till now has been collected
in the last 3 years which shows how important data has become in recent times. It is not wrongly said
that Data is the new gold. This makes us think:
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
One of the major sources of data for many major companies is the device which all of us have in our
hands all the time: Smartphones. Smartphones have nowadays become an integral part of our lives.
Most of us use smartphones more than we interact with people around us. Smartphones in today’s
era provide us with a lot of facilities and features which have made our lives easier. Feeling hungry?
Order food online. Want to shop but don’t have time to go out? Go shopping online. From booking
tickets to watching our favourite shows, everything is available in this one small box loaded with
technology.
Another feature of smartphones nowadays is that they provide us with customised recommendations
and notifications according to our choices. Let us understand this with the help of some examples:
1. When you are talking to your friend on a mobile network or on an app like WhatsApp. You tell
your friend that you wish to buy new shoes and are looking for suggestions from him/her. You
discuss about shoes and that is it. After some time, the online shopping websites start giving
you notifications to buy shoes! They start recommending some of their products and urge you
to you buy some.
2. If you search on Google for a trip to Kerala or any other destination, just after the search, all
the apps on your phone which support advertisements, will start sending messages about
packages that you can buy for the trip.
3. Even when you are not using your phone and talking to a person face-to-face about a book
you’ve read recently while the phone is kept in a locked mode nearby, the phone will end up
giving notifications about similar books or messages about the same book once you operate
it.
In all such examples, how does the smartphone get to know about the discussions and thoughts that
you have? Remember whenever you download an app and install it, it asks you for several permissions
to access your phone’s data in different ways. If you do not allow the app these permissions, you
normally cannot access it. And to access the app and make use of it, we sometimes don’t even give it
a thought and allow the app to get all the permissions that it wants. Hence every now and then, the
app has the permission to access various sensors which are there in your smartphone and gather data
about you and your surroundings. We forget that the smartphone which we use is a box full of sensors
which are powered all the time while the phone is switched on.
This leads us to a crucial question: Are we okay with sharing our data with the external world?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
We need to understand that the data which is collected by various applications is ethical as the
smartphone users agree to it (by clicking on allow when it asks for permission and by agreeing to all
the terms and conditions). But at the same time if one does not want to share his/her data with
anyone, he/she can opt for alternative applications which are of similar usage and keep your data
private. For example, an alternative to WhatsApp is the Telegram app which does not collect any data
from us. But since WhatsApp is more popular and used by the crowd, people go for it without thinking
twice.
AI Bias
Another aspect to AI Ethics is bias. Everyone has a bias of their own no matter how much one tries to
be unbiased, we in some way or the other have our own biases even towards smaller things. Biases
are not negative all the time. Sometimes, it is required to have a bias to control a situation and keep
things working.
When we talk about a machine, we know that it is artificial and cannot think on its own. It can have
intelligence, but we cannot expect a machine to have any biases of its own. Any bias can transfer from
the developer to the machine while the algorithm is being developed. Let us look at some of the
examples:
1. Majorly, all the virtual assistants have a female voice. It is only now that some companies have
understood this bias and have started giving options for male voices but since the virtual assistants
came into practice, female voices are always preferred for them over any other voice. Can you think
of some reasons for this?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
2. If you search on Google for salons, the first few searches are mostly for female salons. This is based
on the assumption that if a person is searching fora salon, in all probability it would be a female. Do
you think this is a bias? If yes, then is it a Negative bias or Positive one?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Various other biases are also found in various systems which are not thought up by the machine but
have got transferred from the developer intentionally or unintentionally.
AI Access
Since Artificial Intelligence is still a budding technology, not everyone has the opportunity to access it.
The people who can afford AI enabled devices make the most of it while others who cannot are left
behind. Because of this, a gap has emerged between these two classes of people and it gets widened
with the rapid advancement of technology. Let us understand this with the help of some examples:
AI creates unemployment
AI is making people’s lives easier. Most of the things nowadays are done in just a few clicks. In no time
AI will manage to be able to do all the laborious tasks which we humans have been doing since long.
Maybe in the coming years, AI enabled machines will replace all the people who work as labourers.
This may start an era of mass unemployment where people having little or no skills may be left without
jobs and others who keep up with their skills according to what is required, will flourish.
This brings us to a crossroads. On one hand where AI is advancing and improving the lives of people
by working for them and doing some of their tasks, the other hand points towards the lives of people
who are dependent on laborious jobs and are not skilled to do anything else.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Should AI not replace laborious jobs? Will the lives of people improve if they keep on being unskilled?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Here, we need to understand that to overcome such an issue, one needs to be open to changes. As
technology is advancing with time, humans need to make sure that they are a step ahead and
understand this technology with its pros and cons.
AI for kids
As we all can see, kids nowadays are smart enough to understand technology from a very early age.
As their thinking capabilities increase, they start becoming techno-savvy and eventually they learn
everything more easily than an adult. But should technology be given to children so young?
Consider this: A young boy in class 3 has got some Maths homework to finish. He is sitting at a table
which has the Google chat bot - Alexa on it, and he is struggling with his homework. Soon, he starts
asking Alexa to answer all his questions. Alexa replies with answers and the boy simply writes them
down in his notebook.
While this scenario seems funny, it still has some concerns related to it. On one hand where it is good
that the boy knows how to use technology effectively, on the other hand he uses it to complete his
homework without really learning anything since he is not applying his brain to solve the Math
problems. So, while he is smart, he might not be getting educated properly.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Conclusion
Despite AI’s promises to bring forth new opportunities, there are certain associated risks that need to
be mitigated appropriately and effectively. To give a better perspective, the ecosystem and the socio-
technical environment in which the AI systems are embedded needs to be more trustworthy.
AI Project Cycle
In this chapter, we will revisit the concept of AI Project Cycle.
Introduction
Let us assume that you have to make a greeting card for your mother as it is her birthday. You are very
excited about it and have thought of many ideas to execute the same. Let us look at some of the steps
which you might take to accomplish this task:
1. Look for some cool greeting card ideas from different sources. You might go online and
checkout some videos or you may ask someone who has knowledge about it.
2. After finalising the design, you would make a list of things that are required to make this card.
3. You will check if you have the material with you or not. If not, you could go and get all the
items required, ready for use.
4. Once you have everything with you, you would start making the card.
5. If you make a mistake in the card somewhere which cannot be rectified, you will discard it and
start remaking it.
6. Once the greeting card is made, you would gift it to your mother.
Are these steps relatable?
__________________________________________________________________________________
__________________________________________________________________________________
Do you think your steps might differ? If so, write them down!
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
These steps show how we plan to execute the tasks around us. Consciously or Subconsciously our
mind makes up plans for every task which we have to accomplish which is why things become clearer
in our mind. Similarly, if we have to develop an AI project, the AI Project Cycle provides us with an
appropriate framework which can lead us towards the goal. The AI Project Cycle mainly has 5 stages:
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Starting with Problem Scoping, you set the goal for your AI project by stating the problem which you
wish to solve with it. Under problem scoping, we look at various parameters which affect the problem
we wish to solve so that the picture becomes clearer.
To proceed,
● You need to acquire data which will become the base of your project as it will help you in
understanding what the parameters that are related to problem scoping are.
● You go for data acquisition by collecting data from various reliable and authentic sources.
Since the data you collect would be in large quantities, you can try to give it a visual image of
different types of representations like graphs, databases, flow charts, maps, etc. This makes
it easier for you to interpret the patterns which your acquired data follows.
● After exploring the patterns, you can decide upon the type of model you would build to
achieve the goal. For this, you can research online and select various models which give a
suitable output.
● You can test the selected models and figure out which is the most efficient one.
● The most efficient model is now the base of your AI project and you can develop your
algorithm around it.
● Once the modelling is complete, you now need to test your model on some newly fetched
data. The results will help you in evaluating your model and improving it.
● Finally, after evaluation, the project cycle is now complete and what you get is your AI project.
Let us understand each stage of the AI Project Cycle in detail.
Problem Scoping
It is a fact that we are surrounded by problems. They could be small or big, sometimes ignored or
sometimes even critical. Many times, we become so used to a problem that it becomes a part of our
life. Identifying such a problem and having a vision to solve it, is what Problem Scoping is about. A lot
of times we are unable to observe any problem in our surroundings. In that case, we can take a look
at the Sustainable Development Goals. 17 goals have been announced by the United nations which
are termed as the Sustainable Development Goals. The aim is to achieve these goals by the end of
2030. A pledge to do so has been taken by all the member nations of the UN.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Here are the 17 SDGs. Let’s take a look:
As you can see, many goals correspond to the problems which we might observe around us too. One
should look for such problems and try to solve them as this would make many lives better and help
our country achieve these goals.
Scoping a problem is not that easy as we need to have a deeper understanding around it so that the
picture becomes clearer while we are working to solve it. Hence, we use the 4Ws Problem Canvas to
help us out.
Who?
The “Who” block helps in analysing the people getting affected directly or indirectly due to it. Under
this, we find out who the ‘Stakeholders’ to this problem are and what we know about them.
Stakeholders are the people who face this problem and would be benefitted with the solution. Here is
the Who Canvas:
* Images shown here are the property of individual organisations and are used here for reference purpose only.
What?
Under the “What” block, you need to look into what you have on hand. At this stage, you need to
determine the nature of the problem. What is the problem and how do you know that it is a problem?
Under this block, you also gather evidence to prove that the problem you have selected actually exists.
Newspaper articles, Media, announcements, etc are some examples. Here is the What Canvas:
Where?
Now that you know who is associated with the problem and what the problem actually is; you need
to focus on the context/situation/location of the problem. This block will help you look into the
situation in which the problem arises, the context of it, and the locations where it is prominent. Here
is the Where Canvas:
Why?
You have finally listed down all the major elements that affect the problem directly. Now it is
convenient to understand who the people that would be benefitted by the solution are; what is to be
solved; and where will the solution be deployed. These three canvases now become the base of why
you want to solve this problem. Thus, in the “Why” canvas, think about the benefits which the
stakeholders would get from the solution and how it will benefit them as well as the society.
After filling the 4Ws Problem canvas, you now need to summarise all the cards into one template. The
Problem Statement Template helps us to summarise all the key points into one single Template so
that in future, whenever there is need to look back at the basis of the problem, we can take a look at
the Problem Statement Template and understand the key elements of it.
[stakeholder(s)] Who
Our
Data Acquisition
As we move ahead in the AI Project Cycle, we come across the second element which is : Data
Acquisition. As the term clearly mentions, this stage is about acquiring data for the project. Let us first
understand what is Data. Data can be a piece of information or facts and statistics collected together
for reference or analysis. Whenever we want an AI project to be able to predict an output, we need
to train it first using data.
For example, If you want to make an Artificially Intelligent system which can predict the salary of any
employee based on his previous salaries, you would feed the data of his previous salaries into the
machine. This is the data with which the machine can be trained. Now, once it is ready, it will predict
his next salary efficiently. The previous salary data here is known as Training Data while the next salary
prediction data set is known as the Testing Data.
For better efficiency of an AI project, the Training data needs to be relevant and authentic. In the
previous example, if the training data was not of the previous salaries but of his expenses, the machine
would not have predicted his next salary correctly since the whole training went wrong. Similarly, if
the previous salary data was not authentic, that is, it was not correct, then too the prediction could
have gone wrong. Hence….
For any AI project to be efficient, the training data should be authentic and relevant to the problem
statement scoped.
Data Features
Look at your problem statement once again and try to find the data features required to address this
issue. Data features refer to the type of data you want to collect. In our previous example, data
features would be salary amount, increment percentage, increment period, bonus, etc.
After mentioning the Data features, you get to know what sort of data is to be collected. Now, the
question arises- From where can we get this data? There can be various ways in which you can collect
data. Some of them are:
API
Cameras Observations (Application Program
Interface)
Sometimes, you use the internet and try to acquire data for your project from some random websites.
Such data might not be authentic as its accuracy cannot be proved. Due to this, it becomes necessary
to find a reliable source of data from where some authentic information can be taken. At the same
time, we should keep in mind that the data which we collect is open-sourced and not someone’s
property. Extracting private data can be an offence. One of the most reliable and authentic sources of
information, are the open-sourced websites hosted by the government. These government portals
have general information collected in suitable format which can be downloaded and used wisely.
Data Exploration
In the previous modules, you have set the goal of your project and have also found ways to acquire
data. While acquiring data, you must have noticed that the data is a complex entity – it is full of
numbers and if anyone wants to make some sense out of it, they have to work some patterns out of
it. For example, if you go to the library and pick up a random book, you first try to go through its
content quickly by turning pages and by reading the description before borrowing it for yourself,
because it helps you in understanding if the book is appropriate to your needs and interests or not.
Thus, to analyse the data, you need to visualise it in some user-friendly format so that you can:
● Quickly get a sense of the trends, relationships and patterns contained within the data.
● Define strategy for which model to use at a later stage.
● Communicate the same to others effectively. To visualise data, we can use various types of
visual representations.
Visual
Representations
Modelling
In the previous module of Data exploration, we have seen various types of graphical representations
which can be used for representing different parameters of data. The graphical representation makes
the data understandable for humans as we can discover trends and patterns out of it. But when it
comes to machines accessing and analysing data, it needs the data in the most basic form of numbers
(which is binary – 0s and 1s) and when it comes to discovering patterns and trends in data, the machine
goes in for mathematical representations of the same. The ability to mathematically describe the
relationship between parameters is the heart of every AI model. Thus, whenever we talk about
developing AI models, it is the mathematical approach towards analysing data which we refer to.
Machine
Learning
Learning
Based Deep
AI Models
Learning
Rule Based
Supervised Learning
Supervised
In a supervised learning model, the dataset
Learning which is fed to the machine is labelled. In
other words, we can say that the dataset is
Unsupervised known to the person who is training the
Learning machine only then he/she is able to label the
data. A label is some information which can
Reinforcement be used as a tag for data. For example,
students get grades according to the marks
Learning they secure in examinations. These grades
are labels which categorise the students
according to their marks.
There are two types of Supervised Learning models:
Unsupervised Learning
An unsupervised learning model works on unlabelled dataset. This means that the data which is fed
to the machine is random and there is a possibility that the person who is training the model does not
have any information regarding it. The unsupervised learning models are used to identify
relationships, patterns and trends out of the data which is fed into it. It helps the user in understanding
what the data is about and what are the major features identified by the machine in it.
For example, you have a random data of 1000 dog images and you wish to understand some pattern
out of it, you would feed this data into the unsupervised learning model and would train the machine
on it. After training, the machine would come up with patterns which it was able to identify out of it.
The Machine might come up with patterns which are already known to the user like colour or it might
even come up with something very unusual like the size of the dogs.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Unsupervised learning models can be further divided into two categories:
Dimensionality Reduction: We humans are able to visualise upto 3-Dimensions only but according to
a lot of theories and algorithms, there are various entities which exist beyond 3-Dimensions. For
example, in Natural language Processing, the words are considered to be N-Dimensional entities.
Which means that we cannot visualise them as they exist beyond our visualisation ability. Hence, to
make sense out of it, we need to reduce their dimensions. Here, dimensionality reduction algorithm
is used.
As we reduce the dimension of an entity, the information which it contains starts getting distorted.
For example, if we have a ball in our hand, it is 3-Dimensions right now. But if we click its picture, the
data transforms to 2-D as an image is a 2-Dimensional entity. Now, as soon as we reduce one
dimension, at least 50% of the information is lost as now we will not know about the back of the ball.
Whether the ball was of same colour at the back or not? Or was it just a hemisphere? If we reduce the
dimensions further, more and more information will get lost.
Hence, to reduce the dimensions and still be able to make sense out of the data, we use Dimensionality
Reduction.
Evaluation
Once a model has been made and trained, it needs to go through proper testing so that one can
calculate the efficiency and performance of the model. Hence, the model is tested with the help of
Testing Data (which was separated out of the acquired dataset at Data Acquisition stage) and the
efficiency of the model is calculated on the basis of the parameters mentioned below:
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Neural Networks
Neural networks are loosely modelled after how neurons in the human brain behave. The key
advantage of neural networks are that they are able to extract data features automatically without
needing the input of the programmer. A neural network is essentially a system of organizing machine
learning algorithms to perform certain tasks. It is a fast and efficient way to solve problems for which
the dataset is very large, such as in images.
As seen in the figure given, the larger Neural Networks tend to perform better with larger amounts of
data whereas the traditional machine learning algorithms stop improving after a certain saturation
point.
This is a representation of how neural networks work. A Neural Network is divided into multiple layers
and each layer is further divided into several blocks called nodes. Each node has its own task to
accomplish which is then passed to the next layer. The first layer of a Neural Network is known as the
input layer. The job of an input layer is to acquire data and feed it to the Neural Network. No
processing occurs at the input layer. Next to it, are the hidden layers. Hidden layers are the layers in
which the whole processing occurs. Their name essentially means that these layers are hidden and are
not visible to the user.
Each node of these hidden layers has its own machine learning algorithm which it executes on the
data received from the input layer. The processed output is then fed to the subsequent hidden layer
* Images shown here are the property of individual organisations and are used here for reference purpose only.
of the network. There can be multiple hidden layers in a neural network system and their number
depends upon the complexity of the function for which the network has been configured. Also, the
number of nodes in each layer can vary accordingly. The last hidden layer passes the final processed
data to the output layer which then gives it to the user as the final output. Similar to the input layer,
output layer too does not process the data which it acquires. It is meant for user-interface.
3. Let us now create a virtual environment named env. To create the environment, write
conda create -n env python=3.7
This code will create an environment named env and will install Python 3.7 and other basic packages
into it.
4. After some processing, the prompt will ask if we wish to proceed with installations or not. Type Y
on it and press Enter. Once we press Enter, the packages will start getting installed in the
environment.
5. Depending upon the internet speed, the downloading of packages might take varied time. The
processing screen will look like this:
6. Once all the packages are downloaded and installed, we will get a message like this:
7. This shows that our environment called env has been successfully created. Once an environment
has been successfully created, we can access it by writing the following:
conda activate env
This would activate the virtual environment and we can see the term written in brackets has changed
form (base) to (env). Now our virtual environment is ready to be used.
But, to open and work with Jupyter Notebooks in this environment, we need to install the packages
which help in working with Jupyter Notebook. These packages get installed by default in the base
environment when Anaconda gets installed.
To install Jupyter Notebook dependencies, we need to activate our virtual environment env and write:
conda install ipykernel nb_conda jupyter
It will again ask if we wish to proceed with the installations, type Y to begin the installations. Once the
installations are complete, we can start working with Jupyter notebooks in this environment.
Artificial intelligence is the trending technology of the future. We can see so many
applications around us. If we as individuals would also like to develop an AI
application, we will need to know a programming language. There are various
Why? programming languages like Lisp, Prolog, C++, Java and Python, which can be
used for developing applications of AI. Out of these, Python gains a maximum
popularity because of the following reasons:
Python has few keywords, simple structure and a clearly defined syntax. Python allows anyone to learn
the language quickly. A program written in Python is fairly easy-to-maintain.
Python has a huge bunch of libraries with plenty of built-in functions to solve a variety of problems.
Interactive Mode
Python has support for an interactive mode which allows interactive testing and debugging of snippets
of code.
Python can run on a wide variety of operating systems and hardware platforms, and has the same
interface on all platforms.
Extendable
We can add low-level modules to the Python interpreter. These modules enable programmers to add
to or customize their tools to be more efficient.
Databases and Scalable
Python provides interfaces to all major open source and commercial databases along with a better
structure and support for much larger programs than shell scripting.
Applications of Python
There exist a wide variety of applications when it comes to Python. Some of the applications are:
1. Printing Statements
We can use Python to display outputs for any code we write. To print any statement, we use print()
function in Python.
Instructions written in the source code to execute are known as statements. These are the lines of
code which we write for the computer to work upon. For example, if we wish to print the addition of
two numbers, say 5 and 10, we would simply write:
print(5+10)
This is a Python statement as the computer would go through it and do the needful (which in this
case would be to calculate 5+10 and print it on the output screen)
On the other hand, there exist some statements which do not get executed by the computer. These
lines of code are skipped by the machine. They are known as comments. Comments are the
statements which are incorporated in the code to give a better understanding of code statements to
the user. To write a comment in Python, one can use # and then write anything after it. For example:
# This is a comment and will not be read by the machine.
print(5+10) # This is a statement and the machine will print the
summation.
Here, we can see that the first line is a comment as it starts with #. In the second line, we have an
executable statement followed by a comment which is written to explain the code. In this way, we can
add comments into our code so that anyone can understand the gist of it.
In Python, there exist some words which are pre-defined and carry a specific meaning for the machine
by default. These words are known as keywords. Keywords cannot be changed at any point in time
and should not be used any other way except the default one, otherwise they create confusion and
might result in ambiguous outputs. Some of the Keywords are mentioned below:
An identifier is any word which is variable. Identifiers can be declared by the user as per their
convenience of use and can vary according to the way the user wants. These words are not defined
and can be used in any way. Keywords cannot be used as identifiers. Some examples of keywords can
be: count, interest, x, ai_learning, Test, etc. Identifiers are also case-sensitive hence an identifier
named as Test would be different from an identifier named test.
A variable is a named location used to store data in the memory. It is helpful to think of variables as a
container that holds data which can be changed later throughout programming. Just like in
Mathematics, in Python too we can use variables to store values in it. The difference here is, that in
Python, the variables not only store numerical values, but can also contain different types of data.
For example:
X = 10 # X variable contains numerical data
Letters = ‘XYZ’ # Letters variable contains alphabetic data
number = 13.95 # number variable contains a decimal value
word = ‘k’ # word variable contains a character
All of these variables contain different types of data in them. The type of data is defined by the term
datatype in Python. There can be various types of data which are used in Python programming. Hence,
the machine identifies the type of variable according to the value which is stored inside it. Various
datatypes in Python can be:
5. Python inputs
In Python, not only can we display the output to the user, but we can also collect data from the user
and can pass it on to the Python script for further processing. To collect the data from the user at the
time of execution, input() function is used. While using the input function, the datatype of the
expected input is required to be mentioned so that the machine does not interpret the received data
in an incorrect manilr as the data taken as input from the user is considered to be a string (sequence
of characters) by default.
For example:
Str = input(<String>) # Python expects the input to be of string
datatype
Number = int(input(<string>)) # Input string gets converted to an
integer value before assignment
Value = float(input(<String>)) # Input string gets converted to a
decimal value before assignment
6. Python Operators
Operators are special symbols which represent computation. They are applied on operand(s), which
can be values or variables. Same operators can behave differently on different data types. Operators
when applied on operands form an expression. Operators are categorized as Arithmetic, Relational,
Logical and Assignment. Value and variables when used with operators are known as operands.
a. Arithmetic Operators
+ Addition 10 + 20 30
- Subtraction 30 - 10 20
/ Division 30 / 10 20.0
// Integer Division 25 // 10 2
% Remainder 25 % 10 5
** Raised to power 3 ** 2 9
b. Conditional Operators
c. Logical Operators
d. Assignment Operators
While coding in Python, a lot of times we need to take decisions. For example, if a person needs to
create a calculator with the help of a Python code, he/she needs to take in 2 numbers from the user
and then ask the user about which function he/she wishes to operate. Now, according to the user’s
choice, the selection of function would change. In this case, we need the machine to understand what
should happen when. This is where conditional statements help. Conditional statements help the
machine in taking a decision according to the condition which gets fulfilled. There exist different types
of conditional statements in Python. Some of them are:
According to the number of conditions and their dependency on each other, the relevant type of
conditional statement is used.
8. Looping
A lot of times, it happens that a task needs to be executed multiple number of times. For example, we
need to print hello 10 times on the output screen. One way of doing this is writing 10 print statements.
But this is time and space consuming. The other way, which is more efficient, is to use loop statements.
The loop statements help in iterating statements or a group of statements as many times as it is asked
for. In this case, we will simply write a loop which would start counting from 1 to 10. At every count,
it will print hello once on the screen and as soon as it reaches 10, the loop will stop executing. All this
can be done by just one loop statement.
Various types of looping mechanisms are available in Python. Some of them are:
While Loop
For Loop Do-While Loop
These were some of the basic concepts for writing a code in Python. We can explore these concepts
further by going through the experiential Jupyter notebook for this chapter. In that notebook, we will
get to explore Python basic concepts and we can also work around them to develop better
understanding around it.
Python Packages
A package is nothing but a space where we can find codes or functions or modules of similar type.
There are various packages readily available to use for free (perks of Python being an open-sourced
language) for various purposes.
To use any package in Python, we need to install it. Installing Python packages is easy. Steps for
package installation are:
1. Open Anaconda Navigator and activate your working environment.
2. Let us assume we wish to install the numpy package. To install this package, simply write:
conda install numpy
3. It will ask us to type Y if we wish to proceed with the installations. As soon as we type Y, the
installations will start and our package will be installed in our selected environment.
4. We can also install multiple packages all at once by mentioning all of them in one line. For
example, if we wish to install numpy, pandas and matplotlib package in our working
environment. For this, simply write:
conda install numpy pandas matplotlib
This code will install these three packages altogether in our environment.
Now, once the packages are installed, we can start using them by importing them in the file where
they are required. As soon as we open our Jupyter Notebook, include the package in the notebook by
writing the import command. Importing a package can be done in various ways:
import numpy
Meaning: Import numpy in the file to use its functionalities in the file to which it has been imported.
import numpy as np
Meaning: Import numpy and refer to it as np wherever it is used.
To develop a better understanding around these packages, let us go through the Jupyter Notebook
of package exploration and see how these packages can be used in Python.
Data Sciences
Introduction
As we have discussed earlier in class 9, Artificial Intelligence is a technology which completely depends
on data. It is the data which is fed into the machine which makes it intelligent. And depending upon
the type of data we have; AI can be classified into three broad domains:
• Data Sciences
Data • Working around numeric and alpha-numeric data.
• Computer Vision
CV • Working around image and visual data.
Each domain has its own type of data which gets fed into the machine and hence has its own way of
working around it. Talking about Data Sciences, it is a concept to unify statistics, data analysis, machine
learning and their related methods in order to understand and analyse actual phenomena with data.
It employs techniques and theories drawn from many fields within the context of Mathematics,
Statistics, Computer Science, and Information Science.
Now before we get into the concepts of Data Sciences, let us experience this domain with the help of
the following game:
Go to this link and try to play the game of Rock, Paper Scissors against an AI model. The challenge here
is to win 20 games against AI before AI wins them against you.
__________________________________________________________________________________
__________________________________________________________________________________
What was the strategy that you applied to win this game against the AI machine?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Was it different playing Rock, Paper & Scissors with an AI machine as compared to a human?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
What approach was the machine following while playing against you?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Internet Search*: When we talk about search engines, we think
‘Google’. Right? But there are many other search engines like
Yahoo, Bing, Ask, AOL, and so on. All these search engines
(including Google) make use of data science algorithms to deliver
the best result for our searched query in the fraction of a second.
Considering the fact that Google processes more than 20 petabytes
of data every day, had there been no data science, Google wouldn’t
have been the ‘Google’ we know today.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
• Predict flight delay
• Decide which class of airplanes to buy
• Whether to directly land at the destination or take a halt in between (For example, A flight
can have a direct route from New Delhi to New York. Alternatively, it can also choose to halt
in any country.)
• Effectively drive customer loyalty programs
Getting Started
Data Sciences is a combination of Python and Mathematical concepts like Statistics, Data Analysis,
probability, etc. Concepts of Data Science can be used in developing applications around AI as it gives
a strong base for data analysis in Python.
Humans are social animals. We tend to organise and/or participate in various kinds of social gatherings
all the time. We love eating out with friends and family because of which we can find restaurants
almost everywhere and out of these, many of the restaurants arrange for buffets to offer a variety of
food items to their customers. Be it small shops or big outlets, every restaurant prepares food in bulk
as they expect a good crowd to come and enjoy their food. But in most cases, after the day ends, a lot
of food is left which becomes unusable for the restaurant as they do not wish to serve stale food to
their customers the next day. So, every day, they prepare food in large quantities keeping in mind the
probable number of customers walking into their outlet. But if the expectations are not met, a good
amount of food gets wasted which eventually becomes a loss for the restaurant as they either have
to dump it or give it to hungry people for free. And if this daily loss is taken into account for a year, it
becomes quite a big amount.
Problem Scoping
Now that we have understood the scenario well, let us take a deeper look into the problem to find out
more about various factors around it. Let us fill up the 4Ws problem canvas to find out.
o Restaurants cook food in bulk every day for their buffets to meet their
What do we
customer needs.
know about
o They estimate the number of customers that would walk into their
them?
restaurant every day.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
What Canvas – What is the nature of their problem?
How do you know o Restaurant Surveys have shown that restaurants face this problem of
it is a problem? food waste.
What would be of key o If the restaurant has a proper estimate of the quantity of food
value to the stakeholders? to be prepared every day, the food waste can be reduced.
Now that we have noted down all the factors around our problem, let us fill up the problem statement
template.
The Problem statement template leads us towards the goal of our project which can now be stated
as:
Quantity of
Total Number Dish
dish prepared
of Customers consumption
per day
Unconsumed Quantity of
dish quantity Price of dish dish for the
per day next day
Now let us understand how these factors are related to our problem statement. For this, we can use
the System Maps tool to figure out the relationship of elements with the project’s goal. Here is the
System map for our problem statement.
In this system map, you can see how the relationship of each element is defined with the goal of our
project. Recall that the positive arrows determine a direct relationship of elements while the negative
ones show an inverse relationship of elements.
After looking at the factors affecting our problem statement, now it’s time to take a look at the data
which is to be acquired for the goal. For this problem, a dataset covering all the elements mentioned
above is made for each dish prepared by the restaurant over a period of 30 days. This data is collected
offline in the form of a regular survey since this is a personalised dataset created just for one
restaurant’s needs.
Specifically, the data collected comes under the following categories: Name of the dish, Price of the
dish, Quantity of dish produced per day, Quantity of dish left unconsumed per day, Total number of
customers per day, Fixed customers per day, etc.
Data Exploration
After creating the database, we now need to look at the data collected and understand what is
required out of it. In this case, since the goal of our project is to be able to predict the quantity of food
to be prepared for the next day, we need to have the following data:
Quantity of
Quantity of that
unconsumed
Name of dish dish prepared per
portion of the dish
day
per day
Thus, we extract the required information from the curated dataset and clean it up in such a way that
there exist no errors or missing elements in it.
Modelling
Once the dataset is ready, we train our model on it. In this case, a regression model is chosen in which
the dataset is fed as a dataframe and is trained accordingly. Regression is a Supervised Learning model
which takes in continuous values of data over a period of time. Since in our case the data which we
have is a continuous data of 30 days, we can use the regression model so that it predicts the next
values to it in a similar manilr. In this case, the dataset of 30 days is divided in a ratio of 2:1 for training
and testing respectively. In this case, the model is first trained on the 20-day data and then gets
evaluated for the rest of the 10 days.
Evaluation
Once the model has been trained on the training dataset of 20 days, it is now time to see if the model
is working properly or not. Let us see how the model works and how is it tested.
Step 1: The trained model is fed data regards the name of the dish and the quantity produced for the
same.
Step 2: It is then fed data regards the quantity of food left unconsumed for the same dish on previous
occasions.
Step 3: The model then works upon the entries according to the training it got at the modelling stage.
Step 4: The Model predicts the quantity of food to be prepared for the next day.
Step 5: The prediction is compared to the testing dataset value. From the testing dataset, ideally, we
can say that the quantity of food to be produced for next day’s consumption should be the total
quantity minus the unconsumed quantity.
Step 6: The model is tested for 10 testing datasets kept aside while training.
Step 8: If the prediction value is same or almost similar to the actual values, the model is said to be
accurate. Otherwise, either the model selection is changed or the model is trained on more data for
better accuracy.
Once the model is able to achieve optimum efficiency, it is ready to be deployed in the restaurant for
real-time usage.
Data Collection
Data collection is nothing new which has come up in our lives. It has been in our society since ages.
Even when people did not have fair knowledge of calculations, records were still maintained in some
way or the other to keep an account of relevant things. Data collection is an exercise which does not
require even a tiny bit of technological knowledge. But when it comes to analysing the data, it
becomes a tedious process for humans as it is all about numbers and alpha-numerical data. That is
where Data Science comes into the picture. It not only gives us a clearer idea around the dataset, but
also adds value to it by providing deeper and clearer analyses around it. And as AI gets incorporated
in the process, predictions and suggestions by the machine become possible on the same.
Now that we have gone through an example of a Data Science based project, we have a bit of clarity
regarding the type of data that can be used to develop a Data Science related project. For the data
domain-based projects, majorly the type of data used is in numerical or alpha-numerical format and
such datasets are curated in the form of tables. Such databases are very commonly found in any
institution for record maintenance and other purposes. Some examples of datasets which you must
already be aware of are:
Now look around you and find out what are the different types of databases which are maintained in
the places mentioned below. Try surveying people who are responsible for the designated places to
get a better idea.
Sources of Data
There exist various sources of data from where we can collect any type of data required and the data
collection process can be categorised in two ways: Offline and Online.
While accessing data from any of the data sources, following points should be kept in mind:
1. Data which is available for public usage only should be taken up.
2. Personal datasets should only be used with the consent of the owner.
3. One should never breach someone’s privacy to collect data.
4. Data should only be taken form reliable sources as the data collected from random sources
can be wrong or unusable.
5. Reliable sources of data ensure the authenticity of data which helps in proper training of the
AI model.
Types of Data
For Data Science, usually the data is collected in the form of tables. These tabular datasets can be
stored in different formats. Some of the commonly used formats are:
1. CSV: CSV stands for comma separated values. It is a simple file format used to store tabular
data. Each line of this file is a data record and reach record consists of one or more fields which
are separated by commas. Since the values of records are separated by a comma, hence they
are known as CSV files.
2. Spreadsheet: A Spreadsheet is a piece of paper or a computer program which is used for
accounting and recording data using rows and columns into which information can be
entered. Microsoft excel is a program which helps in creating spreadsheets.
3. SQL: SQL is a programming language also known as Structured Query Language. It is a domain-
specific language used in programming and is designed for managing data held in different
kinds of DBMS (Database Management System) It is particularly useful in handling structured
data.
A lot of other formats of databases also exist, you can explore them online!
Data Access
After collecting the data, to be able to use it for programming purposes, we should know how to access
the same in a Python code. To make our lives easier, there exist various Python packages which help
us in accessing structured data (in tabular form) inside the code. Let us take a look at some of these
packages:
NumPy
NumPy, which stands for Numerical Python, is the fundamental package for Mathematical and logical
operations on arrays in Python. It is a commonly used package when it comes to working around
numbers. NumPy gives a wide range of arithmetic operations around numbers giving us an easier
approach in working with them. NumPy also works with arrays, which is nothing but a homogenous
collection of Data.
An array is nothing but a set of multiple values which are of same datatype. They can be numbers,
characters, booleans, etc. but only one datatype can be accessed through an array. In NumPy, the
arrays used are known as ND-arrays (N-Dimensional Arrays) as NumPy comes with a feature of
creating n-dimensional arrays in Python.
An array can easily be compared to a list. Let us take a look at how they are different:
Pandas
Pandas is a software library written for the Python programming language for data manipulation and
analysis. In particular, it offers data structures and operations for manipulating numerical tables and
time series. The name is derived from the term "panel data", an econometrics term for data sets that
include observations over multiple time periods for the same individuals.
Here are just a few of the things that pandas does well:
• Easy handling of missing data (represented as NaN) in floating point as well as non-floating
point data
• Size mutability: columns can be inserted and deleted from DataFrame and higher dimensional
objects
• Automatic and explicit data alignment: objects can be explicitly aligned to a set of labels, or
the user can simply ignore the labels and let Series, DataFrame, etc. automatically align the
data for you in computations
• Intelligent label-based slicing, fancy indexing, and subsetting of large data sets
• Intuitive merging and joining data sets
• Flexible reshaping and pivoting of data sets
Matplotlib*
Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-
platform data visualization library built on NumPy arrays. One of the greatest benefits of visualization
is that it allows us visual access to huge amounts of data in easily digestible visuals. Matplotlib comes
with a wide variety of plots. Plots helps to understand trends, patterns, and to make correlations.
They’re typically instruments for reasoning about quantitative information. Some types of graphs that
we can make with this package are listed below:
Not just plotting, but you can also modify your plots the way you wish. You can stylise them and make
them more descriptive and communicable.
These packages help us in accessing the datasets we have and also in exploring them to develop a
better understanding of them.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Basic Statistics with Python
We have already understood that Data Sciences works around analysing data and performing tasks
around it. For analysing the numeric & alpha-numeric data used for this domain, mathematics comes
to our rescue. Basic statistical methods used in mathematics come quite hAmanin Python too for
analysing and working around such datasets. Statistical tools widely used in Python are:
Do you remember using these formulas in your class? Let us recall all of them here:
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
4. What is Standard Deviation? How is it calculated?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Advantage of using Python packages is that we do not need to make our own formula or equation to
find out the results. There exist a lot of pre-defined functions with packages like NumPy which reduces
this trouble for us. All we need to do is write that function and pass on the data to it. It’s that simple!
Let us take a look at various Python syntaxes that can help us with the statistical work in data analysis.
Head to the Jupyter Notebook of Basic statistics with Python and start exploring! You may find the
Jupyter notebook here: http://bit.ly/data_notebook
Data Visualisation
While collecting data, it is possible that the data might come with some errors. Let us first take a look
at the types of issues we can face with data:
1. Erroneous Data: There are two ways in which the data can be erroneous:
• Incorrect values: The values in the dataset (at random places) are incorrect. For example, in
the column of phone number, there is a decimal value or in the marks column, there is a name
mentioned, etc. These are incorrect values that do not resemble the kind of data expected in
that position.
• Invalid or Null values: At some places, the values get corrupted and hence they become
invalid. Many times you will find NaN values in the dataset. These are null values which do not
hold any meaning and are not processible. That is why, these values (as and when
encountered) are removed from the database.
2. Missing Data: In some datasets, some cells remain empty. The values of these cells are missing and
hence the cells remain empty. Missing data cannot be interpreted as an error as the values here are
not erroneous or might not be missing because of any error.
3. Outliers: Data which does not fall in the range of a certain element are referred to as outliers. To
understand this better, let us take an example of marks of students in a class. Let us assume that a
student was absent for exams and hence has got 0 marks in it. If his marks are taken into account, the
whole class’s average would go down. To prevent this, the average is taken for the range of marks
from highest to lowest keeping this particular result separate. This makes sure that the average marks
of the class are true according to the data.
Analysing the data collected can be difficult as it is all about tables and numbers. While machines work
efficiently on numbers, humans need visual aid to understand and comprehend the information
passed. Hence, data visualisation is used to interpret the data collected and identify patterns and
trends out of it.
In Python, Matplotlib package helps in visualising the data and making some sense out of it. As we
have already discussed before, with the help of this package, we can plot various kinds of graphs. Let
us discuss some of them here:
Scatter plots are used to plot discontinuous data; that is, the data
which does not have any continuity in flow is termed as
Scatter Plot discontinuous. There exist gaps in data which introduce discontinuity.
A 2D scatter plot can display information maximum upto 4
parameters.
In this scatter plot, 2 axes (X and Y) are two different parameters. The colour of circles and the size
both represent 2 different parameters. Thus, just through one coordinate on the graph, one can
visualise 4 different parameters all at once.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
It is one of the most commonly used graphical methods. From
students to scientists, everyone uses bar charts in some way or the
Bar Chart other. It is a very easy to draw yet informative graphical
representation. Various versions of bar chart exist like single bar
chart, double bar chart, etc.
This is an example of a double bar chart. The 2 axes depict two different parameters while bars of
different colours work with different entities ( in this case it is women and men). Bar chart also works
on discontinuous data and is made at uniform intervals.
Histogram When it comes to plotting the variation in just one entity of a period
of time, histograms come into the picture. It represents the frequency
of the variable at different points of time with the help of the bins.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
In the given example, the histogram is showing the variation in frequency of the entity plotted with
the help of XY plane. Here, at the left, the frequency of the element has been plotted and it is a
frequency map for the same. The colours show the transition from low to high and vice versa. Whereas
on the right, a continuous dataset has been plotted which might not be talking about the frequency
of occurrence of the element.
Box Plots range, box plots come in haman. Box plots also known as box and
whiskers plot conveniently display the distribution of data throughout
the range with the help of 4 quartiles.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Here as we can see, the plot contains a box and two lines at its left and right are termed as whiskers.
The plot has 5 different parts to it:
Quartile 1: From 0 percentile to 25th percentile – Here data lying between 0 and 25th percentile is
plotted. Now, if the data is close to each other, lets say 0 to 25th percentile data has been covered in
just 20-30 marks range, then the whisker would be smaller as the range is smaller. But if the range is
large that is 0-30 marks range, then the whisker would also get elongated as the range is longer.
Quartile 2: From 25th Percentile to 50th percentile – 50th percentile is termed as the mean of the whole
distribution and since the data falling in the range of 25th percentile to 75th percentile has minimum
deviation from the mean, it is plotted inside the box.
Quartile 3: From 50th percentile to 75th percentile – This range is again plotted in the box as its
deviation from the mean is less. Quartile 2 & 3 (from 25th percentile to 75th percentile) together
constitute the Inter Quartile Range (IQR). Also, depending upon the range of distribution, just like
whiskers, the length of box also varies if the data is less spread or more.
Quartile 4: From 75th percentile to 100th percentile – It is the whiskers plot for top 25 percentile data.
Outliers: The advantage of box plots is that they clearly show the outliers in a data distribution. Points
which do not lie in the range are plotted outside the graph as dots or circles and are termed as outliers
as they do not belong to the range of data. Since being out of range is not an error, that is why they
are still plotted on the graph for visualisation.
Let us now move ahead and experience data visualisation using Jupyter notebook. Matplotlib library
will help us in plotting all sorts of graphs while Numpy and Pandas will help us in analysing the data.
Personality Prediction
Step 1: Here is a map. Take a good look at it. In this map you can see the arrows determine a quality.
The qualities mentioned are:
1. Positive X-axis – People focussed: You focus more on people and try to deliver the best
experience to them.
2. Negative X-axis – Task focussed: You focus more on the task which is to be accomplished and
try to do your best to achieve that.
3. Positive Y-axis – Passive: You focus more on listening to people and understanding everything
that they say without interruption.
4. Negative Y-axis – Active: You actively participate in the discussions and make sure that you
make your point in-front of the crowd.
Think for a minute and understand which of these qualities you have in you. Now, take a chit and write
your name on it. Place this chit at a point in this map which best describes you. It can be placed
anywhere on the graph. Be honest about yourself and put it on the graph.
Step 2: Now that you have all put up your chits on the graph, it’s time to take a quick quiz. Go to this
link and finish the quiz on it individually: https://tinyurl.com/discanimal
On this link, you will find a personality prediction quiz. Take this quiz individually and try to answer all
the questions honestly. Do not take anyone’s help in it and do not discuss about it with anyone. Once
the quiz is finished, remember the animal which has been predicted for you. Write it somewhere and
do not show it to anyone. Keep it as your little secret.
Once everyone has gone through the quiz, go back to the board remove your chit, and draw the
symbol which corresponds to your animal in place of your chit. Here are the symbols:
⚫ ☺
Place these symbols at the locations where you had put up your names. Ask 4 students not to do so
and tell them to keep their animals a secret. Let their name chits be on the graph so that we can
predict their animals with the help of this map.
Now, we will try to use the nearest neighbour algorithm here and try to predict what can be the
possible animal(s) for these 4 unknowns. Now look that these 4 chits one by one. Which animal is
occurring the most in their vicinity? Do you think that if the m lion symbol is occurring the most near
their chit, then there is a good probability that their animal would also be a lion? Now let us try to
guess the animal for all 4 of them according to their nearest neighbours respectively. After guessing
the animals, ask these 4 students if the guess is right or not.
• The KNN prediction model relies on the surrounding points or neighbours to determine its
class or group
• Utilises the properties of the majority of the nearest points to decide how to classify unknown
points
• Based on the concept that similar data points should be close to each other
The personality prediction activity was a brief introduction to KNN. As you recall, in that activity, we
tried to predict the animal for 4 students according to the animals which were the nearest to their
points. This is how in a lay-man’s language KNN works. Here, K is a variable which tells us about the
number of neighbours which are taken into account during prediction. It can be any integer value
starting from 1.
Let us look at another example to demystify this algorithm. Let us assume that we need to predict the
sweetness of a fruit according to the data which we have for the same type of fruit. So here we have
three maps to predict the same:
Here, X is the value which is to be predicted. The green dots depict sweet values and the blue ones
denote not sweet.
Let us try it out by ourselves first. Look at the map closely and decide whether X should be sweet or
not sweet?
Here, we can see that K is taken as 1 which means that we are taking only 1 nearest
1 neighbour into consideration. The nearest value to X is a blue one hence 1-nearest
neighbour algorithm predicts that the fruit is not sweet.
In the 2nd graph, the value of K is 2. Taking 2 nearest nodes to X into consideration, we
see that one is sweet while the other one is not sweet. This makes it difficult for the
2 machine to make any predictions based on the nearest neighbour and hence the
machine is not able to give any prediction.
In the 3rd graph, the value of K becomes 3. Here, 3 nearest nodes to X are chosen out
3 of which 2 are green and 1 is blue. On the basis of this, the model is able to predict that
the fruit is sweet.
KNN tries to predict an unknown value on the basis of the known values. The model simply calculates
the distance between all the known points with the unknown point (by distance we mean to say the
different between two values) and takes up K number of points whose distance is minimum. And
according to it, the predictions are made.
1. As we decrease the value of K to 1, our predictions become less stable. Just think for a minute,
imagine K=1 and we have X surrounded by several greens and one blue, but the blue is the
single nearest neighbour. Reasonably, we would think X is most likely green, but because K=1,
KNN incorrectly predicts that it is blue.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
2. Inversely, as we increase the value of K, our predictions become more stable due to majority
voting / averaging, and thus, more likely to make more accurate predictions (up to a certain
point). Eventually, we begin to witness an increasing number of errors. It is at this point we
know we have pushed the value of K too far.
3. In cases where we are taking a majority vote (e.g. picking the mode in a classification problem)
among labels, we usually make K an odd number to have a tiebreaker.
Computer Vision
Introduction
In the previous chapter, you studied the concepts of Artificial Intelligence for Data Sciences. It is a
concept to unify statistics, data analysis, machine learning and their related methods in order to
understand and analyse actual phenomena with data.
As we all know, artificial intelligence is a technique that enables computers to mimic human
intelligence. As humans we can see things, analyse it and then do the required action on the basis of
what we see.
But can machines do the same? Can machines have the eyes that humans have? If you answered Yes,
then you are absolutely right. The Computer Vision domain of Artificial Intelligence, enables machines
to see through images or visual data, process and analyse them on the basis of algorithms and
methods in order to analyse actual phenomena with images.
Now before we get into the concepts of Computer Vision, let us experience this domain with the help
of the following game:
Go to the link and try to play the game of Emoji Scavenger Hunt. The challenge here is to find 8 items
within the time limit to pass.
__________________________________________________________________________________
__________________________________________________________________________________
What was the strategy that you applied to win this game?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Was the computer able to identify all the items you brought in front of it?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Did the lighting of the room affect the identifying of items by the machine?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Facial Recognition*: With the advent of smart cities and smart homes,
Computer Vision plays a vital role in making the home smarter. Security
being the most important application involves use of Computer Vision
for facial recognition. It can be either guest recognition or log
maintenance of the visitors.
Face Filters*: The modern-day apps like Instagram and snapchat have
a lot of features based on the usage of computer vision. The
application of face filters is one among them. Through the camera the
machine or the algorithm is able to identify the facial dynamics of the
person and applies the facial filter selected.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Computer Vision in Retail*: The retail field has been one of the
fastest growing field and at the same time is using Computer
Vision for making the user experience more fruitful. Retailers can
use Computer Vision techniques to track customers’ movements
through stores, analyse navigational routes and detect walking
patterns.
Inventory Management is another such application. Through
security camera image analysis, a Computer Vision algorithm can
generate a very accurate estimate of the items available in the
store. Also, it can analyse the use of shelf space to identify
suboptimal configurations and suggest better item placement.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Computer Vision: Getting Started
Computer Vision is a domain of Artificial Intelligence, that deals with the images. It involves the
concepts of image processing and machine learning models to build a Computer Vision based
application.
Object
Classification
Detection
Classification + Instance
Localisation Segementation
Classification
Image Classification problem is the task of assigning an input image one label from a fixed set of
categories. This is one of the core problems in CV that, despite its simplicity, has a large variety of
practical applications.
Classification + Localisation
This is the task which involves both processes of identifying what object is present in the image and
at the same time identifying at what location that object is present in that image. It is used only for
single objects.
Object Detection
Object detection is the process of finding instances of real-world objects such as faces, bicycles, and
buildings in images or videos. Object detection algorithms typically use extracted features and
learning algorithms to recognize instances of an object category. It is commonly used in applications
such as image retrieval and automated vehicle parking systems.
Instance Segmentation
Instance Segmentation is the process of detecting instances of the objects, giving them a category and
then giving each pixel a label on the basis of that. A segmentation algorithm takes an image as input
and outputs a collection of regions (or segments).
Basics of Images
We all see a lot of images around us and use them daily either through our mobile phones or computer
system. But do we ask some basic questions to ourselves while we use them on such a regular basis.
Don’t know the answer yet? Don’t worry, in this section we will study about the basics of an image:
Basics of Pixels
The word “pixel” means a picture element. Every photograph, in digital form, is made up of pixels.
They are the smallest unit of information that make up a picture. Usually round or square, they are
typically arranged in a 2-dimensional grid.
In the image below, one portion has been magnified many times over so that you can see its individual
composition in pixels. As you can see, the pixels approximate the actual image. The more pixels you
have, the more closely the image resembles the original.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Resolution
The number of pixels in an image is sometimes called the resolution. When the term is used to describe
pixel count, one convention is to express resolution as the width by the height, for example a monitor
resolution of 1280×1024. This means there are 1280 pixels from one side to the other, and 1024 from
top to bottom.
Another convention is to express the number of pixels as a single number, like a 5 mega pixel camera
(a megapixel is a million pixels). This means the pixels along the width multiplied by the pixels along
the height of the image taken by the camera equals 5 million pixels. In the case of our 1280×1024
monitors, it could also be expressed as 1280 x 1024 = 1,310,720, or 1.31 megapixels.
Pixel value
Each of the pixels that represents an image stored inside a computer has a pixel value which describes
how bright that pixel is, and/or what colour it should be. The most common pixel format is the byte
image, where this number is stored as an 8-bit integer giving a range of possible values from 0 to 255.
Typically, zero is to be taken as no colour or black and 255 is taken to be full colour or white.
Why do we have a value of 255 ? In the computer systems, computer data is in the form of ones and
zeros, which we call the binary system. Each bit in a computer system can have either a zero or a one.
Since each pixel uses 1 byte of an image, which is equivalent to 8 bits of data. Since each bit can have
two possible values which tells us that the 8 bit can have 255 possibilities of values which starts from
0 and ends at 255.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Grayscale Images
Grayscale images are images which have a range of shades of gray without apparent colour. The
darkest possible shade is black, which is the total absence of colour or zero value of pixel. The lightest
possible shade is white, which is the total presence of colour or 255 value of a pixel . Intermediate
shades of gray are represented by equal brightness levels of the three primary colours.
A grayscale has each pixel of size 1 byte having a single plane of 2d array of pixels. The size of a
grayscale image is defined as the Height x Width of that image.
Here is an example of a grayscale image. as you check, the value of pixels are within the range of 0-
255.The computers store the images we see in the form of these numbers.
RGB Images
All the images that we see around are coloured images. These images are made up of three primary
colours Red, Green and Blue. All the colours that are present can be made by combining different
intensities of red, green and blue.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Let us experience!
___________________________________________________________________________
___________________________________________________________________________
3) How does the colour vary when you put either of the three as 0 and then keep on varying
the other two?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
4) How does the output colour change when all the three colours are varied in same
proportion ?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
5) What is the RGB value of your favourite colour from the colour palette?
___________________________________________________________________________
Were you able to answer all the questions? If yes, then you would have understood how every colour
we see around is made.
Now the question arises, how do computers store RGB images? Every RGB image is stored in the form
of three different channels called the R channel, G channel and the B channel.
Each plane separately has a number of pixels with each pixel value varying from 0 to 255. All the three
planes when combined together form a colour image. This means that in a RGB image, each pixel has
a set of three different values which together give colour to that particular pixel.
For Example,
As you can see, each colour image is stored in the form of three different channels, each having
different intensity. All three channels combine together to form a colour we see.
In the above given image, if we split the image into three different channels, namely Red (R), Green
(G) and Blue (B), the individual layers will have the following intensity of colours of the individual
pixels. These individual layers when stored in the memory looks like the image on the extreme right.
The images look in the grayscale image because each pixel has a value intensity of 0 to 255 and as
studied earlier, 0 is considered as black or no presence of colour and 255 means white or full presence
of colour. These three individual RGB values when combined together form the colour of each pixel.
Therefore, each pixel in the RGB image has three values to form the complete colour.
Task :
Go to the following link www.piskelapp.com and create your own pixel art. Try and make a GIF using
the online app for your own pixel art.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Image Features
In computer vision and image processing, a feature is a piece of information which is relevant for
solving the computational task related to a certain application. Features may be specific structures in
the image such as points, edges or objects.
For example:
Imagine that your security camera is capturing an image. At the top of the image we are given six small
patches of images. Our task is to find the exact location of those image patches in the image.
Take a pencil and mark the exact location of those patches in the image.
Were you able to find the exact location of all the patches?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Let’s Reflect:
Let us take individual patches into account at once and then check the exact location of those patches.
For Patch A and B: The patch A and B are flat surfaces in the image and are spread over a lot of area.
They can be present at any location in a given area in the image.
For Patch C and D: The patches C and D are simpler as compared to A and B. They are edges of a
building and we can find an approximate location of these patches but finding the exact location is
still difficult. This is because the pattern is the same everywhere along the edge.
For Patch E and F: The patches E and F are the easiest to find in the image. The reason being that E
and F are some corners of the building. This is because at the corners, wherever we move this patch
it will look different.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Conclusion
In image processing, we can get a lot of features from the image. It can be either a blob, an edge or a
corner. These features help us to perform various tasks and then get the analysis done on the basis of
the application. Now the question that arises is which of the following are good features to be used?
As you saw in the previous activity, the features having the corners are easy to find as they can be
found only at a particular location in the image, whereas the edges which are spread over a line or an
edge look the same all along. This tells us that the corners are always good features to extract from
an image followed by the edges.
Let’s look at another example to understand this. Consider the images given below and apply the
concept of good features for the following.
In the above image how would we determine the exact location of each patch?
The blue patch is a flat area and difficult to find and track. Wherever you move the blue patch it looks
the same. The black patch has an edge. Moved along the edge (parallel to edge), it looks the same.
The red patch is a corner. Wherever you move the patch, it looks different, therefore it is unique.
Hence, corners are considered to be good features in an image.
Introduction to OpenCV
Now that we have learnt about image features and its importance in image processing, we will learn
about a tool we can use to extract these features from our image for further processing.
OpenCV or Open Source Computer Vision Library is that tool which helps a computer extract these
features from the images. It is used for all kinds of images and video processing and analysis. It is
capable of processing images and videos to identify objects, faces, or even handwriting.
In this chapter we will use OpenCV for basic image processing operations on
images such as resizing, cropping and many more.
To install OpenCV library, open anaconda prompt and then write the following
command:
Now let us take a deep dive on the various functions of OpenCV to understand the various image
processing techniques. Head to Jupyter Notebook for introduction to OpenCV given on this link:
http://bit.ly/cv_notebook
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Convolution
We have learnt that computers store images in numbers, and that pixels are arranged in a particular
manner to create the picture we can recognize. These pixels have value varying from 0 to 255 and the
value of the pixel determines the color of that pixel.
But what if we edit these numbers, will it bring a change to the image? The answer is yes. As we change
the values of these pixels, the image changes. This process of changing pixel values is the base of image
editing.
We all use a lot of image editing software like photoshop and at the same time use apps like Instagram
and snapchat, which apply filters to the image to enhance the quality of that image.
As you can see, different filters applied to an image change the pixel values evenly throughout the
image. How does this happen? This is done with the help of the process of convolution and the
convolution operator which is commonly used to create these effects.
Before we understand how the convolution operation works, let us try and create a theory for the
convolution operator by experiencing it using an online application.
Task
Go to the link http://matlabtricks.com/post-5/3x3-convolution-kernels-with-online-demo and at the
bottom of the page click on load “Click to Load Application”
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Once the application is loaded try different filters and apply it on the image. Observe how the value
of the kernel is changing for different filters. Try these steps
Let us follow the following steps to understand how a convolution operator works. The steps to be
followed are:
What theory do you propose for convolution on the basis of the observation?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
It is time to test the theory. Change the location of the four numbers and follow the above mentioned
steps. Does your theory hold true?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
If yes, change the picture and try whether the theory holds true or not. If it does not hold true, modify
your theory and keep trying until it satisfies all the conditions.
Let’s Discuss
What effect did you apply?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Convolution : Explained
Convolution is a simple Mathematical operation which is fundamental to many
common image processing operators. Convolution provides a way of `multiplying together' two arrays
of numbers, generally of different sizes, but of the same dimensionality, to produce a third array of
numbers of the same dimensionality.
An (image) convolution is simply an element-wise multiplication of image arrays and another array
called the kernel followed by sum.
As you can see here,
I = Image Array
K = Kernel Array
Note: The Kernel is passed over the whole image to get the resulting array after convolution.
What is a Kernel?
A Kernel is a matrix, which is slid across the image and multiplied with the input such that the output
is enhanced in a certain desirable manner. Each kernel has a different value for different kind of effects
that we want to apply to an image.
In Image processing, we use the convolution operation to extract the features from the images which
can le later used for further processing especially in Convolution Neural Network (CNN), about which
we will study later in the chapter.
In this process, we overlap the centre of the image with the centre of the kernel to obtain the
convolution output. In the process of doing it, the output image becomes smaller as the overlapping
is done at the edge row and column of the image. What if we want the output image to be of exact
size of the input image, how can we achieve this?
To achieve this, we need to extend the edge values out by one in the original image while overlapping
the centres and performing the convolution. This will help us keep the input and output image of the
same size. While extending the edges, the pixel values are considered as zero.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Let’s try
In this section we will try performing the convolution operator on paper to understand how it works.
Fill the blank places of the output images by performing the convolution operation.
155 146 13 20 0 12 45 0
100 175 0 25 25 15 0 0
-1 0 -1
120 156 255 0 78 56 23 0 0 -1 0
-1 0 -1
115 113 25 90 0 80 56 155
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Write Your Output Here :
Summary
1. Convolution is a common tool used for image editing.
2. It is an element wise multiplication of an image and a kernel to get the desired output.
3. In computer vision application, it is used in Convolutional Neural Network (CNN) to extract
image features.
Let’s recall
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Fill in the names of different layers of Neural Network.
Did you get the answers right? In this section, we are going to study about one such neural network
which is Convolutional Neural Network (CNN). Many of the current computer vision applications use
a powerful neural network called the convolutional neural network.
A Convolutional Neural Network (CNN) is a Deep Learning algorithm which can take in an input image,
assign importance (learnable weights and biases) to various aspects/objects in the image and be able
to differentiate one from the other.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
In the above diagram, we give an input image, which is then processed through a CNN and then gives
prediction on the basis of the label given in the particular dataset.
1) Convolution Layer
2) Rectified linear Unit (ReLU)
3) Pooling Layer
4) Fully Connected Layer
Convolution Layer
It is the first layer of a CNN. The objective of the Convolution Operation is to extract the high-level
features such as edges, from the input image. CNN need not be limited to only one Convolutional
Layer. Conventionally, the first Convolution Layer is responsible for capturing the Low-Level features
such as edges, colour, gradient orientation, etc. With added layers, the architecture adapts to the
High-Level features as well, giving us a network which has the wholesome understanding of images in
the dataset.
It uses convolution operation on the images. In the convolution layer, there are several kernels that
are used to produce several features. The output of this layer is called the feature map. A feature map
is also called the activation map. We can use these terms interchangeably.
There’s several uses we derive from the feature map:
• We reduce the image size so that it can be processed more efficiently.
• We only focus on the features of the image that can help us in processing the image further.
For example, you might only need to recognize someone’s eyes, nose and mouth to recognize the
person. You might not need to see the whole face.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Rectified Linear Unit Function
The next layer in the Convolution Neural Network is the Rectified Linear Unit function or the ReLU
layer. After we get the feature map, it is then passed onto the ReLU layer. This layer simply gets rid of
all the negative numbers in the feature map and lets the positive number stay as it is.
The process of passing it to the ReLU layer introduces non – linearity in the feature map. Let us see it
through a graph.
If we see the two graphs side by side, the one on the left is a linear graph. This graph when passed
through the ReLU layer, gives the one on the right. The ReLU graph starts with a horizontal straight
line and then increases linearly as it reaches a positive number.
Now the question arises, why do we pass the feature map to the ReLU layer? it is to make the colour
change more obvious and more abrupt?
* Images shown here are the property of individual organisations and are used here for reference purpose only.
As shown in the above convolved image, there is a smooth grey gradient change from black to white.
After applying the ReLu function, we can see a more abrupt change in color which makes the edges
more obvious which acts as a better feature for the further layers in a CNN as it enhances the
activation layer.
Pooling Layer
Similar to the Convolutional Layer, the Pooling layer is responsible for reducing the spatial size of the
Convolved Feature while still retaining the important features.
1) Max Pooling : Max Pooling returns the maximum value from the portion of the image covered
by the Kernel.
2) Average Pooling: Max Pooling returns the maximum value from the portion of the image
covered by the Kernel.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
The pooling layer is an important layer in the CNN as it performs a series of tasks which are as
follows :
A small difference in input image will create very similar pooled image.
The final layer in the CNN is the Fully Connected Layer (FCP). The objective of a fully connected layer
is to take the results of the convolution/pooling process and use them to classify the image into a label
(in a simple classification example).
The output of convolution/pooling is flattened into a single vector of values, each representing a
probability that a certain feature belongs to a label. For example, if the image is of a cat, features
representing things like whiskers or fur should have high probabilities for the label “cat”.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Let’s Summarize:
Write the whole process of how a CNN works on the basis of the above diagram.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Let’s Experience
Now let us see how this comes into practice. To see that, go to the link
http://scs.ryerson.ca/~aharley/vis/conv/flat.html
This is an online application of classifying different numbers. We need to analyse the different layers
in the application on the basis of the CNN that we have studied in the previous section.
Natural Language Processing
Introduction
Till now, we have explored two domains of AI: Data Science and Computer Vision. Both these domains
differ from each other in terms of the data on which they work. Data Science works around numbers
and tabular data while Computer Vision is all about visual data like images and videos. The third
domain, Natural Language Processing (commonly called NLP) takes in the data of Natural Languages
which humans use in their daily lives and operates on this.
Natural Language Processing, or NLP, is the sub-field of AI that is focused on enabling computers to
understand and process human languages. AI is a subfield of Linguistics, Computer Science,
Information Engineering, and Artificial Intelligence concerned with the interactions between
computers and human (natural) languages, in particular how to program computers to process and
analyse large amounts of natural language data.
But how do computers do that? How do they understand what we say in our language? This chapter
is all about demystifying the Natural Language Processing domain and understanding how it works.
Before we get deeper into NLP, let us experience it with the help of this AI Game:
Go to this link on Google Chrome, launch the experiment and try to identify the Mystery Animal by
asking the machine 20 Yes or No questions.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
If no, how many times did you try playing this game?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Were there any challenges that you faced while playing this game? If yes, list them down.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
* Images shown here are the property of individual organisations and are used here for reference purpose only.
indicators of their reputation. Beyond determining simple polarity, sentiment analysis understands
sentiment in context to help better understand what’s behind an expressed opinion, which can be
extremely relevant in understanding and driving purchasing decisions.
The Scenario
The world is competitive nowadays. People face
competition in even the tiniest tasks and are expected to
give their best at every point in time. When people are
unable to meet these expectations, they get stressed and
could even go into depression. We get to hear a lot of cases
where people are depressed due to reasons like peer
pressure, studies, family issues, relationships, etc. and they
eventually get into something that is bad for them as well
as for others. So, to overcome this, cognitive behavioural
therapy (CBT) is considered to be one of the best methods
to address stress as it is easy to implement on people and
also gives good results. This therapy includes
* Images shown here are the property of individual organisations and are used here for reference purpose only.
understanding the behaviour and mindset of a person in their normal life. With the help of CBT,
therapists help people overcome their stress and live a happy life.
To understand more about the concept of this therapy, visit this link:
https://en.wikipedia.org/wiki/Cognitive_behavioral_therapy
Problem Scoping
CBT is a technique used by most therapists to cure patients out of stress and depression. But it has
been observed that people do not wish to seek the help of a psychiatrist willingly. They try to avoid
such interactions as much as possible. Thus, there is a need to bridge the gap between a person who
needs help and the psychiatrist. Let us look at various factors around this problem through the 4Ws
problem canvas.
What do we know
o People who are going through stress are reluctant to consult a psychiatrist.
about them?
What is the o People who need help are reluctant to consult a psychiatrist and hence live
problem? miserably.
How do you know o Studies around mental stress and depression available on various authentic
it is a problem? sources.
o People get a platform where they can talk and vent out their
What would be of key feelings anonymously
value to the stakeholders? o People get a medium that can interact with them and applies
primitive CBT on them and can suggest help whenever needed
How would it improve their o People would be able to vent out their stress
situation? o They would consider going to a psychiatrist whenever required
Now that we have gone through all the factors around the problem, the problem statement templates
go as follows:
“To create a chatbot which can interact with people, help them
to vent out their feelings and take them through primitive CBT.”
Data Acquisition
To understand the sentiments of people, we need to collect their conversational data so the machine
can interpret the words that they use and understand their meaning. Such data can be collected from
various means:
Modelling
Once the text has been normalised, it is then fed to an NLP based AI model. Note that in NLP, modelling
requires data pre-processing only after which the data is fed to the machine. Depending upon the type
of chatbot we try to make, there are a lot of AI models available which help us build the foundation of
our project.
Evaluation
The model trained is then evaluated and the accuracy for the same is generated on the basis of the
relevance of the answers which the machine gives to the user’s responses. To understand the
efficiency of the model, the suggested answers by the chatbot are compared to the actual answers.
As you can see in the above diagram, the blue line talks about the model’s output while the green one
is the actual output along with the data samples.
The model’s output does not match the true function at all. Hence the model is said
Figure 1 to be underfitting and its accuracy is lower.
In the second one, the model’s performance matches well with the true function
Figure 2 which states that the model has optimum accuracy and the model is called a
perfect fit.
In the third case, model performance is trying to cover all the data samples even if
Figure 3 they are out of alignment to the true function. This model is said to be overfitting
and this too has a lower accuracy.
Once the model is evaluated thoroughly, it is then deployed in the form of an app which people can
use easily.
Chatbots
As we have seen earlier, one of the most common applications of Natural Language Processing is a
chatbot. There are a lot of chatbots available and many of them use the same approach as we used in
the scenario above.. Let us try some of the chatbots and see how they work.
• Mitsuku Bot*
https://www.pandorabots.com/mitsuku/
• CleverBot*
https://www.cleverbot.com/
• Jabberwacky*
http://www.jabberwacky.com/
• Haptik*
https://haptik.ai/contact-us
* Images shown here are the property of individual organisations and are used here for reference purpose only.
• Rose*
http://ec2-54-215-197-164.us-west-1.compute.amazonaws.com/speech.php
• Ochatbot*
https://www.ometrics.com/blog/list-of-fun-chatbots/
Let us discuss!
• Which chatbot did you try? Name any one.
• What is the purpose of this chatbot?
• How was the interaction with the chatbot?
• Did the chat feel like talking to a human or a robot? Why do you think so?
• Do you feel that the chatbot has a certain personality?
As you interact with more and more chatbots, you would realise that some of them are scripted or in
other words are traditional chatbots while others were AI-powered and had more knowledge. With
the help of this experience, we can understand that there are 2 types of chatbots around us: Script-
bot and Smart-bot. Let us understand what each of them mean in detail:
Script-bot Smart-bot
Script bots are easy to make Smart-bots are flexible and powerful
Script bots work around a script which is Smart bots work on bigger databases and other
programmed in them resources directly
Mostly they are free and are easy to integrate Smart bots learn with more data
to a messaging platform
No or little language processing skills Coding is required to take this up on board
Limited functionality Wide functionality
The story speaker activity which was done in class 9 can be considered as a script-bot as in that activity
we used to create a script around which the interactive story revolved. As soon as the machine got
triggered by the person, it used to follow the script and answer accordingly. Other examples of script
bot may include the bots which are deployed in the customer care section of various companies. Their
job is to answer some basic queries that they are coded for and connect them to human executives
once they are unable to handle the conversation.
On the other hand, all the assistants like Google Assistant, Alexa, Cortana, Siri, etc. can be taken as
smart bots as not only can they handle the conversations but can also manage to do other tasks which
makes them smarter.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
The sound reaches the brain through a long channel. As a person speaks, the sound travels from his
mouth and goes to the listener’s eardrum. The sound striking the eardrum is converted into neuron
impulse, gets transported to the brain and then gets processed. After processing the signal, the brain
gains understanding around the meaning of it. If it is clear, the signal gets stored. Otherwise, the
listener asks for clarity to the speaker. This is how human languages are processed by humans.
On the other hand, the computer understands the language of numbers. Everything that is sent to the
machine has to be converted to numbers. And while typing, if a single mistake is made, the computer
throws an error and does not process that part. The communications made by the machines are very
basic and simple.
Now, if we want the machine to understand our language, how should this happen? What are the
possible difficulties a machine would face in processing natural language? Let us take a look at some
of them here:
This is the issue related to the syntax of the language. Syntax refers to the grammatical structure of a
sentence. When the structure is present, we can start interpreting the message. Now we also want to
have the computer do this. One way to do this is to use the part-of-speech tagging. This allows the
computer to identify the different parts of a speech.
Besides the matter of arrangement, there’s also meaning behind the language we use. Human
communication is complex. There are multiple characteristics of the human language that might be
easy for a human to understand but extremely difficult for a computer to understand.
Here the way these statements are written is different, but their meanings are the same that is 5.
Here the statements written have the same syntax but their meanings are different. In Python 2.7,
this statement would result in 1 while in Python 3, it would give an output of 1.5.
Think of some other examples of different syntax and same semantics and vice-versa.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Multiple Meanings of a word
Let’s consider these three sentences:
His face turned red after he found out that he took the wrong bag
What does this mean? Is he feeling ashamed because he took another person’s bag instead of his? Is
he feeling angry because he did not manage to steal the bag that he has been targeting?
Here we can see that context is important. We understand a sentence almost intuitively, depending
on our history of using the language, and the memories that have been built within. In all three
sentences, the word red has been used in three different ways which according to the context of the
statement changes its meaning completely. Thus, in natural language, it is important to understand
that a word can have multiple meanings and the meanings fit into the statement according to the
context of it.
Think of some other words which can have multiple meanings and use them in sentences.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
This statement is correct grammatically but does this make any sense? In Human language, a perfect
balance of syntax and semantics is important for better understanding.
Think of some other sentences having correct syntax and incorrect semantics.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
These are some of the challenges we might have to face if we try to teach computers how to
understand and interact in human language. So how does Natural Language Processing do this magic?
Data Processing
Humans interact with each other very easily. For us, the natural languages that we use are so
convenient that we speak them easily and understand them well too. But for computers, our
languages are very complex. As you have already gone through some of the complications in human
languages above, now it is time to see how Natural Language Processing makes it possible for the
machines to understand and speak in the Natural Languages just like humans.
Since we all know that the language of computers is Numerical, the very first step that comes to our
mind is to convert our language to numbers. This conversion takes a few steps to happen. The first
step to it is Text Normalisation. Since human languages are complex, we need to first of all simplify
them in order to make sure that the understanding becomes possible. Text Normalisation helps in
cleaning up the textual data in such a way that it comes down to a level where its complexity is lower
than the actual data. Let us go through Text Normalisation in detail.
Text Normalisation
In Text Normalisation, we undergo several steps to normalise the text to a lower level. Before we
begin, we need to understand that in this section, we will be working on a collection of written text.
That is, we will be working on text from multiple documents and the term used for the whole textual
data from all the documents altogether is known as corpus. Not only would we go through all the
steps of Text Normalisation, we would also work them out on a corpus. Let us take a look at the steps:
Sentence Segmentation
Under sentence segmentation, the whole corpus is divided into sentences. Each sentence is taken as
a different data so now the whole corpus gets reduced to sentences.
Tokenisation
After segmenting the sentences, each sentence is then further divided into tokens. Tokens is a term
used for any word or number or special character occurring in a sentence. Under tokenisation, every
word, number and special character is considered separately and each of them is now a separate
token.
Stopwords are the words which occur very frequently in the corpus but do not add any value to it.
Humans use grammar to make their sentences meaningful for the other person to understand. But
grammatical words do not add any essence to the information which is to be transmitted through the
statement hence they come under stopwords. Some examples of stopwords are:
* Images shown here are the property of individual organisations and are used here for reference purpose only.
These words occur the most in any given corpus but talk very little or nothing about the context or the
meaning of it. Hence, to make it easier for the computer to focus on meaningful terms, these words
are removed.
Along with these words, a lot of times our corpus might have special characters and/or numbers. Now
it depends on the type of corpus that we are working on whether we should keep them in it or not.
For example, if you are working on a document containing email IDs, then you might not want to
remove the special characters and numbers whereas in some other textual data if these characters do
not make sense, then you can remove them along with the stopwords.
Here in this example, the all the 6 forms of hello would be converted to lower case and hence would
be treated as the same word by the machine.
Stemming
In this step, the remaining words are reduced to their root words. In other words, stemming is the
process in which the affixes of words are removed and the words are converted to their base form.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Note that in stemming, the stemmed words (words which are we get after removing the affixes) might
not be meaningful. Here in this example as you can see: healed, healing and healer all were reduced
to heal but studies was reduced to studi after the affix removal which is not a meaningful word.
Stemming does not take into account if the stemmed word is meaningful or not. It just removes the
affixes hence it is faster.
Lemmatization
Stemming and lemmatization both are alternative processes to each other as the role of both the
processes is same – removal of affixes. But the difference between both of them is that in
lemmatization, the word we get after affix removal (also known as lemma) is a meaningful one.
Lemmatization makes sure that lemma is a word with meaning and hence it takes a longer time to
execute than stemming.
As you can see in the same example, the output for studies after affix removal has become study
instead of studi.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Difference between stemming and lemmatization can be summarized by this example:
With this we have normalised our text to tokens which are the simplest form of words present in the
corpus. Now it is time to convert the tokens into numbers. For this, we would use the Bag of Words
algorithm
Bag of Words
Bag of Words is a Natural Language Processing model which helps in extracting features out of the
text which can be helpful in machine learning algorithms. In bag of words, we get the occurrences of
each word and construct the vocabulary for the corpus.
This image gives us a brief overview about how bag of words works. Let us assume that the text on
the left in this image is the normalised corpus which we have got after going through all the steps of
text processing. Now, as we put this text into the bag of words algorithm, the algorithm returns to us
the unique words out of the corpus and their occurrences in it. As you can see at the right, it shows us
a list of words appearing in the corpus and the numbers corresponding to it shows how many times
the word has occurred in the text body. Thus, we can say that the bag of words gives us two things:
2. The frequency of these words (number of times it has occurred in the whole corpus).
Here calling this algorithm “bag” of words symbolises that the sequence of sentences or tokens does
not matter in this case as all we need are the unique words and their frequency in it.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Here is the step-by-step approach to implement bag of words algorithm:
Here are three documents having one sentence each. After text normalisation, the text becomes:
Note that no tokens have been removed in the stopwords removal step. It is because we have very
little data and since the frequency of all the words is almost the same, no word can be said to have
lesser value than the other.
Go through all the steps and create a dictionary i.e., list down all the words which occur in all three
documents:
Dictionary:
Note that even though some words are repeated in different documents, they are all written just once
as while creating the dictionary, we create the list of unique words.
In this step, the vocabulary is written in the top row. Now, for each word in the document, if it matches
with the vocabulary, put a 1 under it. If the same word appears again, increment the previous value
by 1. And if the word does not occur in that document, put a 0 under it.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Since in the first document, we have words: aman, and, anil, are, stressed. So, all these words get a
value of 1 and rest of the words get a 0 value.
Same exercise has to be done for all the documents. Hence, the table becomes:
In this table, the header row contains the vocabulary of the corpus and three rows correspond to three
different documents. Take a look at this table and analyse the positioning of 0s and 1s in it.
Finally, this gives us the document vector table for our corpus. But the tokens have still not converted
to numbers. This leads us to the final steps of our algorithm: TFIDF.
__________________________________________________________________________________
__________________________________________________________________________________
Bag of words algorithm gives us the frequency of words in each document we have in our corpus. It
gives us an idea that if the word is occurring more in a document, its value is more for that document.
For example, if I have a document on air pollution, air and pollution would be the words which occur
many times in it. And these words are valuable too as they give us some context around the document.
But let us suppose we have 10 documents and all of them talk about different issues. One is on women
empowerment, the other is on unemployment and so on. Do you think air and pollution would still be
one of the most occurring words in the whole corpus? If not, then which words do you think would
have the highest frequency in all of them?
And, this, is, the, etc. are the words which occur the most in almost all the documents. But these words
do not talk about the corpus at all. Though they are important for humans as they make the
statements understandable to us, for the machine they are a complete waste as they do not provide
us with any information regarding the corpus. Hence, these are termed as stopwords and are mostly
removed at the pre-processing stage only.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Take a look at this graph. It is a plot of occurrence of words versus their value. As you can see, if the
words have highest occurrence in all the documents of the corpus, they are said to have negligible
value hence they are termed as stop words. These words are mostly removed at the pre-processing
stage only. Now as we move ahead from the stopwords, the occurrence level drops drastically and the
words which have adequate occurrence in the corpus are said to have some amount of value and are
termed as frequent words. These words mostly talk about the document’s subject and their
occurrence is adequate in the corpus. Then as the occurrence of words drops further, the value of
such words rises. These words are termed as rare or valuable words. These words occur the least but
add the most value to the corpus. Hence, when we look at the text, we take frequent and rare words
into consideration.
Let us now demystify TFIDF. TFIDF stands for Term Frequency and Inverse Document Frequency. TFIDF
helps un in identifying the value for each word. Let us understand each term one by one.
Term Frequency
Term frequency is the frequency of a word in one document. Term frequency can easily be found from
the document vector table as in that table we mention the frequency of each word of the vocabulary
in each document.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Here, you can see that the frequency of each word for each document has been recorded in the table.
These numbers are nothing but the Term Frequencies!
Here, you can see that the document frequency of ‘aman’, ‘anil’, ‘went’, ‘to’ and ‘a’ is 2 as they have
occurred in two documents. Rest of them occurred in just one document hence the document
frequency for them is one.
Talking about inverse document frequency, we need to put the document frequency in the
denominator while the total number of documents is the numerator. Here, the total number of
documents are 3, hence inverse document frequency becomes:
Here, log is to the base of 10. Don’t worry! You don’t need to calculate the log values by yourself.
Simply use the log function in the calculator and find out!
Now, let’s multiply the IDF values to the TF values. Note that the TF values are for each document
while the IDF values are for the whole corpus. Hence, we need to multiply the IDF values to each row
of the document vector table.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Here, you can see that the IDF values for Aman in each row is the same and similar pattern is followed
for all the words of the vocabulary. After calculating all the values, we get:
Finally, the words have been converted to numbers. These numbers are the values of each for each
document. Here, you can see that since we have less amount of data, words like ‘are’ and ‘and’ also
have a high value. But as the IDF value increases, the value of that word decreases. That is, for
example:
Which means: log(3.3333) = 0.522; which shows that the word ‘pollution’ has considerable value in
the corpus.
1. Words that occur in all the documents with high term frequencies have the least values and
are considered to be the stopwords.
2. For a word to have high TFIDF value, the word needs to have a high term frequency but less
document frequency which shows that the word is important for one document but is not a
common word for all documents.
3. These values help the computer understand which words are to be considered while
processing the natural language. The higher the value, the more important the word is for a
given corpus.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Applications of TFIDF
TFIDF is commonly used in the Natural Language Processing domain. Some of its applications are:
Document Information
Topic Modelling Stop word filtering
Classification Retrieval System
DIY – Do It Yourself!
Here is a corpus for you to challenge yourself with the given tasks. Use the knowledge you have
gained in the above sections and try completing the whole exercise by yourself.
The Corpus
Document 1: We can use health chatbots for treating stress.
Document 2: We can use NLP to create chatbots and we will be making health chatbots now!
Document 3: Health Chatbots cannot replace human counsellors now. Yay >< !! @1nteLA!4Y
Accomplish the following challenges on the basis of the corpus given above. You can use the tools
available online for these challenges. Link for each tool is given below:
2. Tokenisation: https://text-processing.com/demo/tokenize/
5. Stemming: http://textanalysisonline.com/nltk-porter-stemmer
6. Lemmatisation: http://textanalysisonline.com/spacy-word-lemmatize
What is evaluation?
Evaluation is the process of understanding the reliability of any AI model, based on outputs by feeding
test dataset into the model and comparing with actual answers. There can be different Evaluation
techniques, depending of the type and purpose of the model. Remember that It’s not recommended
to use the data we used to build the model to evaluate it. This is because our model will simply
remember the whole training set, and will therefore always predict the correct label for any point in
the training set. This is known as overfitting.
Firstly, let us go through various terms which are very important to the evaluation process.
The Scenario
Imagine that you have come up with an AI based prediction model which has been deployed in a forest
which is prone to forest fires. Now, the objective of the model is to predict whether a forest fire has
broken out in the forest or not. Now, to understand the efficiency of this model, we need to check if
the predictions which it makes are correct or not. Thus, there exist two conditions which we need to
ponder upon: Prediction and Reality. The prediction is the output which is given by the machine and
the reality is the real scenario in the forest when the prediction has been made. Now let us look at
various combinations that we can have with these two conditions.
Case 1: Is there a forest fire?
Here, we can see in the picture that a forest fire has broken out in the forest. The model predicts a Yes
which means there is a forest fire. The Prediction matches with the Reality. Hence, this condition is
termed as True Positive.
Here there is no fire in the forest hence the reality is No. In this case, the machine too has predicted
it correctly as a No. Therefore, this condition is termed as True Negative.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Case 3: Is there a forest fire?
Here the reality is that there is no forest fire. But the machine has incorrectly predicted that there is
a forest fire. This case is termed as False Positive.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Here, a forest fire has broken out in the forest because of which the Reality is Yes but the machine has
incorrectly predicted it as a No which means the machine predicts that there is no Forest Fire.
Therefore, this case becomes False Negative.
Confusion matrix
The result of comparison between the prediction and reality can be recorded in what we call the
confusion matrix. The confusion matrix allows us to understand the prediction results. Note that it is
not an evaluation metric but a record which can help in evaluation. Let us once again take a look at
the four conditions that we went through in the Forest Fire example:
Prediction and Reality can be easily mapped together with the help of this confusion matrix.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Evaluation Methods
Now as we have gone through all the possible combinations of Prediction and Reality, let us see how
we can use these conditions to evaluate the model.
Accuracy
Accuracy is defined as the percentage of correct predictions out of all the observations. A prediction
can be said to be correct if it matches the reality. Here, we have two conditions in which the Prediction
matches with the Reality: True Positive and True Negative. Hence, the formula for Accuracy becomes:
Here, total observations cover all the possible cases of prediction that can be True Positive (TP), True
Negative (TN), False Positive (FP) and False Negative (FN).
As we can see, Accuracy talks about how true the predictions are by any model. Let us ponder:
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Let us go back to the Forest Fire example. Assume that the model always predicts that there is no fire.
But in reality, there is a 2% chance of forest fire breaking out. In this case, for 98 cases, the model will
be right but for those 2 cases in which there was a forest fire, then too the model predicted no fire.
Here,
True Positives = 0
True Negatives = 98
* Images shown here are the property of individual organisations and are used here for reference purpose only.
This is a fairly high accuracy for an AI model. But this parameter is useless for us as the actual cases
where the fire broke out are not taken into account. Hence, there is a need to look at another
parameter which takes account of such cases as well.
Precision
Precision is defined as the percentage of true positive cases versus all the cases where the prediction
is true. That is, it takes into account the True Positives and False Positives.
Going back to the Forest Fire example, in this case, assume that the model always predicts that there
is a forest fire irrespective of the reality. In this case, all the Positive conditions would be taken into
account that is, True Positive (Prediction = Yes and Reality = Yes) and False Positive (Prediction = Yes
and Reality = No). In this case, the firefighters will check for the fire all the time to see if the alarm was
True or False.
You might recall the story of the boy who falsely cries out that there are wolves every time and so
when they actually arrive, no one comes to his rescue. Similarly, here if the Precision is low (which
means there are more False alarms than the actual ones) then the firefighters would get complacent
and might not go and check every time considering it could be a false alarm.
* Images shown here are the property of individual organisations and are used here for reference purpose only.
This makes Precision an important evaluation criteria. If Precision is high, this means the True Positive
cases are more, giving lesser False alarms.
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Let us consider that a model has 100% precision. Which means that whenever the machine says
there’s a fire, there is actually a fire (True Positive). In the same model, there can be a rare exceptional
case where there was actual fire but the system could not detect it. This is the case of a False Negative
condition. But the precision value would not be affected by it because it does not take FN into account.
Is precision then a good parameter for model performance?
Recall
Another parameter for evaluating the model’s performance is Recall. It can be defined as the fraction
of positive cases that are correctly identified. It majorly takes into account the true reality cases where
in Reality there was a fire but the machine either detected it correctly or it didn’t. That is, it considers
True Positives (There was a forest fire in reality and the model predicted a forest fire) and False
Negatives (There was a forest fire and the model didn’t predict it).
* Images shown here are the property of individual organisations and are used here for reference purpose only.
Now as we notice, we can see that the Numerator in both Precision and Recall is the same: True
Positives. But in the denominator, Precision counts the False Positives while Recall takes False
Negatives into consideration.
Let us ponder… Which one do you think is better? Precision or Recall? Why?
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
__________________________________________________________________________________
Another case where a False Negative can be dangerous is Viral Outbreak. Imagine a deadly virus has
started spreading and the model which is supposed to predict a viral outbreak does not detect it. The
virus might spread widely and infect a lot of people.
On the other hand, there can be cases in which the False Positive condition costs us more than False
Negatives. One such case is Mining. Imagine a model telling you that there exists treasure at a point
and you keep on digging there but it turns out that it is a false alarm. Here, False Positive case
(predicting there is treasure but there is no treasure) can be very costly.
Similarly, let’s consider a model that predicts that a mail is spam or not. If the model always predicts
that the mail is spam, people would not look at it and eventually might lose important information.
Here also False Positive condition (Predicting the mail as spam while the mail is not spam) would have
a high cost.
Think of some more examples having:
To conclude the argument, we must say that if we want to know if our model’s performance is good,
we need these two measures: Recall and Precision. For some cases, you might have a High Precision
but Low Recall or Low Precision but High Recall. But since both the measures are important, there is
a need of a parameter which takes both Precision and Recall into account.
F1 Score
F1 score can be defined as the measure of balance between precision and recall.
Take a look at the formula and think of when can we get a perfect F1 score?
An ideal situation would be when we have a value of 1 (that is 100%) for both Precision and Recall. In
that case, the F1 score would also be an ideal 1 (100%). It is known as the perfect value for F1 Score.
As the values of both Precision and Recall ranges from 0 to 1, the F1 score also ranges from 0 to 1.
Let us explore the variations we can have in the F1 Score:
In conclusion, we can say that a model has good performance if the F1 Score for that model is high.
Let’s practice!
Let us understand the evaluation parameters with the help of examples.
Challenge
Find out Accuracy, Precision, Recall and F1 Score for the given problems.
Scenario 1:
In schools, a lot of times it happens that there is no water to drink. At a few places, cases of water
shortage in schools are very common and prominent. Hence, an AI model is designed to predict if
there is going to be a water shortage in the school in the near future or not. The confusion matrix for
the same is:
Scenario 2:
Nowadays, the problem of floods has worsened in some parts of the country. Not only does it damage
the whole place but it also forces people to move out of their homes and relocate. To address this
issue, an AI model has been created which can predict if there is a chance of floods or not. The
confusion matrix for the same is:
Scenario 3:
A lot of times people face the problem of sudden downpour. People wash clothes and put them out
to dry but due to unexpected rain, their work gets wasted. Thus, an AI model has been created which
predicts if there will be rain or not. The confusion matrix for the same is:
Scenario 4:
Traffic Jams have become a common part of our lives nowadays. Living in an urban area means you
have to face traffic each and every time you get out on the road. Mostly, school students opt for buses
to go to school. Many times the bus gets late due to such jams and students are not able to reach their
school on time. Thus, an AI model is created to predict explicitly if there would be a traffic jam on their
way to school or not. The confusion matrix for the same is:
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE
QUESTION BANK – CLASS 10
CHAPTER 1: INTRODUCTION TO AI: FOUNDATIONAL CONCEPTS
True/False:
1. A machine is artificially intelligent when it can accomplish tasks by itself. (True)
2. Is a smart washing machine an example of an Artificially Intelligent devices? (False)
3. Platforms like Netflix, Amazon, Spotify, YouTube etc. show us recommendations on the
basis of what we like. (True)
Direct Question:
1. What do you understand by linguistic Intelligence?
Linguistic intelligence means intelligence to understand and interpret human natural
language and try to extract meaning out of it.
OR
Linguistic Intelligence refers to the ability of an individual to understand both written
and spoken language and the additional ability to write and speak the language too.
OR
This is the intelligence of language and communication. It includes the ability to speak,
articulate, and express, and convey one’s thoughts and feelings to the outside world in
one or more languages. This can be at an oral and written level. It also includes the
ability to listen to and to understand other people.
3. Mention four examples of machines that are not AI but confused with AI.
Or
Mention four examples of machines that are smart but not AI.
Automatic gates in shopping malls / remote control drones/ a fully automatic washing
machine/ Air Conditioner/ Refrigerator/ Robotic toy cars/ Television etc.
1. What is Intelligence? Explain in brief any three types of intelligence that are
mainly perceived by human beings?
Intelligence is the ‘ability to perceive or infer information, and to retain it as knowledge
to be applied towards adaptive behavior within an environment or context.’
OR
Intelligence is the ability to interact with the world (speech, vision, motion,
manipulation), ability to model the world and to reason about it, ability to learn, ability
to make decisions and to adapt.
OR
Intelligence has been defined in many ways: It involves abstract reasoning, mental
representation, problem solving, and decision making, the ability to learn, emotional
knowledge, creativity, and adaptation to meet the demands of the environment
effectively.
2. Differentiate between what is AI and what is not AI with the help of an example?
AI Machine Not AI machine
1. AI machines are trained with data 1. Smart machines which are not AI, do
and algorithm. not require training data, they work on
2. AI machines learn from mistakes and algorithms only.
experience. They try to improvise on 2. Smart machines work on fixed
their next iterations. algorithms and they always work with
3. AI machines can analyses the the same level of efficiency, which is
situation and can take decisions programmed into them.
While we see a lot of AI applications around us, there still exist a lot of them which are
smart but not intelligent.
An AI enabled machine should not only recognize, but should also do something with
its gathered information. Artificial intelligence” must mean a human-made interface
with the power to reason and integrate knowledge. AI must demonstrate at least some
of the following behaviors associated with human intelligence: planning, learning,
reasoning, problem solving, knowledge representation, perception, motion,
manipulation and, to a lesser extent, social intelligence, and creativity.
Most IOT items are ordinary things outfitted with sensors and connected to the
Internet. For example, sensors in your office can recognize shadows or movements,
but that doesn’t make them an example of artificial intelligence. A fully automatic
washing machine can work on its own, but it requires human intervention to select the
parameters of washing and to do the necessary preparation for it to function correctly
before each wash, which makes it an example of automation, not AI.
3. How can AI be integrated with non-AI technologies? Explain with the help of an
example.
Today’s world is changing with the adoption of IOT (Internet of Things). IOT is helping
in prominently capturing a tremendous amount of data from multiple sources. The
convergence of AI (Artificial Intelligence) and IOT can redefine the way industries,
business, and economies function. AI enabled IoT creates intelligent machines that
simulate smart behavior and supports decision making with little or no human
interference.
While IOT provides data, artificial intelligence acquires the power to unlock responses,
offering both creativity and context to drive smart actions. Here are some examples:
Ex. 1: Self-driving Cars: Tesla’s self-driving cars are the best example of IoT and AI
working together. With the power of AI, self-driving cars predict the behavior
of pedestrians and cards in various circumstances. For example, they can
determine road conditions, optimal speed, weather and getting smarter with
each trip.
Ex. 2: Robots in Manufacturing: Manufacturing is one of the industries that already
embraced new technologies like IoT, artificial intelligence, facial recognition,
deep learning, Robots and many more. Robots employed in factories are
turning smarter with the support of implanted sensors, which facilitates data
transmission. Moreover, as the robots are provisioned with artificial
intelligence algorithms, they can learn from newer data. This approach not only
saves time and cost but also makes the manufacturing process better over time.
*Any one example from above or any other matching example can be given
4. Read the given scenario and answer the questions that follow:
A farmer keeps rabbits in three large hutches that stand in a row in his backyard.
Each of the hutches is painted different colours – red, yellow and green. Until
recently, the number of rabbits in the green hutch was twice as large as the
number of rabbits in the yellow hutch. Then, one day, the farmer took five rabbits
out of the left-side hutch and gave them away to the local school’s pet corner. He
also took half of the rabbits that remained in the left-side hutch and moved them
to the red hutch.
a. What was the colour of the left-side hutch? Justify your answer with
explanation.
The answer is yellow.
Explanation: As we already know at the outset the number of rabbits in the green
hutch was twice as large as the number of rabbits in the yellow hutch. This means that
the number of rabbits in the green hutch was an even number. After the farmer
removed five rabbits from the left side hutch, then the number of rabbits that
remained there also became an even number. This is proven by the fact that it was
divisible by 2. Therefore, before those five were removed, the left side hutch contained
an uneven number of rabbits hence the left side hutch cannot be the green one, but
based on the given information, it cannot be the red one. Hence it is yellow.
5. A scenario is given to you below. Read it and answer the questions that follow:
Late one night, a car ran over a pedestrian in a narrow by street and drove away
without stopping. A policeman who saw the vehicle leave the scene of the accident
reported it moving at very high speed. The accident itself was witnessed by six
bystanders. They provided the following conflicting accounts of what had
happened:
- It was a blue car driven by a man;
- The car was moving at high speed and its headlights were turned off;
- The car did have license plates; it wasn’t going very fast;
- It was a Toyota and its headlights were turned off;
- The car didn’t have license plates; the driver was a woman;
- It was a grey Ford.
When the car and its driver were finally apprehended, it turned out that only one
of the six eyewitnesses gave a fully correct description. Each of the other five
provided one true and one false piece of information. Keeping that in mind, can
you determine the following:
Explanation: Out of the statements of 6 bystanders, the third statement becomes false
as the policeman who saw the vehicle leave the scene of the accident reported it
moving at very high speed. Then eliminating all false statements of bystanders, the
above results can be extracted.
6. A firefighter has to get to a burning building as quickly as he can. There are three
paths that he can take. He can take his fire engine over a large hill (5 miles) at 8
miles per hour. He can take his fire engine through a windy road (7 miles) at 9
miles per hour. Or he can drive his fire engine along a dirt road which is 8 miles at
12 miles per hour. Which way should he choose? (speed=distance/time)
To reach the destination quickly, the fire fighter has to calculate the time required on
the basis of given data. Driving his fire engine 5 miles at 8 miles per hour takes 37.5
minutes. Driving his fire engine 7 miles at 9 miles per hour takes about 47 minutes.
Driving his fire engine 8 miles at 12 miles per hour takes 40 minutes So he should
choose to drive his fire engine over the hill.)
7. A thief has just found a pair of ancient treasure caves. One of the caves is filled
with unbelievable treasure and the other has a fire breathing monster that will
eat anyone who opens that cave. One cave has a black door decorated with
diamonds and the other cave has a brown door decorated with sapphires. Each of
the doors has an engraved description on top. The descriptions say:
a. Black Door: Monster is here.
b. Brown Door: Only One Door speaks the truth.
Which door should the thief open?
The treasure is in the Black door.
Explanation: Let us look at the description on the Brown door. It can be correct or
wrong.
Scenario 1: The description on the Brown door is true. Then the description on the
Black door has to be false. That means that the inscription on the Black door is false
and the cave with black door contains the treasure!
Scenario 2: The description on the Brown door is false. Then either both the
descriptions are false or both are true. Both cannot be true as that is impossible and
not consistent. That means that both descriptions are false.
True/False:
3. All the apps collect some kind of data. (True)
Direct Questions:
4. What do you understand by Machine Learning?
Machine Learning is a subset of Artificial Intelligence which enables machines to improve
at tasks with experience (data). The intention of Machine Learning is to enable machines
to learn by themselves using the provided data and make accurate Predictions/
Decisions.
OR
Machine learning focuses on the development of computer programs that can access data
and use it to learn for themselves.
OR
Machine learning is a data analytics technique that teaches computers to do what comes
naturally to humans and animals: learn from experience.
New Addition
MCQ (Correct answers are highlighted)
11. Snapchat filters use _____ and _____ to enhance your selfie with flowers, cat ears etc.
a) machine learning and deep learning
b) data and image processing
c) augmented reality and machine learning
d) NLP and computer vision
12. Based on the image below, choose the correct domain or domains of AI required for it:
13. Rock paper and scissors game is based on the following domain:
a) Data for AI
b) Natural Language Processing
c) Computer Vision
d) Image processing
a) Data Science
b) Natural Language Processing
c) Computer Vision
d) Rule Based
For example: a company that has petabytes of user data may use data science to develop
effective ways to store, manage, and analyze the data.
CBSE QUESTION BANK – AI – CLASS 10 – CHAPTER 2 INTRODUCTION TO AI: BASICS 3
OF AI
2. What is Computer Vision? Give an example of it.
Computer Vision, abbreviated as CV, is a domain of AI that depicts the capability of a
machine to get and analyze visual information and afterwards predict some decisions about
it. The entire process involves image acquiring, screening, analyzing, identifying and
extracting information.
OR
Computer vision is an interdisciplinary field that deals with how computers can be made to
gain high-level understanding from digital images or videos.
OR
The Computer Vision domain of Artificial Intelligence, enables machines to see through
images or visual data, process and analyze them on the basis of algorithms and methods in
order to analyze actual phenomena with images.
For Example: Email filters, Smart assistants: - Apple’s Siri and Amazon’s Alexa
Example:
Price Comparison websites- They collect data about a product from different sites and then
analyze trends out of it and show up the most appropriate results.
Data privacy or information privacy is a branch of data security concerned with the proper
handling of data – consent, notice, and regulatory obligations. More specifically,
practical data privacy concerns often revolve around: Whether or how data is shared with
third parties
Note: This is an open-ended question, so both the answers yes/no will be considered right
with correct justification.
2. What do you understand by Data Privacy? Discuss in detail with some examples.
Data privacy, sometimes also referred to as information privacy, is an area of data
protection that concerns the proper handling of sensitive data including,
notably, personal data but also other confidential data, such as certain financial data and
intellectual property data, to meet regulatory requirements as well as protecting the
confidentiality and immutability of the data. It focuses on how to collect, process, share,
archive, and delete the data in accordance with the law.
Privacy, in the broadest sense, is the right of individuals, groups, or organizations
to control who can access, observe, or use something they own, such as their bodies,
property, ideas, data, or information.
Control is established through physical, social, or informational boundaries that help
prevent unwanted access, observation, or use. For example:
A physical boundary, such as a locked front door, helps prevent others from entering a
building without explicit permission in the form of a key to unlock the door or a
person inside opening the door.
A social boundary, such as a members-only club, only allows members to access and
use club resources.
An informational boundary, such as a non-disclosure agreement, restricts what
information can be disclosed to others.
Privacy of information is extremely important in this digital age where everything is
interconnected and can be accessed and used easily. The possibilities of our private
information being extremely vulnerable are very real, which is why we require data
privacy.
CBSE QUESTION BANK – AI – CLASS 10 – CHAPTER 2 INTRODUCTION TO AI: BASICS 7
OF AI
3. What do you understand by AI, ML & DL? How are they different from each other?
6. As Artificially Intelligent machines become more and more powerful, their ability to
accomplish tedious tasks is becoming better. Hence, it is now that AI machines have
started replacing humans in factories. While people see it in a negative way and say AI
has the power to bring mass unemployment and one day, machines would enslave
humans, on the other hand, other people say that machines are meant to ease our lives.
If machines over take monotonous and tedious tasks, humans should upgrade their
skills to remain their masters always.
What according to you is a better approach towards this ethical concern? Justify your
answer.
● AI taking over laborious jobs won’t create unemployment. It is just a groundless fear.
The standard view of technical change is that some jobs are displaced by the
substitution of machines for labour, but that the fear of total displacement is misplaced
because new jobs are created, largely due to the technology-fuelled increase in
productivity. Humans have always shifted away from work suitable for machines and to
other jobs.
CBSE QUESTION BANK – AI – CLASS 10 – CHAPTER 2 INTRODUCTION TO AI: BASICS 9
OF AI
● The basic fact is that technology eliminates jobs, not work. If this level of AI revolution
will happen, lots of job opportunities will be created. For example: 20-30 years ago,
being an accountant was a lucrative job, AI took over this job but this created a lot of
opportunities, it raised the demand of a software engineer, data scientist, etc.
● It will open doors to skillful jobs rather than doing laborious tasks.
● Thus, we will be able to cope with the level of major unemployment, if AI took over
laborious jobs.
7. List down various sensors that are present in a smartphone. Also list down the type
of data which gets collected through them.
ACCELEROMETER [ helps running AR applications and track steps]
GPS [ Location Data]
Gyroscope [Orientation Data]
Magnetometer [ Direction and Magnetic Field Data]
Biometric Sensors [Fingerprint ,Iris, Face data]
New Additions
1. (Case Study) AI and robotics have raised some questions regarding liability. Take for
example the scenario of an ‘autonomous’ or AI-driven robot moving through a
factory. Another robot surprisingly crosses its way and our robot draws aside to
prevent collision. However, by this manoeuvre the robot injures a person.
ARTIFICIAL INTELLIGENCE
QUESTION BANK – CLASS 10
CHAPTER 3: AI PROJECT CYCLE
1. What are the two different approaches for AI modelling? Define them.
There are two approaches for AI Modelling; Rule Based and Learning Based.
The Rule based approach generates pre-defined outputs based on certain rules
programmed by humans. Whereas, machine learning approach has its own rules based
on the output and data used to train the models.
OR
Rule Based Approach Refers to the AI modelling where the relationship or patterns in
data are defined by the developer. The machine follows the rules or instructions
mentioned by the developer, and performs its task accordingly. Whereas in Learning
based approach, the relationship or patterns in data are not defined by the developer.
In this approach, random data is fed to the machine and it is left to the machine to
figure out patterns and trends out of it
2. What is a problem statement template and what is its significance?
The problem statement template gives a clear idea about the basic framework
required to achieve the goal. It is the 4Ws canvas which segregates; what is the
problem, where does it arise, who is affected, why is it a problem? It takes us straight
to the goal.
3. Explain any two SDGs in detail.
1. No Poverty: This is Goal 1 and strives to End poverty in all its forms everywhere
globally by 2030. The goal has a total of seven targets to be achieved.
2. Quality Education: This is Goal 4 which aspires to ensure inclusive and equitable
quality education and promote lifelong learning opportunities for all. It has 10 targets
to achieve.
* (Any two goals can be defined)
4. Mention the precautions to be taken while acquiring data for developing an AI
Project.
It should be from an authentic source, and accurate. Look for redundant and irrelevant
data parameters that does not take part in prediction.
5. What do you mean by Data Features?
The type of data to collect,It should be relevant data.
6. Write the names for missing stages in the given AI project cycle:
14. What are the different types of sources of data from where we can collect
reliable and authentic datasets? Explain in brief.
Data can be a piece of information or facts and statistics collected together for
reference or analysis. Whenever we want an AI project to be able to predict an output,
we need to train it first using data There could be many ways and sources from where
we can collect reliable and authentic datasets namely Surveys, Web scrapping,
Sensors, Cameras, Observations, Research, Investigation, API etc.
Sometimes Internet is also used to acquire data but the most important point to keep
in mind is that the data should be taken from reliable and authentic websites only.
Some reliable data sources are UN, Google scholar, Finance, CIA, Data.gov etc.
2. Explain the relation between data size and model performance of an Artificial
Neural Network.
The basis for any kind of AI development is BIG DATASET. The performance of any AI
based application depends on the data supplied
ANN models are also known as Learning models and are used for prediction purposes.
These are mostly developed without paying much cognizance to the size of datasets
that can produce models of high accuracy and better generalization. Although, the
general belief is that, large dataset is needed to construct a predictive learning model.
To describe a data set as large in size, perhaps, is circumstance dependent, thus, what
constitutes a dataset to be considered as being big or small is somehow vague.
In fact, the quantity of data partitioned for the purpose of training must be of good
representation of the entire sets and sufficient enough to span through the input
space. It must be authentic and relevant to give better model performance.
3. Draw the 4Ws problem canvas and explain each one of them briefly.
The 4Ws problem canvas is the basic template while scoping a problem and using this
canvas, the picture becomes clearer while we are working to solve it.
a) Who: The “Who” block helps you in analyzing the people getting affected directly or
indirectly due to it? Under this, you find out who the ‘stakeholders’ to this problem are
and what you know about them. Stakeholders are the people who face this problem
and would be benefitted with the solution.
b) What: Under the “What” block, you need to look into what you have on hand. At this
stage, you need to determine the nature of the problem. What is the problem and how
do you know that it is a problem?
c) Where: In this block, you need to focus on the context/situation/location of the
problem. It will help you look into the situation in which the problem arises, the
context of it, and the locations where it is prominent.
d) Why: in the “Why” canvas, think about the benefits which the stakeholders would get
from the solution and how would it benefit them as well as the society.
9. Five sustainable Development Goals are mentioned below. Write 2 problems under
each goal that you think should be addressed for achieving the goal.
a. Quality Education
b. Reduced Inequalities
c. Life on Land
d. No Poverty
e. Clean Water and Sanitation
a. Quality Education:
i. Providing education remotely, leveraging hi-tech, low-tech and no-tech approaches;
ii. Ensure coordinated responses and avoid overlapping efforts;
iii. Ensuring return of students to school when they reopen to avoid an upsurge in
dropout rates.
b. Reduced inequalities:
i. Reduction of relative economic inequalities inequality in some countries having
poorest and most vulnerable communities.
ii. Improving the situations in countries with weaker health systems.
c. Life on Land:
i. Prevention of Deforestation caused by humans and restoration of land
ii. Preventions and cure of diseases that are transmissible between animals and humans
d. No Poverty
i. Creation of Strong social protection systems to prevent people from falling into
poverty
ii. Reduction of social exclusion, and high vulnerability of certain populations to disasters
and diseases.
iii. Responsible distribution of resources.
CBSE Question Bank – AI – Class 10 – Chapter 3 AI Project Cycle 9
e. Clean Water and Sanitation
i. To increase access to clean drinking water and sanitation mostly in rural areas
ii. Managing our water sustainably to manage our production of food and energy.
1. What is a Chabot?
A chatbot is a computer program that's designed to simulate human conversation
through voice commands or text chats or both. Eg: Mitsuku Bot, Jabberwacky etc.
OR
A chatbot is a computer program that can learn over time how to best interact with
humans. It can answer questions and troubleshoot customer problems, evaluate and
qualify prospects, generate sales leads and increase sales on an ecommerce site.
OR
A chatbot is a computer program designed to simulate conversation with human users.
A chatbot is also known as an artificial conversational entity (ACE), chat robot, talk bot,
chatterbot or chatterbox.
OR
A chatbot is a software application used to conduct an on-line chat conversation via text
or text-to-speech, in lieu of providing direct contact with a live human agent.
1. What are the types of data used for Natural Language Processing applications?
Natural Language Processing takes in the data of Natural Languages in the form of
written words and spoken words which humans use in their daily lives and operates on
this.
Script-bot Smart-bot
A scripted chatbot doesn’t carry Smart bots are built on NLP and
even a glimpse of A.I ML.
Script bots are easy to make Smart –bots are comparatively
difficult to make.
Script bot functioning is very Smart-bots are flexible and
limited as they are less powerful. powerful.
Script bots work around a script ● Smart bots work on bigger
which is programmed in them databases and other resources
directly
No or little language processing ● NLP and Machine learning skills
skills are required.
Limited functionality ● Wide functionality
8. Which words in a corpus have the highest values and which ones have the least?
Stop words like - and, this, is, the, etc. have highest values in a corpus. But these words
do not talk about the corpus at all. Hence, these are termed as stopwords and are mostly
removed at the pre-processing stage only.
Rare or valuable words occur the least but add the most importance to the corpus.
Hence, when we look at the text, we take frequent and rare words into consideration.
9. Does the vocabulary of a corpus remain the same before and after text
normalization? Why?
No, the vocabulary of a corpus does not remain the same before and after text
normalization. Reasons are –
● In normalization the text is normalized through various steps and is lowered to
minimum vocabulary since the machine does not require grammatically correct
statements but the essence of it.
● In normalization Stop words, Special Characters and Numbers are removed.
● In stemming the affixes of words are removed and the words are converted to their base
form.
So, after normalization, we get the reduced vocabulary.
10. What is the significance of converting the text into a common case?
In Text Normalization, we undergo several steps to normalize the text to a lower level.
After the removal of stop words, we convert the whole text into a similar case,
preferably lower case. This ensures that the case-sensitivity of the machine does not
consider same words as different just because of different cases.
As shown in the graph, occurrence and value of a word are inversely proportional. The
words which occur most (like stop words) have negligible value. As the occurrence of
words drops, the value of such words rises. These words are termed as rare or valuable
words. These words occur the least but add the most value to the corpus.
16. What are stop words? Explain with the help of examples.
“Stop words” are the most common words in a language like “the”, “a”, “on”, “is”, “all”.
These words do not carry important meaning and are usually removed from texts. It is
possible to remove stop words using Natural Language Toolkit (NLTK), a suite of
libraries and programs for symbolic and statistical natural language processing.
2. Classify each of the images according to how well the model’s output matches the
data samples:
Here, the red dashed line is model’s output while the blue crosses are actual data
samples.
● The model’s output does not match the true function at all. Hence the model is said to be
under fitting and its accuracy is lower.
● In the second case, model performance is trying to cover all the data samples even if
they are out of alignment to the true function. This model is said to be over fitting and
this too has a lower accuracy
● In the third one, the model’s performance matches well with the true function which
states that the model has optimum accuracy and the model is called a perfect fit.
Sentence Segmentation - Under sentence segmentation, the whole corpus is divided into
sentences. Each sentence is taken as a different data so now the whole corpus gets
reduced to sentences.
Tokenisation- After segmenting the sentences, each sentence is then further divided into
tokens. Tokens is a term used for any word or number or special character occurring in
a sentence. Under tokenisation, every word, number and special character is considered
separately and each of them is now a separate token.
Removing Stop words, Special Characters and Numbers - In this step, the tokens which
are not necessary are removed from the token list.
Converting text to a common case -After the stop words removal, we convert the whole
text into a similar case, preferably lower case. This ensures that the case-sensitivity of
the machine does not consider same words as different just because of different cases.
Stemming In this step, the remaining words are reduced to their root words. In other
words, stemming is the process in which the affixes of words are removed and the
words are converted to their base form.
Lemmatization -in lemmatization, the word we get after affix removal (also known as
lemma) is a meaningful one.
With this we have normalized our text to tokens which are the simplest form of words
present in the corpus. Now it is time to convert the tokens into numbers. For this, we
would use the Bag of Words algorithm
6. Through a step-by-step process, calculate TFIDF for the given corpus and mention
the word(s) having highest value.
Document 1: We are going to Mumbai
Document 2: Mumbai is a famous place.
Document 3: We are going to a famous place.
Document 4: I am famous in Mumbai.
Term Frequency
Term frequency is the frequency of a word in one document. Term frequency can easily
be found from the document vector table as in that table we mention the frequency of
each word of the vocabulary in each document.
Talking about inverse document frequency, we need to put the document frequency in
the denominator while the total number of documents is the numerator. Here, the total
number of documents are 3, hence inverse document frequency becomes:
7. Normalize the given text and comment on the vocabulary before and after the
normalization:
Raj and Vijay are best friends. They play together with other friends. Raj likes to
play football but Vijay prefers to play online games. Raj wants to be a footballer.
Vijay wants to become an online gamer.
Likes -s Like
Prefers -s Prefer
Wants -s want
1. Define Evaluation.
Moving towards deploying the model in the real world, we test it in as many ways
aspossible. The stage of testing the models is known as EVALUATION.
OR
Evaluation is a process of understanding the reliability of any AI model, based on outputs
by feeding the test dataset into the model and comparing it with actual answers.
OR
Evaluation is a process that critically examines a program. It involves collecting and
analyzing information about a program’s activities, characteristics, and outcomes. Its
purpose is to make judgments about a program, to improve its effectiveness, and/or to
inform programming decisions.
2. Which two parameters are considered for Evaluation of a model?
Prediction and Reality are the two parameters considered for Evaluation of a model.
The “Prediction” is the output which is given by the machine and the “Reality”is the real
scenario, when the prediction has been made?
Precision is defined as the percentage of true positive cases versus all the cases where the
prediction is true.
That is, it takes into account the True Positives and False Positives.
Evaluation is important to ensure that the model is operating correctly and optimally.
Evaluation is an initiative to understand how well it achieves its goals.
Evaluations help to determine what works well and what could be improved in a
program
6. How do you suggest which evaluation metric is more important for any case?
F 1 Evaluation metric is more important in any case. F1 score sort maintains a balance
between the precision and recall for the classifier. If the precision is low, the F1 is low
and if the recall is low again F1 score is low.
The F1 score is a number between 0 and 1 and is the harmonic mean of precision
and recall
When we have a value of 1 (that is 100%) for both Precision and Recall. The F1 score would
also be an ideal 1 (100%). It is known as the perfect value for F1 Score. As the values of
both Precision and Recall ranges from 0 to 1, the F1 score also ranges from 0 to 1.
7. Which evaluation metric would be crucial in the following cases? Justify your
answer.
a. Mail Spamming
b. Gold Mining
c. Viral Outbreak
Here, Mail Spamming and Gold Mining are related to FALSE POSITIVE cases which are
expensive at cost. But Viral Outbreak is a FALSE NEGATIVE case which infects a lot of
people on health and leads to expenditure of money too for checkups.
So, False Negative case (VIRAL OUTBREAK) are more crucial and dangerous when
compared to FALSE POSITIVE cases.
(OR)
CBSE Question Bank – AI – Class 10 – Chapter- 8 Evaluation 3
a. If the model always predicts that the mail is spam, people would not look at it and
eventually might lose important information. False Positive condition would have a
high cost. (predicting the mail as spam while the mail is not spam)
b. A model saying that there exists treasure at a point and you keep on digging there but
it turns out that it is a false alarm. False Positive case is very costly.
(predicting there is a treasure but there is no treasure)
c. A deadly virus has started spreading and the model which is supposed to predict a
viral outbreak does not detect it. The virus might spread widely and infect a lot of
people. Hence, False Negative can be dangerous
8. What are the possible reasons for an AI model not being efficient? Explain.
Reasons of an AI model not being efficient:
a. Lack of Training Data: If the data is not sufficient for developing an AI Model, or if the
data is missed while training the model, it will not be efficient.
b. Unauthenticated Data / Wrong Data: If the data is not authenticated and correct, then
the model will not give good results.
c. Inefficient coding / Wrong Algorithms: If the written algorithms are not correct
and relevant, Model will not give desired output. Not Tested: If the model is not
tested properly, then it will not be efficient.
d. Not Easy: If it is not easy to be implemented in production or scalable.
e. Less Accuracy: A model is not efficient if it gives less accuracy scores in production
or test data or if it is not able to generalize well on unseen data.
(Any three of the above can be selected)
9. Answer the following:
The F1 Score, also called the F score or F measure, is a measure of a test’s accuracy.
It is calculated from the precision and recall of the test, where the precision is the number
of correctly identified positive results divided by the number of all positive results,
including those not identified correctly, and the recall is the number of correctly identified
positive results divided by the number of all samples that should have been identified as
positive.
The F1 score is defined as the weighted harmonic mean of the test’s precision and recall.
This score is calculated according to the formula.
Formula:
Necessary:
F-Measure provides a single score that balances both the concerns of precision and recall in
one number.
A good F1 score means that you have low false positives and low false negatives, so you’re
correctly identifying real threats, and you are not disturbed by false alarms.
An F1 score is considered perfect when it’s 1, while the model is a total failure when it’s 0.
F1 Score is a better metric to evaluate our model on real-life classification problems and
when imbalanced class distribution exists.
Confusion Matrix:
A Confusion Matrix is a table that is often used to describe the performance of a
classification model (or "classifier") on a set of test data for which the true values are
known.
(or)
A 2x2 matrix denoting the right and wrong predictions might help us analyse the rate of
success. This matrix is termed the Confusion Matrix.
Therefore, Confusion Matrix provides a more insightful picture which is not only the
performance of a predictive model, but also which classes are being predicted correctly and
incorrectly, and what type of errors are being made.
The confusion matrix is useful for measuring Recall (also known as Sensitivity), Precision,
Accuracy and F1 Score.
The actual value was negative and the model predicted a negative value
False Positive (FP) – Type 1 error
The predicted value was falsely predicted
The actual value was negative but the model predicted a positive value ● Also known as the
Type 1 error
False Negative (FN) – Type 2 error
The actual value was positive but the model predicted a negative value also known as the
Type 2 error
Example:
The result of TN will be that good loans are correctly predicted as good loans.
The result of FP will be that (actual) good loans are incorrectly predicted as bad loans.
The result of FN will be that (actual) bad loans are incorrectly predicted as good loans.
The banks would lose a bunch of money if the actual bad loans are predicted as good loans
due to loans not being repaid. On the other hand, banks won't be able to make more
revenue if the actual good loans are predicted as bad loans. Therefore, the cost of False
Negatives is much higher than the cost of False Positives.
3. Calculate Accuracy, Precision, Recall and F1 Score for the following Confusion Matrix
on Heart Attack Risk. Also suggest which metric would not be a good evaluation
parameter here and why?
= (70/100)
= 0.7
Precision:
Precision is defined as the percentage of true positive cases versus all the cases where the
prediction is true.
= 50 / (50 + 60)
= 50 / 110
= 0.5
F1 Score:
Therefore,
Accuracy= 0.7 Precision=0.714 Recall=0.5
F1 Score=0.588
Here within the test there is a tradeoff. But Recall is not a good Evaluation metric. Recall
metric needs to improve more.
Because,
False Positive (impacts Precision): A person is predicted as high risk but does not have
heart attack.
False Negative (impacts Recall): A person is predicted as low risk but has heart attack.
Therefore, False Negatives miss actual heart patients, hence recall metric need more
improvement.
False Negatives are more dangerous than False Positives.
4. Calculate Accuracy, Precision, Recall and F1 Score for the following Confusion Matrix on
Water Shortage in Schools: Also suggest which metric would not be a good evaluation
parameter here and why?
Reality: 1 Reality: 0
Prediction: 1 75 5 80
Prediction: 0 5 15 20
80 20 100
Calculation:
Accuracy
Accuracy is defined as the percentage of correct predictions out of all the observations
Where True Positive (TP), True Negative (TN), False Positive (FP) and False Negative
(FN).
CBSE Question Bank – AI – Class 10 – Chapter- 8 Evaluation 9
= (75+15) / (75+15+5+5)
= (90 / 100)
=0.9
Precision:
Precision is defined as the percentage of true positive cases versus all the cases where the
prediction is true.
= 75 / (75+5)
= 75 /80
= 0.9375
Recall:
= 75 / (75+5)
= 75 /80
= 0.9375
F1 Score:
F1 score is defined as the measure of balance between precision and recall.
= 2 * ((0.9375 *0.9375) / (0.9375+0.9375)
Therefore,
= 2 * (0.8789 / 1.875)
= 2 * 0.46875
= 0.9375
Accuracy= 0.9% Precision=0.9375% Recall=0.9375%
F1 Score=0.
Accuracy is defined as the percentage of correct predictions out of all the observations
Where True Positive (TP), True Negative (TN), False Positive (FP) and False Negative
(FN).
= (10 + 25) / (10+25+55+10)
= 35 / 100
= 0.35
Precision:
Precision is defined as the percentage of true positive cases versus all the cases where
the prediction is true.
= 10 / (10 +55)
= 10 /65
= 0.15
Recall:
It is defined as the fraction of positive cases that are correctly identified.
Therefore,
= 2 * ((0.15 * 0.5) / (0.15 + 0.5))
= 2 * (0.075 / 0.65)
= 2 * 0.115
= 0.23
Accuracy= 0.35
Precision= 0.15
Recall= 0.5
F1 Score= 0.23
Here within the test there is a tradeoff. But Precision is not a good Evaluation metric.
Precision metric needs to improve more.
Because,
False Negative (impacts Recall): Mail is predicted as “not spam” but spam
Of course, too many False Negatives will make the Spam Filter ineffective. But False
Positives may cause important mails to be missed. Hence, Precision is more important
to improve
1 Self-Management Skills - II 2 2 4
2 ICT Skills - II 2 1 3
3 Entrepreneurial Skills - II 2 2 4
TOTAL QUESTIONS 6 5 11
1 Introduction to AI 6 2 2 10
2 AI Project Cycle 6 1 1 8
Natural Language
6 6 2 1 9
Processing
7 Evaluation 6 1 1 8
TOTAL QUESTIONS 24 6 5 35
NO. OF QUESTIONS
20 Any 4 Any 3 27
TO BE ANSWERED
Page 1 of 9
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE (SUBJECT CODE - 417)
General Instructions:
1. Please read the instructions carefully.
2. This Question Paper consists of 21 questions in two sections: Section A & Section B.
3. Section A has Objective type questions whereas Section B contains Subjective type questions.
4. Out of the given (5 + 16 =) 21 questions, a candidate has to answer (5 + 10 =) 15 questions in the
allotted (maximum) time of 2 hours.
5. All questions of a particular section must be attempted in the correct order.
6. SECTION A - OBJECTIVE TYPE QUESTIONS (24 MARKS):
i. This section has 05 questions.
ii. Marks allotted are mentioned against each question/part.
iii. There is no negative marking.
iv. Do as per the instructions given.
7. SECTION B – SUBJECTIVE TYPE QUESTIONS (26 MARKS):
i. This section has 16 questions.
ii. A candidate has to do 10 questions.
iii. Do as per the instructions given.
iv. Marks allotted are mentioned against each question/part.
Page 2 of 9
SECTION A: OBJECTIVE TYPE QUESTIONS
i. Pranjali gets up at 5 am and goes to her badminton classes. Then she comes home 1
and finishes her homework before going to school. She does this all by herself. No
one tells her to do it. This is an example of
(a) Self-motivation
(b) External motivation
(c) Both self and external motivation
(d) Not any specific type of motivation
iii. What is the term used when you quickly click the left mouse button twice? 1
(a) Hover
(b) Drag and drop
(c) Double clicking
(d) Moving
iv. Ravi learnt that if a laptop gets overheated, the internal parts get damaged. What 1
happens if he leaves his device plugged in even after it is charged 100%?
(a) It can break
(b) It can stop functioning
(c) It can overheat
(d) Data can get corrupt
v. Srishti is a young woman who makes earrings. She buys jute from a farmer and 1
makes earrings from that. She sees that most women in her village do not work. So,
she hires two women to help her. As her orders increase, she hires three more
women to work for her. How was she helping her village grow?
(a) By selling earrings to women without a job
(b) By purchasing earrings from the local market
(c) By buying jute from the local farmer and by providing jobs to local women
(d) By attracting the women in her village with her creative earrings
vi. Mary has two people who work for her. Every day, she spends one hour with them 1
to learn about what they’ve done that day.
(a) Creates a new product
(b) Divides income
(c) Manages the business
(d) Takes risks
Page 3 of 9
Q. 2 Answer any 5 out of the given 6 questions (1 x 5 = 5 marks)
ii. “This type of intelligence measure’s one’s awareness of the natural world 1
around them and their sensitivities to any changes that occur. It allows us to
identify the variation among two different species and understand how they are
related”.
Identify the type of intelligence described in the above sentence.
iv. Search engines not only predict what popular searches may apply to your query as 1
you start typing, but it looks at the whole picture and recognizes what you’re trying
to say rather than the exact search words. This is an example of
(a) Computer Vision
(b) Data Sciences
(c) Natural Language Processing
(d) Natural Language Understanding
v. When a user installs an app in the smartphone, it asks for access to gallery, contacts, 1
etc. After accepting this, it gives the user agreement which most users accept
without realizing the implications. What is the concern here?
(a) Data Privacy
(b) Unemployment
(c) AI bias
(d) No concern
i. __________ helps us to summarise all the key points into one single Template so 1
that in future, whenever there is a need to look back at the basis of the problem, we
can take a look at this and understand the key elements of it.
Page 4 of 9
ii. Divya was learning neural networks. She understood that there were three layers in 1
a neural network. Help her identify the layer that does processing in the neural
network.
(a) Output layer
(b) Hidden layer
(c) Input layer
(d) Data layer
iii. Smita is working on a project that involves over a lakh of records. Which of the 1
following should she use to make the best project?
(a) Traditional programming
(b) Manual processing
(c) IoT
(d) Neural networks
vi. 1
Page 5 of 9
Q. 4 Answer any 5 out of the given 6 questions (1 x 5 = 5 marks)
ii. Which of the following is the type of data used by NLP applications? 1
(a) Images
(b) Numerical data
(c) Graphical data
(d) Text and Speech
iii. Ayushi was learning about NLP. She wanted to know the term used for the whole 1
textual data from all the documents altogether. Help her in identifying the term used
for it.
v. A corpus contains 12 documents. How many document vectors will be there for 1
that corpus?
a. 12
b. 1
c. 24
d. 1/12
vi. Identify the type of chatbot with the information given below: 1
These bots work on pre-programmed instructions inside the application/machine
and are generally easy to develop. They are deployed in the customer care section
of various companies. Their job is to answer some basic queries that they are coded
for and connect them to human executives once they are unable to handle the
conversation.
ii. _____________ is used to record the result of comparison between the prediction 1
and reality. It is not an evaluation metric but a record which can help in evaluation.
iii. Raunak was learning the conditions that make up the confusion matrix. He came 1
across a scenario in which the machine that was supposed to predict an animal was
always predicting not an animal. What is this condition called?
(a) False Positive
(b) True Positive
(c) False Negative
(d) True Negative
Page 6 of 9
iv. Which two evaluation methods are used to calculate F1 Score? 1
(a) Precision and Accuracy
(b) Precision and Recall
(c) Accuracy and Recall
(d) Precision, F1 score
vi. Priya was confused with the terms used in the evaluation stage. Suggest her the term 1
used for the percentage of correct predictions out of all the observations.
(a) Accuracy
(b) Precision
(c) Recall
(d) F1 Score
Q. 7 Sameera is always punctual at school. She has a regular schedule that she follows 2
every day. She plans for study and play time in advance. Enlist the four steps Sameera
must have followed for effective time management.
Q. 9 What do entrepreneurs do when they run their business? Mention any two points. 2
Q. 10 Raj has a small convenience store in his locality. There are many other convenience 2
stores in the area. Yet, Raj’s store survives the competition and does well.
Which stage of an entrepreneur's career process can you relate this to? Explain.
Q. 12 If you do an image search for vacations on a popular search engine, the first few 2
searches mostly return the picture of beaches. What is the concern here? Explain.
Page 7 of 9
Q. 13 Suhana works for a company wherein she was assigned the task of developing a 2
project using AI project cycle. She knew that the first stage was scoping the problem.
Help her list the remaining stages that she must go through to develop the project.
Q. 14 What will be the results of conversion of the term, ‘happily’ in the process of 2
stemming and lemmatization? Which process takes longer time for execution?
Q. 16 People of a village are totally dependent on the farmers for their daily food items. 2
Farmers grow new seeds by checking the weather conditions every year. An AI
model is being deployed in the village which predicts the chances of heavy rain to
alert farmers which helps them in doing the farming at the right time. Which
evaluation parameter out of precision, recall and F1 Score is best to evaluate the
performance of this AI model? Explain.
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Q. 17 Ashwat is amazed to learn about his sister Ananya who is multi-talented and has 4
excelled in academics, music, dancing, sports and painting. He was quite curious
when Ananya told him that he too possessed all these intelligences like every human
being does, but only at different levels. He wondered which intelligence she was
talking about. Can you help Ashwat in learning about different types of intelligences
by naming and explaining any four types of intelligences?
Q. 18 Samarth attended a seminar on Artificial Intelligence and has now been asked to 4
write a report on his learnings from the seminar. Being a non-technical person, he
understood that the AI enabled machine uses data of different formats in many of
the daily based applications but failed to sync it with the right terminologies and
express the details. Help Samarth define Artificial Intelligence, list the three domains
of AI and the data that is used in these domains.
Q. 19 Neural networks are said to be modelled the way how neurons in the human brain 4
behave. A similar system is mimicked by the AI machine to perform certain tasks.
Explain how neural networks work in an AI model and mention any three features
of Neural Networks.
Page 8 of 9
Q. 21 Automated trade industry has developed an AI model which predicts the selling 4
and purchasing of automobiles. During testing, the AI model came up with the
following predictions.
Reality
Confusion Matrix
Yes No
Yes 60 25
Predicted
No 05 10
(i) How many total tests have been performed in the above scenario?
(ii) Calculate precision, recall and F1 Score.
Page 9 of 9
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE (SUBJECT CODE - 417)
MARKING SCHEME FOR CLASS X (SESSION 2022-2023)
Max. Time: 2 Hours Max. Marks: 50
General Instructions:
1. Please read the instructions carefully.
2. This Question Paper consists of 21 questions in two sections – Section A & Section B.
3. Section A has Objective type questions whereas Section B contains Subjective type questions.
4. Out of the given (5 + 16 =) 21 questions, a candidate has to answer (5 + 10 =) 15 questions in the
allotted (maximum) time of 2 hours.
5. All questions of a particular section must be attempted in the correct order.
6. SECTION A - OBJECTIVE TYPE QUESTIONS (24 MARKS):
i. This section has 05 questions.
ii. There is no negative marking.
iii. Do as per the instructions given.
iv. Marks allotted are mentioned against each question/part.
7. SECTION B – SUBJECTIVE TYPE QUESTIONS (26 MARKS):
i. This section contains 16 questions.
ii. A candidate has to do 10 questions.
iii. Do as per the instructions given.
iv. Marks allotted are mentioned against each question/part.
1
Technology
Skills
v. (c) By buying jute from the local farmer Employability Unit 4 87 1
and by providing jobs to local women Skills Entrepreneurial
NCERT Skills
2
ii. Confusion Matrix Facilitator Unit 7 122 1
Handbook
iii. (c) False Negative Facilitator Unit 7 121 1
Handbook
iv. (b) Precision and Recall Facilitator Unit 7 127 1
Handbook
v. (d) The training accuracy and test Facilitator Unit 7 119 1
accuracy both are low Handbook
vi. (a) Accuracy Facilitator Unit 7 123 1
Handbook
3
Q. 9 I. Fulfill Customer Needs Employability Unit 4 86, 2
II. Use Local Materials Skills Entrepre- 87
III. Help Society NCERT neurial
IV. Create Jobs Skills
V. Sharing of Wealth
VI. Lower Price of Products
(1 mark for each correct point, 1*2=2)
4
Q. 13 Steps of AI project life cycle: Facilitator Unit 2 29 2
1. Data Acquisition Handbook
2. Data Exploration
3. Modelling
4. Evaluation
(½ mark for mentioning each stage,
½ *4=2)
Q. 14 Stemming Lemmatization Facilitator Unit 6 110, 2
happily happi happy Handbook 111
Process that takes longer time for
execution is lemmatization
(½ marks each for identifying the correct
stem and lemma; 1 mark for identifying
the correct process)
Q. 15 Bag of words gives us two things: Facilitator Unit 6 112 2
1. A vocabulary of words for the corpus Handbook
2. The frequency of these words
(number of times it has occurred in the
whole corpus)
(1 mark for each point)
Q. 16 Let us take each of the factor into Facilitator Unit 7 126, 2
consideration at once, Handbook 127
If precision is considered, FN cases will not
be taken into account, so it will be of great
loss as if the machine will predict there will
be no heavy rain, but if the rain occurred, it
will be a big monetary loss due to damage to
crops.
If only recall is considered, then FP cases will
not be taken into account. This situation will
also cause a big amount of loss, as all people
of the village are dependent on farmers for
food, and if the model predicts there will be
heavy rain and the farmers may not grow
crops, it will affect the basic needs of the
people.
Hence F1 Score is the best suited parameter
to test this AI model, which is the balance
between Precision and Recall.
(1 mark for identifying the term F1 score; 1
mark for relevant explanation)
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Q. 17 All humans possess 9 types of Facilitator Unit 1 11 4
intelligence but at different levels. They Handbook
are:
1. Mathematical Logical Reasoning:
ability to regulate, measure, and
understand numerical symbols,
abstraction and logic.
2. Linguistic Intelligence: Language
processing skills both in terms of
5
understanding or implementation in
writing or verbally.
3. Spatial Visual Intelligence : ability to
perceive the visual world and the
relationship of one object to another.
4. Kinesthetic Intelligence : ability that is
related to how a person uses his limbs in
a skilled manner.
5. Musical Intelligence : ability to
recognize and create sounds, rhythms,
and sound patterns.
6. Intrapersonal Intelligence : Describes
how high the level of self-awareness
someone has is. Starting from realizing
weakness, strength, to his own feelings.
7. Existential Intelligence : An additional
category of intelligence relating to
religious and spiritual awareness.
8. Naturalist Intelligence : An additional
category of intelligence relating to the
ability to process information on the
environment around us.
9. Interpersonal intelligence : ability to
communicate with others by
understanding other people's feelings &
influence of the person.
(½ mark for the naming the intelligence;
½ mark for the explanation of the same;
(½ + ½) * 4 = 4)
Q. 18 Artificial Intelligence (AI) refers to any Facilitator Unit 1 21 4
technique that enables computers to Handbook
mimic human intelligence i.e., make
decisions, predict the future, learn and
improve on its own.
With respect to the type of data fed in
the AI model, AI models can be broadly
categorised into three domains:
1. Data sciences
2. Computer vision
3. Natural Language Processing
Data Science takes input in the form of
numeric and alphanumeric data.
Computer Vision takes input in the form
of images and videos.
Natural Language Processing takes input
in the form of text and speech.
(1 mark for definition of AI; ½ mark each
for the names of the domains; ½ mark
each for the type of data input to
domains)
6
Q. 19 Neural networks are loosely modelled Facilitator Unit 2 40, 4
after how neurons in the human brain Handbook 41
behave.
The features of a neural network are :
1. They are able to extract data
features automatically without
needing the input of the
programmer.
2. A neural network is essentially a
system of organizing machine
learning algorithms to perform
certain tasks.
3. It is a fast and efficient way to
solve problems for which the
dataset is very large, such as in
images.
(1 mark for how neural networks are
modelled; 1 mark each for relevant
feature of neural network)
Q. 20 Facilitator Unit 6 108 - 4
1. Tokenisation Handbook 111
Akash, and, Ajay, are, best, friends
Akash, likes, to, play, football, but,
Ajay, prefers, to, play, online, games
2. Removal of stopwords
Akash, Ajay, best, friends
Akash, likes, play, football, Ajay,
prefers, play, online, games
3. converting text to a common case
akash, ajay, best, friends
akash, likes, play, football, ajay,
prefers, play, online, games
4. Stemming/Lemmatisation
akash, ajay, best, friend
akash, like, play, football, ajay, prefer,
play, online, game
(1 mark for each step; 1*4=4)
Q. 21 (i) TP=60, TN=10, FP=25, FN=5 Facilitator Unit 7 124- 4
60+25+5+10=100 total cases have been Handbook 127
performed
7
Recall=TP/(TP+FN)
=60/(60+5)
=60/65
=0.92
F1 Score=2*Precision*Recall/
(Precision+Recall)
=2*0.7*0.92/(0.7+0.92)
=0.79
8
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE (SUBJECT CODE - 417)
Blue-print for Sample Question Paper for Class X (Session 2023-2024)
Max. Time: 2 Hours Max. Marks: 50
PART A - EMPLOYABILITY SKILLS (10 MARKS):
OBJECTIVE TYPE SHORT ANSWER
UNIT QUESTIONS TYPE QUESTIONS TOTAL
NAME OF THE UNIT
NO. QUESTIONS
1 MARK EACH 2 MARKS EACH
2 Self-Management Skills - II 2 1 3
3 ICT Skills - II 1 1 2
4 Entrepreneurial Skills - II 1 1 2
5 Green Skills - II 1 1 2
TOTAL QUESTIONS 6 5 11
6 Natural Language 5 1 1 7
Processing
7 Evaluation 5 1 1 7
TOTAL QUESTIONS 24 6 5 35
General Instructions:
1. Please read the instructions carefully.
2. This Question Paper consists of 21 questions in two sections: Section A & Section B.
3. Section A has Objective type questions whereas Section B contains Subjective type questions.
4. Out of the given (5 + 16 =) 21 questions, a candidate has to answer (5 + 10 =) 15 questions in the
allotted (maximum) time of 2 hours.
5. All questions of a particular section must be attempted in the correct order.
6. SECTION A - OBJECTIVE TYPE QUESTIONS (24 MARKS):
i. This section has 05 questions.
ii. Marks allotted are mentioned against each question/part.
iii. There is no negative marking.
iv. Do as per the instructions given.
7. SECTION B – SUBJECTIVE TYPE QUESTIONS (26 MARKS):
i. This section has 16 questions.
ii. A candidate has to do 10 questions.
iii. Do as per the instructions given.
iv. Marks allotted are mentioned against each question/part.
i. “M D Gulati started with a small shop with his focus, dedication and clear ideas, MDH 1
became one of the most popular brands in India besides having a good reputation all
over the world”.
Which self-management skill is clearly visible in the given statement?
ii. When you bring the mouse over a file in File Explorer, it will show the details of that file. 1
This is known as
(a) Drag and drop
(b) Double click
(c) Hover
(d) Single click
iv. _______ the work is all about identifying and noting how we spent our time, and 1
analysing how to spend our time effectively.
(a) Organising
(b) Prioritising
(c) Controlling
(d) Tracking
v. Remya traveled to Sweden from India to pursue her higher education. But she doesn't 1
know how to speak Swedish (language of Sweden). Because of this, she was unable to
find a part time job. This is an example of _____________
(a) Interpersonal barrier
(b) Physical barrier
(c) Organisational barrier
(d) Linguistic barrier
vi. “Efforts are made to increase the solar power generation so that our electricity needs are met 1
and at the same time we do not pollute the environment or use up natural resources”.
Which SDG can you relate this statement to?
(a) Life on land
(b) Clean water and sanitation
(c) Affordable and clean energy
(d) Reduced inequalities
i. Assertion (A)– One can be a good singer while the other can be a great athlete. 1
Reason(R) – Humans possess different types of intelligences but at different levels.
(a) Both A and R are correct and R is the correct explanation of A
(b) Both A and R are correct but R is not the correct explanation of A
(c) A is correct but R is not correct
(d) A is not correct but R is correct.
ii. The Indian Government banned a few apps stating – “servers in the hostile nation are 1
receiving and using the acquired data improperly”.
Which terminology suits best for this action?
(a) AI Ethics
(b) Data Privacy
(c) AI Bias
(d) AI Access
vi. A corpus contains 4 documents in which the word ‘diet’ was appearing once in 1
document1. Identify the term in which we can categorise the word ‘diet’.
(a) Stop word
(b) Rare word
(c) Frequent word
(d) Removable word
iv. ____ is the process of finding instances of real-world objects in images or videos. 1
(a) Instance segmentation
(b) Object detection
(c) Classification
(d) Image segmentation
i. Srishti learnt about AI terminologies but was not able to recollect the term that is used 1
to refer to machines that perform tasks with vast amounts of data using neural
networks. Help her with the correct term.
v. Which feature of NLP helps in understanding the emotions of the people mentioned 1
with the feedback?
(a) Virtual Assistants
(b) Sentiment Analysis
(c) Text classification
(d) Automatic Summarization
vi. Sarthak made a face mask detector system for which he had collected the dataset and 1
used all the dataset to train the model. Then, he used the same data to evaluate the
model which resulted in the correct answer all the time but was not able to perform
with unknown dataset.
Name the concept.
i. Aditi, a student of class XII developed a chatbot that clarifies the doubts of Economics 1
students. She trained the software with lots of data sets catering to all difficulty levels.
If any student would type or ask questions related to Economics, the software would
give an instant reply. Identify the domain of AI in the given scenario.
(a) Computer Vision
(b) Data Science
(c) Natural Language Processing
(d) None of these
ii. Which evaluation parameter takes into consideration all the correct predictions? 1
iii. ______ means a picture element which is the smallest unit of information that makes 1
up a picture.
(a) Vision
(b) Pics
(c) Pixel
(d) Piskel
vi. Which one of the following scenario result in a high false positive cost? 1
(a) viral outbreak
(b) forest fire
(c) flood
(d) spam filter
Q. 8 “The Trojan Horse was a wooden horse said to have been used by the Greeks during the 2
Trojan War to enter the city of Troy and win the war”.
What does Trojan horse mean in computer terminology?
Q. 12 Sirisha and Divisha want to make a model which will organize the unlabeled input data 2
into groups based on features. Which learning model should they use and why?
Q. 13 Ajay wants to access data from various sources. Suggest him any two points that he 2
needs to keep in mind while accessing data from any data source.
Q. 15 Identify any two stop words which should not be removed from the given sentence and 2
why?
Get help and support whether you're shopping now or need help with a past purchase.
Contact us at [email protected] or on our website www.pwershel.com
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Q. 17 Your grandmother watches you use AI applications. She wants to understand more 4
about it. Help her understand the term artificial intelligence by giving the right definition
and explain to her with an example how machines become artificially intelligent.
Q. 18 Akhil wants to learn how to scope the problem for an AI Project. Explain him the 4
following:
(a) 4W Problem Canvas
(b) Problem Statement Template
Q. 19 Identify and explain the types of the learning-based approaches in the figures given 4
below.
Figure 1
Figure 2
Q. 20 We, human beings, can read, write and understand many languages. But computers can 4
understand only machine language. Do you think we might face any challenges if we try
to teach computers how to understand and interact in human languages? Explain.
Q. 21 An AI model made the following sales prediction for a new mobile phone which they 4
have recently launched:
Reality
Confusion Matrix Yes No
Yes 50 40
Prediction
No 12 10
(i) Identify the total number of wrong predictions made by the model.
(ii) Calculate precision, recall and F1 Score.
No 290 47
(½ marks each for mapping the values in the
correct section, ½ *4=2 marks)
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Q. 17 When a machine possesses the ability to mimic Facilitator Unit 1 14, 15 4
human traits, i.e., make decisions, predict the Handbook
future, learn and improve on its own, it is said
to have artificial intelligence. In other words,
you can say that a machine is artificially
intelligent when it can accomplish tasks by
itself - collect data, understand it, analyse it,
learn from it, and improve it.
Q. 18 The 4Ws Problem canvas helps in identifying the Facilitator Unit 2 31-34 4
key elements related to the problem. The 4Ws Handbook
are Who, What, Where and Why
● The “Who” block helps in analysing the
people getting affected directly or
indirectly due to the problem.
● The “What” block helps us to determine
the nature of the problem.
● The “Where” block helps us to look into
the situation in which the problem
arises, the context of it, and the
locations where it is prominent.
● The “Why” block suggests to us the
benefits which the stakeholders would
get from the solution and how it will
benefit them as well as the society
Q. 20 Yes, we might face any challenges if we try to Facilitator Unit 6 106, 107 4
teach computers how to understand and Handbook
interact in human languages.
(ii) Precision=TP/(TP+FP)
=50/(50+40)
50/90
=0.55
Recall=TP/(TP+FN)
=50/(50+12)
=50/62
=.81
F1 Score = 2*Precision*Recall/(Precision+Recall)
=2*0.55*.81/(.55+.81)
=.891/1.36
=0.65
Page No. 1 of 8
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE (SUBJECT CODE: 417)
Sample Question Paper for Class X (Session 2020-2021)
General Instructions:
1. Please read the instructions carefully.
2. This Question Paper consists of 21 questions in two sections: Section A & Section B.
3. Section A has Objective type questions whereas Section B contains Subjective type
questions.
Page No. 2 of 8
SECTION A: OBJECTIVE TYPE QUESTIONS
Q. 1 Answer any 4 out of the given 6 questions on Employability Skills
(1 x 4 = 4 marks)
i ___________________ is the final component in the process of 1
communication as it defines the response given by the receiver to the sender.
a) Response
b) Request
c) Feedback
d) Notice
iii Having conscious knowledge of your own self, capabilities, feelings and one’s 1
own character is called ____________.
a) Self-awareness
b) Self-motivation
c) Self-control
d) Independence
iii _______is a domain of AI that depicts the capability of a machine to get and 1
analyse visual information and afterwards predict some decisions about it.
a) NLP
b) Data Sciences
c) Augmented Reality
d) Computer Vision
v Recall-Evaluation method is 1
a) defined as the fraction of positive cases that are correctly
identified.
b) defined as the percentage of true positive cases versus all the cases
where the prediction is true.
c) defined as the percentage of correct predictions out of all the
observations.
d) comparison between the prediction and reality
Page No. 5 of 8
v Which of the following statements is true for the term Evaluation? 1
a) Helps in classifying the type and genre of a document.
b) It helps in predicting the topic for a corpus.
c) Helps in understanding the reliability of any AI model
d) Process to extract the important information out of a corpus.
ii Prediction and Reality can be easily mapped together with the help of : 1
a) Prediction
b) Reality
c) Accuracy
d) Confusion Matrix
Page No. 6 of 8
SECTION B: SUBJECTIVE TYPE QUESTIONS
Answer any 3 out of the given 5 questions on Employability Skills (2 x 3 = 6 marks)
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Page No. 7 of 8
Q. 18 Create a 4W Project Canvas for the following: 4
As more and more new technologies get into play, risks will get more
concentrated into a common network. Cybersecurity becomes extremely
complicated in such scenarios and goes beyond the control of firewalls. It
will not be able to detect unusual activity and patterns including the
movement of data.
Think how AI algorithms can scrape through vast amounts of logs to identify
susceptible user behaviour. Use an AI project cycle to clearly identify the
scope, how you will collect data, model and evaluation parameters.
Q. 21 Imagine that you have come up with an AI based prediction model which 4
has been deployed on the roads to check traffic jams. Now, the objective
of the model is to predict whether there will be a traffic jam or not. Now,
to understand the efficiency of this model, we need to check if the
predictions which it makes are correct or not. Thus, there exist two
conditions which we need to ponder upon: Prediction and Reality.
Traffic Jams have become a common part of our lives nowadays. Living in
an urban area means you have to face traffic each and every time you get
out on the road. Mostly, school students opt for buses to go to school. Many
times, the bus gets late due to such jams and the students are not able to
reach their school on time.
Considering all the possible situations make a Confusion Matrix for the
above situation.
Page No. 8 of 8
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE (SUBJECT CODE: 417)
Marking Scheme for the Sample Question Paper for Class X
(Session 2020-2021)
General Instructions:
1. Please read the instructions carefully.
2. This Question Paper consists of 21 questions in two sections: Section A & Section B.
3. Section A has Objective type questions whereas Section B contains Subjective type
questions.
Page No. 1 of 11
SECTION A: OBJECTIVE TYPE QUESTIONS
Q. 1 Answer any 4 out of the given 6 questions on Employability Skills
(1 x 4 = 4 marks)
i ___________________ is the final component in the process of 1
communication as it defines the response given by the receiver to the sender.
a) Response
b) Request
c) Feedback
d) Notice
Ans: Feedback
ii ___________________refers to focusing human efforts for maintaining a 1
healthy body and mind capable of better withstanding stressful situations
a) Mental Health
b) Emotional Health
c) Self-Management
d) Stress Management
Ans: a) Self-awareness
iv A ______________is a software program that attaches itself to other 1
programs and alters their behavior.
a) Operating system
b) Firewall
c) Antivirus
d) Computer Virus
Page No. 2 of 11
Q. 2 Answer any 5 out of the given 6 questions (1 x 5 = 5 marks)
i A _______________is divided into multiple layers and each layer is further 1
divided into several blocks called nodes.
a) Neural Networks
b) Convolutional Neural Network (CNN)
c) Machine learning algorithm
d) Hidden Layers
Page No. 3 of 11
Q. 3 Answer any 5 out of the given 6 questions (1 x 5 = 5 marks)
i Expand CBT_______________ 1
a) Computer Behaved Training
b) Cognitive Behavioural Therapy
c) Consolidated Batch of trainers
d) Combined Basic Training
Ans: c)In NLP, modelling requires data pre-processing only after which the
data is fed to the machine.
iv What will be the outcome, if the Prediction is “Yes” and it matches with the 1
Reality? What will be the outcome, if the Prediction is “Yes” and it does not
match the Reality?
a) True Positive, True Negative
b) True Negative, False Negative
c) True Negative, False Positive
d) True Positive, False Positive
Ans: a) defined as the fraction of positive cases that are correctly identified.
vi Give 2 examples of Supervised Learning models. 1
a) Classification and Regression
b) Clustering and Dimensionality Reduction
c) Rule Based and Learning Based
d) Classification and Clustering
Page No. 4 of 11
Q. 4 Answer any 5 out of the given 6 questions (1 x 5 = 5 marks)
i Define Machine Learning. 1
a) Machine learning is the study of computer algorithms that improve
automatically through experience.
b) Refers to any technique that enables computers to mimic human
intelligence.
c) Machine learning refers to computer systems (both machines and
software) enables machines to perform tasks for which it is
programmed.
d) Machine Learning refers to projects that allow the machine to work on
a particular logic.
Ans: c) The prediction is the output which is given by the machine and the
reality is the real scenario in which the prediction has been made.
iv The term Sentence Segmentation is 1
a) the whole corpus is divided into sentences
b) to undergo several steps to normalise the text to a lower level
c) in which each sentence is then further divided into tokens
d) the process in which the affixes of words are removed
Page No. 5 of 11
Q. 5 Answer any 5 out of the given 6 questions (1 x 5 = 5 marks)
i ________________________ refers to the AI modelling where the machine 1
learns by itself.
a) Learning Based
b) Rule Based
c) Machine Learning
d) Data Sciences
ii Prediction and Reality can be easily mapped together with the help of : 1
a) Prediction
b) Reality
c) Accuracy
d) Confusion Matrix
Page No. 6 of 11
SECTION B: SUBJECTIVE TYPE QUESTIONS
Answer any 3 out of the given 5 questions on Employability Skills (2 x 3 = 6 marks)
Part A: Employability Skills
Q. 6 Name the four main categories of Communication Styles. 2
Ans:
Verbal, Non - Verbal, Written and Visual
Q. 7 List any 4 activities that help in stress management. 2
Ans:
(Any 4 out of the following or any other appropriate activity)
Positive Thinking,
Physical Exercise,
Yoga,
Meditation,
Nature Walks,
Vacations,
Laughing aloud,
Listening to good music
Q. 8 What are antivirus? Name any 2 antiviruses. 2
Ans:
Antivirus software is a program designed to detect and remove
malicious programs from the computer.
Examples: (Any 4 out of the following or any other correct name of
the antivirus):
Microsoft Security essentials, Microsoft Defender, McAfee Virus Scan,
Norton AntiVirus, Quick Heal.
Ans:
(Any 4 out of the following)
Hard working,
Optimistic,
Independent,
Energetic,
Self-confident,
Perseverant
Q. 10 Name any 4 man-made disruptions that cause ecological imbalance. 2
Ans:
(Any 4 out of the following)
Deforestation,
Degradation of Land and Soil Erosion,
Overexploitation of Resources,
Industrial and Atmospheric Pollution,
Faulty Mining Practices,
E waste generation
Page No. 7 of 11
Answer any 4 out of the given 6 questions in 20 – 30 words each (2 x 4 = 8 marks)
Q. 11 Give 2 points of difference between a script-bot and a smart-bot 2
Ans:
Script-bot Smart-bot
Script bots are easy to make Smart-bots are flexible and powerful
Script bots work around a script Smart bots work on bigger databases
with instructions of program and other resources directly
stored inside them
Mostly are Free and are Easy to Smart bots learn on its own with more
Integrate data
Ans:
Machine Learning: It is a subset of Artificial Intelligence which enables
machines to improve at tasks with experience (data). The intention of
Machine Learning is to enable machines to learn by themselves using the
provided data and make accurate Predictions/ Decisions.
Ans:
Classification Regression
Page No. 8 of 11
Q. 14 Explain the term Text Normalisation in Data Processing. 2
Ans:
The first step in Data processing is Text Normalisation. Text Normalisation
helps in cleaning up the textual data in such a way that it comes down to a
level where its complexity is lower than the actual data. In this we undergo
several steps to normalise the text to a lower level. We work on text from
multiple documents and the term used for the whole textual data from all
the documents altogether is known as corpus.
Precision * Recall
F1Score = 2 *
Precision + Recall
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Q. 17 Categorize the following under Data Sciences, Machine Learning, Computer 4
Vision and NLP.
Ans:
Alexa, Siri-NLP, Facial Recognition - Computer Vision
Facelock - Computer Vision
Price comparison websites - Data Sciences
Chatbots - NLP
Faceapps -NLP
Snapchat Filters - Machine Learning
Page No. 9 of 11
Q. 18 Create a 4W Project Canvas for the following. 4
As more and more new technologies get into play, risks will get more
concentrated into a common network. Cybersecurity becomes extremely
complicated in such scenarios and goes beyond the control of firewalls. It
will not be able to detect unusual activity and patterns including the
movement of data.
Think how AI algorithms can scrape through vast amounts of logs to identify
susceptible user behaviour. Use an AI project cycle to clearly identify the
scope, how you will collect data, model and evaluation parameters.
Ans:
Ans:
Stemming is the process in which the affixes of words are removed and the
words are converted to their base form.
In lemmatization, the word we get after affix removal (also known as lemma)
is a meaningful one. Lemmatization makes sure that lemma is a word with
meaning and hence it takes a longer time to execute than stemming.
The difference between the stemming and lemmatization can be depicted
by the following example:
Page No. 10 of 11
Q. 20 Write the applications of NLP (Natural Language Processing). (Any four) 4
Ans:
1. Automatic Summarization: Automatic summarization is relevant not only
for summarizing the meaning of documents and information, but also to
understand the emotional meanings within the information, such as in
collecting data from social media.
2. Sentiment Analysis: The goal of sentiment analysis is to identify
sentiment among several posts or even in the same post where emotion
is not always explicitly expressed.
3. Text classification : Text classification makes it possible to assign
predefined categories to a document and organize it to help you find the
information you need or simplify some activities.
4. Virtual Assistants: With the help of speech recognition, these assistants
can not only detect our speech but can also make sense out of it.
Q. 21 Imagine that you have come up with an AI based prediction model which has 4
been deployed on the roads to check traffic jams. Now, the objective of the
model is to predict whether there will be a traffic jam or not. Now, to
understand the efficiency of this model, we need to check if the predictions
which it makes are correct or not. Thus, there exist two conditions which
we need to ponder upon: Prediction and Reality.
Traffic Jams have become a common part of our lives nowadays. Living in
an urban area means you have to face traffic each and every time you get
out on the road. Mostly, school students opt for buses to go to school. Many
times, the bus gets late due to such jams and the students are not able to
reach their school on time.
Considering all the possible situations make a Confusion Matrix for the above
situation.
Ans:
Case 1: Is there a traffic Jam?
Prediction: Yes Reality: Yes
True Positive
Case 2: Is there a traffic Jam?
Prediction: No Reality: No
True Negative
Case 3: Is there a traffic Jam?
Prediction: Yes Reality: No
False Positive
Case 4: Is there a traffic Jam?
Prediction: No Reality: Yes
False Negative
Reality
Confusion Matrix
Yes No
Yes True Positive False Positive
Prediction
No False Negative True Negative
Page No. 11 of 11
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE (SUBJECT CODE 417)
CLASS X (SESSION 2021-2022)
BLUE-PRINT FOR SAMPLE QUESTION PAPER FOR TERM – II
Max. Time Allowed: 1 Hour (60 min) Max. Marks: 25
PART A - EMPLOYABILITY SKILLS (05 MARKS):
4 Entrepreneurial Skills-II 2 1 - 3
5 Green Skills-II 2 1 - 3
TOTAL QUESTIONS 4 2 - 06
NO. OF QUESTIONS TO BE
Any 3 Any 1 - 04
ANSWERED
TOTAL MARKS 3 x 1 = 3 Marks 1 x 2 = 2 Marks - 05 Marks
7 Evaluation
2 2 1 5
TOTAL QUESTIONS 06 06 03 15
NO. OF QUESTIONS TO BE
04 04 02 10
ANSWERED
4 x 1= 4x2= 2x4=
TOTAL MARKS 20 Marks
04 Marks 08 Marks 08 Marks
417-X-SQP-Term II (2021-2022) 1
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE (SUBJECT CODE 417)
CLASS X (SESSION 2021-2022)
SAMPLE QUESTION PAPER FOR TERM - II
Max. Time Allowed: 1 Hour (60 min) Max. Marks: 25
General Instructions:
1. Please read the instructions carefully
2. This Question Paper is divided into 03 sections, viz., Section A, Section B and Section C.
3. Section A is of 05 marks and has 06 questions on Employability Skills.
a) Questions numbers 1 to 4 are one mark questions. Attempt any three questions.
b) Questions numbers 5 and 6 are two marks questions. Attempt any one question.
4. Section B is of 12 marks and has 12 questions on Subject Specific Skills.
a) Questions numbers 7 to 12 are one mark questions. Attempt any four questions.
b) Questions numbers 13 to 18 are two marks questions. Attempt any four questions.
5. Section C is of 08 marks and has 03 competency-based questions.
a) Questions numbers 19 to 21 are four marks questions. Attempt any two questions.
6. Do as per the instructions given in the respective sections.
7. Marks allotted are mentioned against each section/question.
SECTION A (3 + 2 = 5 marks)
Answer any 3 questions out of the given 4 questions. Each question is of the mark. 1x3=3
Q.1 Write any two qualities for being a good entrepreneur. 1
Q.2 What is sustainable development? 1
Q.3 Entrepreneurship has a positive impact on society. Write down any two. 1
Q.4 How many sustainable development goals were formulated by the United Nations? 1
Answer any 1 question out of the given 2 questions. Each question is of mark. 2x1=2
“Entrepreneurs are born, not made.” Do you agree with this statement? Justify your
Q.5 2
answer.
Q.6 Enlist any 2 SDGs which are formulated to address the problems related to water? 2
SECTION B (4 + 8 = 12 marks)
Q.12 What should be the value of F1 score if the model needs to have 100% accuracy? 1
417-X-SQP-Term II (2021-2022) 2
Answer any 04 questions out of the given 06 questions 2x4=8
“Automatic summarization is used in NLP applications”. Is the given statement
Q.13 correct? Justify your answer with an example. 2
Give an example of a situation wherein false positive would have a high cost associated
Q.14 2
with it.
Q.15 Write any two applications of TFIDF 2
Q.16 Write down the steps to implement bag of words algorithm. 2
Q.17 What is a confusion matrix? What is it used for? 2
Explain from the given graph, how the value and occurrence of a word are related in a
corpus?
Q.18 2
SECTION C (2 x 4 = 8 marks)
(COMPETENCY-BASED QUESTIONS)
Answer any 02 questions out of the given 03 questions
Q.19 Through a step-by-step process, calculate TFIDF for the given corpus 4
Document 1: Johny Johny, Yes Papa,
Document 2: Eating sugar? No Papa
Document 3: Telling lies? No Papa
Document 4: Open your mouth, Ha! Ha! Ha!
Q.20 The world is competitive nowadays. People face competition in even the tiniest 4
tasks and are expected to give their best at every point in time. When people are
unable to meet these expectations, they get stressed and could even go into
depression. We get to hear a lot of cases where people are depressed due to
reasons like peer pressure, studies, family issues, relationships, etc. and they
eventually get into something that is bad for them as well as for others. So, to
overcome this, Cognitive Behavioural Therapy (CBT) is considered to be one of
the best methods to address stress as it is easy to implement on people and also
gives good results. This therapy includes understanding the behaviour and
mindset of a person in their normal life. With the help of CBT, therapists help
people overcome their stress and live a happy life.
For the situation given above,
1. Write the problem statement template
2. List any two sources from which data can be collected.
3. How do we explore the data?
417-X-SQP-Term II (2021-2022) 3
Q.21 Take a look at the confusion matrix: 4
The Confusion Reality
Matrix Yes No
417-X-SQP-Term II (2021-2022) 4
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE (SUBJECT CODE 417)
CLASS X (SESSION 2021-2022)
SAMPLE QUESTION PAPER FOR TERM - II
Max. Time Allowed: 1 Hour (60 min) Max. Marks: 25
General Instructions:
1. Please read the instructions carefully
2. This Question Paper is divided into 03 sections, viz., Section A, Section B and Section C.
3. Section A is of 05 marks and has 06 questions on Employability Skills.
a) Questions numbers 1 to 4 are one mark questions. Attempt any three questions.
b) Questions numbers 5 and 6 are two marks questions. Attempt any one question.
4. Section B is of 12 marks and has 12 questions on Subject Specific Skills.
a) Questions numbers 7 to 12 are one mark questions. Attempt any four questions.
b) Questions numbers 13 to 18 are two marks questions. Attempt any four questions.
5. Section C is of 08 marks and has 03 competency-based questions.
a) Questions numbers 19 to 21 are four marks questions. Attempt any two questions.
6. Do as per the instructions given in the respective sections.
7. Marks allotted are mentioned against each section/question.
SECTION A (3 + 2 = 5 marks)
Answer any 3 questions out of the given 4 questions. Each question is of the mark. 1x3=3
Write any two qualities for being a good entrepreneur.
Ans:
Any two of the following points-
• They are confident. They believe in themselves and their abilities.
• They keep trying new ideas in their business.
• They are patient.
Q.1 1
• They are creative and think differently about business ideas.
• They take responsibility for their actions.
• They make decisions after thinking about them.
• They work hard.
• They do not give up when they face a difficulty
(½ mark for each point; ½ x 2=1)
What is sustainable development?
Ans:
Sustainable development is the development that satisfies the needs of the present
Q.2 1
without compromising the capacity of future generations, guaranteeing the balance
between economic growth, care for the environment and social well-being.
(1 mark for correct answer/explanation)
Entrepreneurship has a positive impact on society. Write down any two.
Ans:
Q.3 1. Some of them work towards saving the environment. 1
2. Some of them give money to build schools and hospitals.
(½ mark for each point; ½ x 2=1)
How many sustainable development goals were formulated by the United
Nations?
Q.4 Ans: 1
There are 17 sustainable development goals formulated by the United Nations.
(1 mark for correct answer)
417-X-MS-Term II (2021-2022) 1
Answer any 1 question out of the given 2 questions. Each question is of mark. 2x1=2
“Entrepreneurs are born, not made.” Do you agree with this statement? Justify
your answer.
Ans:
No, this is a myth/misconception about entrepreneurship.
Q.5 2
Being an entrepreneur starts with a way of thinking. One must believe that anything
is possible and it shall be achieved. It starts with thinking of an idea that you want to
work on, making it different.
(1 mark for the option(NO);1 mark for correct explanation)
Enlist any 2 SDGs which are formulated to address the problems related to
water?
Ans:
Q.6 Clean water and sanitation 2
Life below water
Responsible consumption, and production
(any 2 SDG s related to water; 1 mark for each SDG)
SECTION B (4 + 8 = 12 marks)
417-X-MS-Term II (2021-2022) 2
Answer any 04 questions out of the given 06 questions 2x4=8
Give an example of a situation wherein false positive would have a high cost
associated with it.
Ans:
Let us consider a model that predicts that a mail is spam or not. If the model always
predicts that the mail is spam, people would not look at it and eventually might lose
Q.14 important information. Here False Positive condition (Predicting the mail as spam while 2
the mail is not spam) would have a high cost.
(2 marks for any correct example with explanation; 1 marks can be given if only
explanation is written without example)
417-X-MS-Term II (2021-2022) 3
Explain from the given graph, how the value and occurrence of a word are related
in a corpus?
Q.18 2
Ans:
As shown in the graph, occurrence and value of a word are inversely proportional. The
words which occur most (like stop words) have negligible value. As the occurrence of
words drops, the value of such words rises. These words are termed as rare or valuable
words. These words occur the least but add the most value to the corpus.
(complete explanation 2 marks)
SECTION C (2 x 4 = 8 marks)
(COMPETENCY-BASED QUESTIONS)
Answer any 02 questions out of the given 03 questions
Q.19 Through a step-by-step process, calculate TFIDF for the given corpus 4
Document 1: Johny Johny, Yes Papa,
Document 2: Eating sugar? No Papa
Document 3: Telling lies? No Papa
Document 4: Open your mouth, Ha! Ha! Ha!
Ans:
1. Create document vectors for the given documents (Term Frequency Table)
Johny Yes Papa Eating Sugar No Telling Lies Open your Mouth Ha
2 1 1 0 0 0 0 0 0 0 0 0
0 0 1 1 1 1 0 0 0 0 0 0
0 0 1 0 0 1 1 1 0 0 0 0
0 0 0 0 0 0 0 0 1 1 1 3
2. Record the occurrence of word in the document using term frequency table (Document
Frequency Table)
Johny Yes Papa Eating Sugar No Telling Lies Open your Mouth Ha
1 1 3 1 1 2 1 1 1 1 1 1
3. Draw the inverse document frequency table wherein, we need to put the document
frequency in the denominator while the total number of documents is the numerator.
Here, the total number of documents are 4, hence inverse document frequency becomes:
417-X-MS-Term II (2021-2022) 4
Johny Yes Papa Eating Sugar No Telling Lies Open your Mouth Ha
4/1 4/1 4/3 4/1 4/1 4/2 4/1 4/1 4/1 4/1 4/1 4/1
4. The formula of TFIDF for any word W becomes: TFIDF(W) = TF(W) * log (IDF(W))
Johny Yes Papa Eating Sugar No Telling Lies Open your Mouth Ha
2*log( 1*log( 1*log(4 0*log(4/1 0*log(4/ 0*lo 0*log(4/ 0*log( 0*log(4/ 0*log(4/ 0*log(4/ 0*log
4/1) 4/1) /3) ) 1 g(4/2 1 4/1) 1) 1) 1) (4/1)
)
0*log( 0*log( 1*log(4 1*log(4/1 1*log(4/ 1*lo 0*log(4/ 0*log( 0*log(4/ 0*log(4/ 0*log(4/ 0*log
4/1) 4/1) /3) ) 1) g(4/2 1) 4/1) 1) 1) 1) (4/1)
)
0*log( 0*log( 1*log(4 0*log(4/1 0*log(4/ 1*lo 1*log(4/ 1*log( 0*log(4/ 0*log(4/ 0*log(4/ 0*log
4/1) 4/1) /3) ) 1) g(4/2 1) 4/1) 1) 1) 1) (4/1)
)
0*log( 0*log( 0*log(4 0*log(4/1 0*log(4/ 0*lo 0*log(4/ 0*log( 1*log(4/ 1*log(4/ 1*log(4/ 3*log
4/1) 4/1) /3) ) 1) g(4/2 1) 4/1) 1) 1) 1) (4/1)
)
have a they are not being able to share their feelings What?
problem that
417-X-MS-Term II (2021-2022) 5
Q.21 Take a look at the confusion matrix: 4
The Confusion Reality
Matrix Yes No
𝑇𝑃
Precision = ×100%
𝑇𝑃+𝐹𝑃
Next, we calculate recall as the fraction of positive cases that are correctly identified.
𝑇𝑟𝑢𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒
Recall =
𝑇𝑟𝑢𝑒 𝑃𝑜𝑠𝑖𝑡𝑖𝑣𝑒+𝐹𝑎𝑙𝑠𝑒 𝑁𝑒𝑔𝑎𝑡𝑖𝑣𝑒
𝑇𝑃
Recall =
𝑇𝑃+𝐹𝑁
Finally, we calculate the F1 score as the measure of balance between precision and
recall.
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 ×𝑅𝑒𝑐𝑎𝑙𝑙
F1 score = 2 ×
𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 +𝑅𝑒𝑐𝑎𝑙𝑙
(1 mark for precision formula; 1 mark for recall formula; 1 mark for F1 score formula;1
mark for explanation)
417-X-MS-Term II (2021-2022) 6
CBSE | DEPARTMENT OF SKILL EDUCATION
ARTIFICIAL INTELLIGENCE (SUBJECT CODE - 417)
Blue-print for Sample Question Paper for Class X (Session 2023-2024)
Max. Time: 2 Hours Max. Marks: 50
PART A - EMPLOYABILITY SKILLS (10 MARKS):
OBJECTIVE TYPE SHORT ANSWER
UNIT QUESTIONS TYPE QUESTIONS TOTAL
NAME OF THE UNIT
NO. QUESTIONS
1 MARK EACH 2 MARKS EACH
2 Self-Management Skills - II 2 1 3
3 ICT Skills - II 1 1 2
4 Entrepreneurial Skills - II 1 1 2
5 Green Skills - II 1 1 2
TOTAL QUESTIONS 6 5 11
6 Natural Language 5 1 1 7
Processing
7 Evaluation 5 1 1 7
TOTAL QUESTIONS 24 6 5 35
General Instructions:
1. Please read the instructions carefully.
2. This Question Paper consists of 21 questions in two sections: Section A & Section B.
3. Section A has Objective type questions whereas Section B contains Subjective type questions.
4. Out of the given (5 + 16 =) 21 questions, a candidate has to answer (5 + 10 =) 15 questions in the
allotted (maximum) time of 2 hours.
5. All questions of a particular section must be attempted in the correct order.
6. SECTION A - OBJECTIVE TYPE QUESTIONS (24 MARKS):
i. This section has 05 questions.
ii. Marks allotted are mentioned against each question/part.
iii. There is no negative marking.
iv. Do as per the instructions given.
7. SECTION B – SUBJECTIVE TYPE QUESTIONS (26 MARKS):
i. This section has 16 questions.
ii. A candidate has to do 10 questions.
iii. Do as per the instructions given.
iv. Marks allotted are mentioned against each question/part.
i. “M D Gulati started with a small shop with his focus, dedication and clear ideas, MDH 1
became one of the most popular brands in India besides having a good reputation all
over the world”.
Which self-management skill is clearly visible in the given statement?
ii. When you bring the mouse over a file in File Explorer, it will show the details of that file. 1
This is known as
(a) Drag and drop
(b) Double click
(c) Hover
(d) Single click
iv. _______ the work is all about identifying and noting how we spent our time, and 1
analysing how to spend our time effectively.
(a) Organising
(b) Prioritising
(c) Controlling
(d) Tracking
v. Remya traveled to Sweden from India to pursue her higher education. But she doesn't 1
know how to speak Swedish (language of Sweden). Because of this, she was unable to
find a part time job. This is an example of _____________
(a) Interpersonal barrier
(b) Physical barrier
(c) Organisational barrier
(d) Linguistic barrier
vi. “Efforts are made to increase the solar power generation so that our electricity needs are met 1
and at the same time we do not pollute the environment or use up natural resources”.
Which SDG can you relate this statement to?
(a) Life on land
(b) Clean water and sanitation
(c) Affordable and clean energy
(d) Reduced inequalities
i. Assertion (A)– One can be a good singer while the other can be a great athlete. 1
Reason(R) – Humans possess different types of intelligences but at different levels.
(a) Both A and R are correct and R is the correct explanation of A
(b) Both A and R are correct but R is not the correct explanation of A
(c) A is correct but R is not correct
(d) A is not correct but R is correct.
ii. The Indian Government banned a few apps stating – “servers in the hostile nation are 1
receiving and using the acquired data improperly”.
Which terminology suits best for this action?
(a) AI Ethics
(b) Data Privacy
(c) AI Bias
(d) AI Access
vi. A corpus contains 4 documents in which the word ‘diet’ was appearing once in 1
document1. Identify the term in which we can categorise the word ‘diet’.
(a) Stop word
(b) Rare word
(c) Frequent word
(d) Removable word
iv. ____ is the process of finding instances of real-world objects in images or videos. 1
(a) Instance segmentation
(b) Object detection
(c) Classification
(d) Image segmentation
i. Srishti learnt about AI terminologies but was not able to recollect the term that is used 1
to refer to machines that perform tasks with vast amounts of data using neural
networks. Help her with the correct term.
v. Which feature of NLP helps in understanding the emotions of the people mentioned 1
with the feedback?
(a) Virtual Assistants
(b) Sentiment Analysis
(c) Text classification
(d) Automatic Summarization
vi. Sarthak made a face mask detector system for which he had collected the dataset and 1
used all the dataset to train the model. Then, he used the same data to evaluate the
model which resulted in the correct answer all the time but was not able to perform
with unknown dataset.
Name the concept.
i. Aditi, a student of class XII developed a chatbot that clarifies the doubts of Economics 1
students. She trained the software with lots of data sets catering to all difficulty levels.
If any student would type or ask questions related to Economics, the software would
give an instant reply. Identify the domain of AI in the given scenario.
(a) Computer Vision
(b) Data Science
(c) Natural Language Processing
(d) None of these
ii. Which evaluation parameter takes into consideration all the correct predictions? 1
iii. ______ means a picture element which is the smallest unit of information that makes 1
up a picture.
(a) Vision
(b) Pics
(c) Pixel
(d) Piskel
vi. Which one of the following scenario result in a high false positive cost? 1
(a) viral outbreak
(b) forest fire
(c) flood
(d) spam filter
Q. 8 “The Trojan Horse was a wooden horse said to have been used by the Greeks during the 2
Trojan War to enter the city of Troy and win the war”.
What does Trojan horse mean in computer terminology?
Q. 12 Sirisha and Divisha want to make a model which will organize the unlabeled input data 2
into groups based on features. Which learning model should they use and why?
Q. 13 Ajay wants to access data from various sources. Suggest him any two points that he 2
needs to keep in mind while accessing data from any data source.
Q. 15 Identify any two stop words which should not be removed from the given sentence and 2
why?
Get help and support whether you're shopping now or need help with a past purchase.
Contact us at [email protected] or on our website www.pwershel.com
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Q. 17 Your grandmother watches you use AI applications. She wants to understand more 4
about it. Help her understand the term artificial intelligence by giving the right definition
and explain to her with an example how machines become artificially intelligent.
Q. 18 Akhil wants to learn how to scope the problem for an AI Project. Explain him the 4
following:
(a) 4W Problem Canvas
(b) Problem Statement Template
Q. 19 Identify and explain the types of the learning-based approaches in the figures given 4
below.
Figure 1
Figure 2
Q. 20 We, human beings, can read, write and understand many languages. But computers can 4
understand only machine language. Do you think we might face any challenges if we try
to teach computers how to understand and interact in human languages? Explain.
Q. 21 An AI model made the following sales prediction for a new mobile phone which they 4
have recently launched:
Reality
Confusion Matrix Yes No
Yes 50 40
Prediction
No 12 10
(i) Identify the total number of wrong predictions made by the model.
(ii) Calculate precision, recall and F1 Score.
No 290 47
(½ marks each for mapping the values in the
correct section, ½ *4=2 marks)
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Q. 17 When a machine possesses the ability to mimic Facilitator Unit 1 14, 15 4
human traits, i.e., make decisions, predict the Handbook
future, learn and improve on its own, it is said
to have artificial intelligence. In other words,
you can say that a machine is artificially
intelligent when it can accomplish tasks by
itself - collect data, understand it, analyse it,
learn from it, and improve it.
Q. 18 The 4Ws Problem canvas helps in identifying the Facilitator Unit 2 31-34 4
key elements related to the problem. The 4Ws Handbook
are Who, What, Where and Why
● The “Who” block helps in analysing the
people getting affected directly or
indirectly due to the problem.
● The “What” block helps us to determine
the nature of the problem.
● The “Where” block helps us to look into
the situation in which the problem
arises, the context of it, and the
locations where it is prominent.
● The “Why” block suggests to us the
benefits which the stakeholders would
get from the solution and how it will
benefit them as well as the society
Q. 20 Yes, we might face any challenges if we try to Facilitator Unit 6 106, 107 4
teach computers how to understand and Handbook
interact in human languages.
(ii) Precision=TP/(TP+FP)
=50/(50+40)
50/90
=0.55
Recall=TP/(TP+FN)
=50/(50+12)
=50/62
=.81
F1 Score = 2*Precision*Recall/(Precision+Recall)
=2*0.55*.81/(.55+.81)
=.891/1.36
=0.65
2 Self-Management Skills - II 2 1 3
3 ICT Skills - II 1 1 2
4 Entrepreneurial Skills - II 1 1 2
5 Green Skills - II 1 1 2
TOTAL QUESTIONS 6 5 11
General Instructions:
1. Please read the instructions carefully.
2. This Question Paper consists of 21 questions in two sections: Section A & Section B.
3. Section A has Objective type questions whereas Section B contains Subjective type questions.
4. Out of the given (5 + 16 =) 21 questions, a candidate has to answer (5 + 10 =) 15 questions in the
allotted (maximum) time of 2 hours.
5. All questions of a particular section must be attempted in the correct order.
6. SECTION A - OBJECTIVE TYPE QUESTIONS (24 MARKS):
i. This section has 05 questions.
ii. Marks allotted are mentioned against each question/part.
iii. There is no negative marking.
iv. Do as per the instructions given.
7. SECTION B – SUBJECTIVE TYPE QUESTIONS (26 MARKS):
i. This section has 16 questions.
ii. A candidate has to do 10 questions.
iii. Do as per the instructions given.
iv. Marks allotted are mentioned against each question/part.
i. “M D Gulati started with a small shop with his focus, dedication and clear ideas, MDH 1
became one of the most popular brands in India besides having a good reputation all
over the world”.
Which self-management skill is clearly visible in the given statement?
ii. When you bring the mouse over a file in File Explorer, it will show the details of that file. 1
This is known as
(a) Drag and drop
(b) Double click
(c) Hover
(d) Single click
iv. the work is all about identifying and noting how we spent our time, and 1
analysing how to spend our time effectively.
(a) Organising
(b) Prioritising
(c) Controlling
(d) Tracking
v. Remya traveled to Sweden from India to pursue her higher education. But she doesn't 1
know how to speak Swedish (language of Sweden). Because of this, she was unable to
find a part time job. This is an example of
(a) Interpersonal barrier
(b) Physical barrier
(c) Organisational barrier
(d) Linguistic barrier
vi. “Efforts are made to increase the solar power generation so that our electricity needs are met 1
and at the same time we do not pollute the environment or use up natural resources”.
Which SDG can you relate this statement to?
(a) Life on land
(b) Clean water and sanitation
(c) Affordable and clean energy
(d) Reduced inequalities
i. Assertion (A)– One can be a good singer while the other can be a great athlete. 1
Reason(R) – Humans possess different types of intelligences but at different levels.
(a) Both A and R are correct and R is the correct explanation of A
(b) Both A and R are correct but R is not the correct explanation of A
(c) A is correct but R is not correct
(d) A is not correct but R is correct.
ii. The Indian Government banned a few apps stating – “servers in the hostile nation are 1
receiving and using the acquired data improperly”.
Which terminology suits best for this action?
(a) AI Ethics
(b) Data Privacy
(c) AI Bias
(d) AI Access
vi. A corpus contains 4 documents in which the word ‘diet’ was appearing once in 1
document1. Identify the term in which we can categorise the word ‘diet’.
(a) Stop word
(b) Rare word
(c) Frequent word
(d) Removable word
i. Srishti learnt about AI terminologies but was not able to recollect the term that is used 1
to refer to machines that perform tasks with vast amounts of data using neural
networks. Help her with the correct term.
v. Which feature of NLP helps in understanding the emotions of the people mentioned 1
with the feedback?
(a) Virtual Assistants
(b) Sentiment Analysis
(c) Text classification
(d) Automatic Summarization
vi. Sarthak made a face mask detector system for which he had collected the dataset and 1
used all the dataset to train the model. Then, he used the same data to evaluate the
model which resulted in the correct answer all the time but was not able to perform
with unknown dataset.
Name the concept.
i. Aditi, a student of class XII developed a chatbot that clarifies the doubts of Economics 1
students. She trained the software with lots of data sets catering to all difficulty levels.
If any student would type or ask questions related to Economics, the software would
give an instant reply. Identify the domain of AI in the given scenario.
(a) Computer Vision
(b) Data Science
(c) Natural Language Processing
(d) None of these
ii. Which evaluation parameter takes into consideration all the correct predictions? 1
iii. means a picture element which is the smallest unit of information that makes 1
up a picture.
(a) Vision
(b) Pics
(c) Pixel
(d) Piskel
vi. Which one of the following scenario result in a high false positive cost? 1
(a) viral outbreak
(b) forest fire
(c) flood
(d) spam filter
Q. 8 “The Trojan Horse was a wooden horse said to have been used by the Greeks during the 2
Trojan War to enter the city of Troy and win the war”.
What does Trojan horse mean in computer terminology?
Q. 9 How is society helping entrepreneurs in their business? 2
Q. 12 Sirisha and Divisha want to make a model which will organize the unlabeled input data 2
into groups based on features. Which learning model should they use and why?
Q. 13 Ajay wants to access data from various sources. Suggest him any two points that he 2
needs to keep in mind while accessing data from any data source.
Q. 15 Identify any two stop words which should not be removed from the given sentence and 2
why?
Get help and support whether you're shopping now or need help with a past purchase.
Contact us at [email protected] or on our website www.pwershel.com
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Q. 17 Your grandmother watches you use AI applications. She wants to understand more 4
about it. Help her understand the term artificial intelligence by giving the right definition
and explain to her with an example how machines become artificially intelligent.
Q. 18 Akhil wants to learn how to scope the problem for an AI Project. Explain him the 4
following:
(a) 4W Problem Canvas
(b) Problem Statement Template
Q. 19 Identify and explain the types of the learning-based approaches in the figures given 4
below.
Figure 1
Figure 2
Q. 20 We, human beings, can read, write and understand many languages. But computers can 4
understand only machine language. Do you think we might face any challenges if we try
to teach computers how to understand and interact in human languages? Explain.
Q. 21 An AI model made the following sales prediction for a new mobile phone which they 4
have recently launched:
Reality
Confusion Matrix
Yes No
Yes 50 40
Prediction
No 12 10
(i) Identify the total number of wrong predictions made by the model.
(ii) Calculate precision, recall and F1 Score.
i. Self-Motivation NCERT 2 52 1
No 290 47
(½ marks each for mapping the values in the
correct section, ½ *4=2 marks)
Answer any 3 out of the given 5 questions in 50– 80 words each (4 x 3 = 12 marks)
Q. 17 When a machine possesses the ability to mimic Facilitator Unit 1 14, 15 4
human traits, i.e., make decisions, predict the Handbook
future, learn and improve on its own, it is said
to have artificial intelligence. In other words,
you can say that a machine is artificially
intelligent when it can accomplish tasks by
itself - collect data, understand it, analyse it,
learn from it, and improve it.
Q. 18 The 4Ws Problem canvas helps in identifying the Facilitator Unit 2 31-34 4
key elements related to the problem. The 4Ws Handbook
are Who, What, Where and Why
● The “Who” block helps in analysing the
people getting affected directly or
indirectly due to the problem.
● The “What” block helps us to determine
the nature of the problem.
● The “Where” block helps us to look into
the situation in which the problem
arises, the context of it, and the
locations where it is prominent.
● The “Why” block suggests to us the
benefits which the stakeholders would
get from the solution and how it will
benefit them as well as the society
Q. 20 Yes, we might face any challenges if we try to Facilitator Unit 6 106, 107 4
teach computers how to understand and Handbook
interact in human languages.
(ii) Precision=TP/(TP+FP)
=50/(50+40)
50/90
=0.55
Recall=TP/(TP+FN)
=50/(50+12)
=50/62
=.81
F1 Score = 2*Precision*Recall/(Precision+Recall)
=2*0.55*.81/(.55+.81)
=.891/1.36
=0.65