Artificial Intelligence Class 10
Artificial Intelligence Class 10
Artificial Intelligence Class 10
AI Project Cycle 10
Natural Language Processing 10
Evaluation 10
Total 40
Practical Work:
• Advance Python
PART C
• Data Science
• Computer Vision
Practical Examination
35
Viva Voce
Total 35
Student Portfolio 15
Viva Voce
Total 15
Note: * marked units are to be assessed through Internal Assessment/ Student Activities.
They are not to be assessed in Theory Exams
5
DETAILED CURRICULUM/TOPICS FOR CLASS X
Part-A: EMPLOYABILITY SKILLS
Note: * marked units are to be assessed through Internal Assessment/ Student Activities.
They are not to be assessed in Theory Exams
The detailed curriculum/ topics to be covered under Part A: Employability Skills can
be downloaded from CBSE website.
❖ Advance Python
❖ Data Science
❖ Computer Vision
7
UNIT SUB-UNIT SESSION / ACTIVITY / PRACTICAL
Session: Revisiting AI Project Cycle
Concepts of Data Session: Python for Data Sciences
Sciences
Session: Statistical Learning & Data Visualisation
K-nearest Activity: Personality Prediction (Optional)**
neighbour model
(Optional)** Session: Understanding K-nearest neighbour model
(Optional)**
COMPUTER Introduction Session: Introduction to Computer Vision
VISION
(To be assessed Session: Applications of CV
through Practicals) Concepts of Session & Activity: Understanding CV Concepts
Computer Vision ● Pixels
● How do computers see images?
● Image Features
OpenCV Session: Introduction to OpenCV
**NOTE: Optional components shall not be assessed. They are for extra knowledge
8
UNIT 1
Communication Skill:
Communication
.
Types of Communication-:
1 . Ve r b a l Co mm u n ica t io n
2 . No n Ve r b a l Co m m un ica t io n
3 . Visu a l Co m m un ica t io n
9
4 . Wr it t e n Com m u n ica t io n
1. Verbal Communication-:
Verbal communication is the use of sounds and words to express yourself,
especially in contrast to using gestures or mannerisms (non-verbal
communication). Example-: Orally communicating.
2. Non-verbal Communication-:
Nonverbal communication refers to gestures, facial expressions, tone of voice,
eye contact, (or lack thereof), body language, posture, and other ways people
can communicate without using language.
3. Visual Communication-:
Visual communication is the transmission of information and ideas using symbols
and imagery. Types of visual communication include animated GIFs, screenshots, videos,
pie charts, infographics, and slide deck presentations. It also includes signs, graphic
designs, films, typography, and countless other examples
4. Written Communication-:
A 'Written Communication' means the sending of messages, orders or
instructions in writing through letters, circulars, manuals, reports, telegrams,
office memos, bulletins, etc. It is a formal method of communication and is less
flexible.
Communication Cycle
Communication is one of the most vital elements of society. People need people, and to
interact, it's essential they be able to convey messages and understand each other. The
communication cycle expresses how the system of conveying and understanding
messages operates.
10
In the communication process, one person is a sender who convey message to another
person or a group of persons) nose as the receiver. When the receiver gets the message,
he acknowledges it and sends back a response. This leads to a cycle process known as
the communication cycle. The cycle describe how can ideas, impression, or feeling is made
no to others full stopper communication cycle includes resource such as e-mail threads
social media outlets, VoIP message outlets. In the communication process, one person is
a sender who convey message to another person (or a group of persons) nose as the
receiver. When the receiver gets the message, he acknowledges it and sends back a
response. This leads to a cycle process known as the communication cycle.
Feedback in Communication
The term 'feedback' is taken from cybernetics, a branch of engineering concerned with
self-regulating systems.
The observation of the receiver's response is called feedback. In other words, the part
of the receiver's response communicated back to the sender is called feedback. Actually it
is the amount of response of the receiver that reaches to the sender. It enables the sender
to evaluate the effectiveness of the message.
In the communication process, feedback refers to a response from the receiver which gives
the communicator an idea of how the message is being received and whether it needs to
be modified.
Feedback ensures that the message has been successfully conveyed and the
communication is effectively successful.
Feedback is important in communication because it enables the sender to evaluate the
effectiveness of its message. Without feedback, the communication process would be
incomplete.
11
Importance of feedback in communication-:
1. It completes the whole process of communication and makes it continuous.
2. It sustains communication process.
3. It makes one know if one is really communication or making sense.
4. It is a basis for measuring the effectiveness of communication.
5. It is a good basis for planning on what next to be done especially statistical report.
6. Communication will be useless without feedback.
7. Feedback paves way for new idea generation.
8. It is a process of effective listening.
9. It serves as basis of problem-solving.
10. Can motivate.
11. It can improve performance.
“To be effective, feedback needs to be clear, purposeful, meaningful, and compatible with
students' prior knowledge and to provide logical connections” (Hattie & Timperley, 2007,
p. 104). Task specific – feedback requires learning context and therefore needs to be task
specific.
Types of Feedback-:
Feedback can be various form and of various types. Let us discuss different types of
feedback used in communication.
Formal Feedback-:
A formal feedback follows a present format or structure using which the receiver friends
feedback and sends it. Formal feedback covers many predefined points and has a specific
blueprint. The receiver friends the feedback as per this blueprint and sends it. Formal
feedback takes time to construct and hence, is not instant.
12
Examples:
“Congratulations on scoring with A Grade in your final test performance. You are
promoted to your next class.”
Informal Feedback-:
Informal feedback, on the other hand, is spontaneously friendly and does not stick to a
specific structure such as instant comments by the listener or audience. It does not take
time to construct as it is immediately conveyed.
Examples:
"Good job! “, “Congratulations!” “Sorry”
Examples
“All paragraphs should cover basically on Idea. Only one paragraph was as per this
specification, other paragraphs convey multiple ideas and the information was also
cohesively linked.”
“In your article, the conclusion did not reiterate your observation and did not support the
evidence your article talks about. You need to rewrite the conclusion by keeping this thing
in mind.”
Non-descriptive feedback-:
A non-descriptive feedback provides some specific information but does not give details
descriptions. The feedback conveys meaningful specific response but does not come with
descriptive analysis or suggestions.
Examples
“I only like your second paragraph. Others needs improvement.”
“In your article, conclusion needs rework”
Specific Feedback-:
The specific feedback talks about a thing, particularly without talking about a General
overview.
Example-:
“I like the way you described your grandfather's character. It makes me feel like I too know
him”.
“I like your portrayal of sibling rivalry, especially the part where you and your sister were
fighting. I fight with my brother too, so it made it sound real to me. your story seemed
related at all points.”
13
Non-specific Feedback-:
The Non-specific feedback, on the other hand, talks about the entire think while giving a
General overview. it does not particularly pinpoint is specific think/ feature.
Examples:
“I like your story. It is good.”
“I like it your topic of sibling rivalry.”
CHECK POINT :
A) Channel
B) Receiver
C) Sender
D) Time
Q2. You need to apply for leave at work? Which method of communication will you
use?
A) e-mail
B) Poster
C) Newsletter
D) Blog
A) Newspapers
B) Letters
C) Phone call
D) E-mail
14
C) These are good drawings but you can do better.
Q5. What are the types of words we should use for verbal communication?
A) Acronyms
B) Simple
C) Technical
D) Jargons
B) Indirect
C) Specific
D) Opinion-based
15
Q9 Which of these is NOT an appropriate non-verbal communication at work?
C) Sitting straight
C) Smiling continuously
EFFECTIVE COMMUNICATION
Introduction:
Effective communication is a two way communication process where both parties have
right and convenience to express their messages opinions, facts and other informations.
• Attention:-
The receiver should be fully attentive in a communication process.
• Consistency:-
This principle implies that communication should always be consistent with thE planned
objective of message being conveyed
• Adequacy:-
The information conveyed should be complete in all respects.
16
• Timelines:-
The message conveyed should be at the proper time.
• Feedback:-
The communication must have feedback confirmation from the recipient whether the
messages have been understood by the recipient
• Economy:-
The communication should take place in a way that costs optimally.
• Concrete: Your arguments should be based on solid facts and opinions from credible
sources and you should share reliable data to support your stand.
• Correct: It’s essential that along with the factual information, the language and grammar
you use are correct.
• Coherent: Your words should make sense .Along with that it should related with the main
topic
• Complete: Your message should be complete .It should have all the needed information
• Courteous: Be respectful , honest and friendly throughout your communication
17
Part 5: Barriers in Communication
Barriers in communication
• Linguistic Barrier: Language at times can be a barrier to effective communication
• Physical Barrier: If the surroundings do not support proper communication, it can also
act as a barrier to appropriate interaction.
• Cultural Barrier: Cultural differences hinder us from communicating properly.
• Interpersonal Barriers: It refers to the situations when the intended message is received
incorrectly due to many personal reasons.
• Organizational Barriers: In an organization if there is no clarity about the roles,
structures, responsibilities, it will hinder effective communication among the members of
the organization.
Measures to Overcome Barriers of communication
• Overcoming Lingual Factors: To overcome this one need to prepare appropriately. One
should carefully think about the language needs of the recipient.
• Overcoming Environmental Factors: Communicators should ensure that the message is
delivered in a distraction free environment.
• Overcoming Barrier of Cultural Influence: Preparation to be made keeping the culture of
the people you are addressing.
• Overcoming Interpersonal Barriers of Communication:
• Overcoming Organizational Barriers of Communication
18
• Adjective: An adjective describes, modifies, or gives more information about a noun or
pronoun.
• Article: A word that introduces a noun.
• Adverb: An adverb describes/modifies a verb, an adjective, or another adverb. It tells
how, where, when, how often or to what extent.
• Preposition: A preposition shows the relationship of a noun or pronoun to another word.
They can indicate time, place, or relationship.
• Conjunction: A conjunction joins two words, ideas, phrases, or clauses together in a
sentence and shows how they are connected.
• Interjection: An interjection is a word or phrase that expresses a strong feeling or
emotion. It is a short exclamation.
19
Sentences:
A group of words that makes complete sense is called a sentence. The sentence must
contain the subject and a predicate.
Kinds of Sentences:
There are four kinds of sentences:
1. Assertive or declarative sentence or Statement
2. Integrative sentence (a Question)
3. Imperative sentence (a Command)
4. Exclamatory sentence (an Exclamation)
Parts of a sentence-:
• Subject-:
A subject is a word or group up of words which conveys the name of the person or think
that we are asking about.
• Predicate-:
On the other hand, It is the part of the sentence which contains a verb, and state something
about the subject.
20
Active and Passive voice
The object of the active sentence becomes the subject of the verb in the passive voice.
21
UNIT 2 :
SELF- MANAGEMENT SKILLS
Self-Management Skills
Def:- Self-management, which is also referred to as ‘self-control’ or ‘self-regulation’, is the
ability to regulate one’s emotions, thoughts, and behavior effectively in different situations.
This includes motivating oneself, and setting and working towards personal and academic
goals.
Domains of Self-Management Skills
i. Stress Management
ii.Self-Awareness
iii. Self-Motivation
iv. Set Goals
v. Time Management
Stress management: -
Managing stress is all about taking charge: taking charge of your thoughts, your emotions,
your schedule, your environment, and the way you deal with problems. The ultimate goal
is a balanced life, with time for work, relationships, relaxation, and fun – plus the resilience
to hold up under pressure and meet challenges head on.
Stress: -
22
• Stress is a normal physical response to events that make you feel threatened or upset
your balance in some way.
• When you sense danger – whether it’s real or imagined – the body's defences kick into
high gear in a rapid, automatic process known as the ―"fight-or-flight" reaction, or the
stress response.
There can be two types of stress- good stress and bad stress.
Good Stress:
• Good stress helps us go about our daily tasks and achieve those hard-to-reach goals.
• This stress, called eustress, helps us learn new things, adapt to change and engage in
creative thinking.
• Everyone experiences good stress on a daily basis.
• Another form of good stress is the stress that enables us to survive in times of trauma.
• This stress makes us aware of danger and enables us to escape when we need to.
Bad Stress:
• Bad forms of stress do not help us achieve goals or tasks, but instead actually inhibit
our ability to function on a daily basis.
• Bad stress occurs when too much stress builds up around us.
• Once the body feels there is too much stress, it will begin to break down, causing
symptoms like perspiration, anxiety, headaches and rapid breathing.
• This kind of stress can take a huge toll on your physical and mental well-being.
23
9. Make time for hobbies, interests, and relaxation.
10. Get enough rest and sleep. Your body needs time to recover from stressful events.
11. Seek out social support. Spend enough time with those you enjoy.
12. Seek treatment with a psychologist or other mental health professional trained in
stress management or biofeedback techniques to learn healthy ways of dealing with the
stress in your life.
Independent Working: -
Independent or self-directed learning is an important skill, whether you plan to continue
your studies after school or college or professionally.
Independent learning is when an individual is able to think, act and pursue their own
studies autonomously, without the same levels of support you receive from a teacher at
school.
➔ Motivated
➔ Resilient, to overcome challenges
➔ An excellent time manager
➔ Becoming self-aware, self-monitoring and self-correcting;
➔ Knowing what you need to do;
➔ Taking the initiative rather than waiting to be told what to do;
➔ Doing what is asked to the best of your ability, without the need for external
prodding, and working until the job is completed;
➔ Learning to work at a pace that you can sustain;
➔ Taking ownership of your mistakes without looking for excuses; and
➔ Refusing to let self-doubt or negative emotions due to negative past experiences
take you off course.
24
Self-Awareness: -
✓ Self-awareness means searching for patterns in the manner we think about what
is taking place, how we can explain matters to ourselves, and also make sense of the
surroundings.
✓ Self-awareness implies comprehending our moods as well as emotions. Rather
than attempting to avoid how we are feeling, we perceive and even become interested in
our feelings, including the uncomfortable and tough ones.
✓ Self-awareness implies focusing on how we are prone to behave and act in
some particular circumstances. How are we going to respond to certain things? What
exactly are our tendencies and habits?
Some useful questions to think about in this regard are the following:
• What kind of science do you enjoy doing? Fundamental or applied?
• Do you enjoy working in the lab or in an office?
• Do you enjoy explaining your work? How? Orally? In Writing? Both?
• Do you like working with others as a member of a team or do you prefer to work by
yourself?
• Are you a good listener?
• Can you handle personal conflict?
• Do you prefer delving into a problem deeply?
• Do you see the "big picture"?
• Do you prefer to work on short term projects (6 months or less) or long term projects?
• Do you enjoy using instrumentation? What kinds?
• Do you enjoy using computers and/or software?
• Do you enjoy travel? Can you speak one or more foreign languages conversationally?
Can you read in another language?
• Are you self-motivated? Do you require external prompts in order to meet deadlines
and/or achieve results?
25
them if they are aware of what bothers them. Be it any good or bad actions taken
by them that can recognize it very quickly.
• External Self-awareness deals with our feelings and behaviour with others.
• It’s the ability to look at others.
• When we assume about a leader, she/he should be empathetic towards their
employees. It helps to build a healthy relationship.
• This awareness helps you decide what others think about you.
• If you can judge whether a person is happy with you or not, then you have better
external Self-awareness. It certainly makes a person more effective in paying
attention to others.
Self-Motivation: -
▪ Self-motivation is ability to do thinks on your own without being told to do so.
▪ Self-motivation is a glorious cycle of boosting self-confidence and self-esteem.
▪ Self-motivation definition, initiative to undertake or continue a task or activity without
another's prodding or supervision.
Self-regulation: -
Self-regulation is the ability to understand and manage your behaviour and your
reactions to feelings and things happening around you.
26
Q5. Physical exercise is used as a stress management technique because
A) It improves blood circulation
B) improves self-image
C) make us feel better
D) All of the above
Q10. Which of the following focuses on your ability to influence personal and
professional improvement based on your self-awareness and motivation?
A) Self-regulation
B) Self-awareness
C) Self-motivation
D) All of these
Answers:
Q1.D) Q2.B) Q3.A) Q4.A) Q5.D) 6.C) Q7.C)
Q8.D) Q9.B) Q10.A)
27
3. Write the effects of stress on our life.
Ans. It can harm our emotional and physical health, and limit our ability to function well at
home, in school and within our relationships.
1. What is Stress?
Ans – Our emotional, mental, physical, and social responses to perceived demands or
threats are referred to as stress. Stressors are the pressures or threats that people face.
For example –
a. You’re only a few days away from your examinations, yet you’re feeling unprepared.
b. you are experiencing a loss of someone close in the family.
c. You’re concerned about what others will think of you if you don’t dress properly or speak
confidently.
d. you are stressed due to lack of sleep.
28
UNIT 3
ICT SKILLS
✓ Symbian
✓ Windows Phone
✓ iOS
• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination between other software and users
29
The different types of operating systems are as follows:
Interactive (GUI-based) A graphical user interface is a user-friendly operating system in
which commands can be entered by clicking/double-clicking/right-clicking a mouse.
Windows operating system is an example of an interactive operating system.
Single-user, single-task operating system: This type of operating system allows only
one user to do a task on the computer and one thing at a time.
Single-user, multi-task operating system: This type of operating system is used on
Desktop computers, laptops, where a single user can operate on several programs at the
same time. For example, Windows, Apple MacOS are examples of single-user multi task
operating system.
Multi-user A multi-user operating system enables multiple users to work on the same
computer at different times or simultaneously.
Real Time A real time operating system is used to control machinery, scientific
instruments, like robots, in complex animations and computer controlled automated
machines. A real-time operating system is a computing environment that reacts to input
within a specific period of time. It manages the resources of the computer so that any
particular operation is executed in the same amount of time every time it is executed.
Windows CE and Lynx OS are examples of real-time operating systems.
30
applications, etc. At the bottom of the desktop is a long bar called the Taskbar. To the left
of the taskbar is the Start button.
Figure 1
31
Computer :
It displays all the storage areas of the computer . Through the Computer icon, you can access all
drives, files, and folders on the computer. When you double-click Computer icon, a window shown
below in Figure 2 appears on the screen.
Taskbar is the long horizontal bar present at the bottom of the screen. To left of the Taskbar is the
Start button and to the right appears Date/Time. You can also see icons of active applications and
some shortcuts on the Taskbar
Fig 3 Taskbar
Start button it is located on the left of the taskbar. Clicking the Start button (Figure 4) opens the
Start menu and provides access to programs and features, like:
Shut Down: - allows the user to turn off the computer
All Programs: - Provides access to all the installed programs and applications. To start an
application, just click it.
Search Box: - This allows the user to search a file or a folder or run executable files. Control
32
panel: - This allows the user to change various settings.
Recycle Bin Files and folders deleted by the user are stored in the Recycle Bin. From Recycle
Bin, you can retrieve files or folders deleted by mistake.
File Concept, File Operations, File Organization, Directory Structures And File-
System Structures
Everything you store on your computer is stored in the form of a file. There are specific naming
conventions for naming files or folders, like characters that can be used, maximum number of
characters, etc. Files can be separately placed into groups, called folders/directories. Each
directory/folder can contain related files and/or sub-folders
2. Select the drive in which you want to create a new folder. Say, Local Disk D:.
33
3. Window will open up showing files and folders in Local Disc D: Click New Folder on the toolbar.
2. In the Shortcut menu, click New and select the type of the file you want to create.
3. Type the new name or edit the existing name and press the Enter key.
You can copy a file or a folder in any one of the following ways:
1. Shortcut menu:
c. Select the drive or the folder where you want to make a copy of the selected file or folder.
To copy a file or a folder, hold down the Ctrl key while dragging it to the new location.
3. Using Keyboard:
You can move a file or a folder in any one of the following ways:
1. Shortcut menu:
c. Select the drive or the folder where you want to move the selected file or folder.
2. Drag and Drop method: To copy a file or a folder, select the file and drag it to a new location.
3. Using Keyboard:
You can permanently delete the contents of the Recycle Bin in any one of the following ways:
Right-click the Recycle Bin icon and then click Empty Recycle Bin
OR
To recover a file from the Recycle Bin, right-click the file, and then click Restore.
Or
• Keep the components of the computer, like keyboard, mouse, monitor, etc. clean.
• Ensure backups are working properly by periodically restoring or checking of data. You should
35
use external hard drive for backup of data on your computer.
How to take
Always keep your anti-virus software updated so that it can detect new viruses. Full system scan
should be done to periodically, preferably weekly to scan for viruses.
A regular disk defragmentation should be done to remove all unnecessary information that slows
down the computer.
Disk defragmentation done at regular intervals helps the disc space to be used at an optimal level.
Take regular backup of the data on your computer. In case the data is lost due to any reason,
system failure, virus attack, etc., you can easily retrieve your data using backup files till your last
update.
System should be upgraded with new updates that were not there at the time of purchase, like,
increasing RAM, to improve the performance. Also storage space should also be increased for
storage of more information.
If you are getting some disc errors, then make sure that temporary internet files are deleted from
time to time.
36
QUESTIONS-1 MARK
1 Here are the steps that take place when starting a computer. Rearrange the steps 1
in the correct order. i) Desktop appears after login ii) Login screen appears iii) Power
on Self-Test (POST) starts iv) Operating system starts v) Welcome screen appears
a) i) -> ii) -> iii) -> iv) -> v)
b) ii) -> iv) -> iii) -> v) -> i)
c) iii) -> iv) -> v) -> ii) -> i)
d) iii) -> v) -> iv) -> ii) -> i)
2 Which one of the following is an example of Operating System? 1
a) Microsoft Word
b) Microsoft Windows
c) Microsoft Excel
d) Microsoft Access
3 Given below are the steps to make a copy of folder ‘D:\Myfolder’ in ‘C:\Documents’. 1
Rearrange the steps in the correct order.
(i) Right click anywhere in the folder and select Paste option from the
shortcut menu or use Ctrl+V keyboard keys.
(ii) Select the C: drive and locate Documents folder.
(iii) Right click on Myfolder and select Paste option from the shortcut menu or
use Ctrl+C keyboard keys.
(iv) (iv) Select the D: drive and locate Myfolder.
(a) (iii) -> (i) -> (ii) -> (iv)
(b) (iv) -> (ii) -> (iii) -> (i)
(c) (iv) -> (iii) -> (ii) -> (i)
(d) (i) -> (ii) -> (iii) -> (iv)
4 Which of the following is not an example of Antivirus software? 1
(i) McAfee (ii) Norton (iii) Disk Clean-up (iv) Kaspersky
5 Given below are the components of the taskbar in Windows 7. Rearrange the icons 1
from left to right of the taskbar. (a)Date/Time (b) Start Button (c) Notification Area
(d) File Explorer
(i) (c) -> (a) -> (b) -> (d) (ii) (b) -> (d) -> (c) -> (a) (iii) (d) -> (c) -> (b) -> (a) (iv) (a) ->
(b) -> (c) -> (d)
6 Which of the following is not a symptom of a computer affected with virus? 1
(i) Computer stops responding (ii) Computer restarts on its own (iii) Computer can’t
open a permanently deleted file (iv) Computer runs very slowly
37
7 The cleaning of software installed in the computer cannot be achieved by 1
____________.
a) Disk clean-up b) backup c) Cleaning CPU cabinet d) Installing antivirus software
8 Which of the following will you opt for saving a file? 1
(a) save button on standard toolbar
(b) save option from file menu
(c) pressing Ctrl+S
(d) any of the above
9 ________________ is leakage of information stored in a computer. 1
38
16 Which one of the following shortcut keys is used to paste a file? 1
a. Ctrl + c
b. Ctrl + p
c. Ctrl + v
d. Ctrl + x
17 What are the best options for caring for computer devices? 1
a. Keeping a Device Clean
b. Prepare a Maintenance Schedule
c. Do not overcharge your battery
d. All of the above
20 Sometimes we get mails from companies who are advertising a product or trying to 1
attract you to their website. Such mails are called ________.
a. Trash
b. Inbox
c. Spam
d. None of the above
21 What happens if you keep a device plugged in after it has been fully charged? 1
a. It can break.
b. It can overheat.
c. It can stop functioning.
d. Data can get corrupt.
23 Which option does not need to be enabled in order to keep a device cool? 1
a. Make sure the computer’s CPU fan is working.
b. Keep the device unplugged when in use.
c. Do not cover a laptop with a blanket.
d. Avoid leaving the device in the sun.
39
24 Which of the following is required for keyboard maintenance? 1
a. Use a very dilute combination of soap and water applied with a non-abrasive
cloth to remove stains from the keycaps.
b. Turn the keyboard upside down and shake it to remove foreign material.
c. Blow dust and other particles with the help of a blower.
d. All of the above.
27 When a hacker takes your personal information and assumes your identity, this is 1
referred to as____________ theft.
a. Physical
b. Identity
c. Software Piracy
d. None of the above
28 __________ are persons who try to attract you into inappropriate relationships. 1
a. Trojan House
b. Online Predator
c. Theft
d. None of the above
29 Sometimes you may receive very attractive offers saying you have won a huge 1
amount of money in a lottery and that you can claim the prize by depositing a
certain amount of money known as ___________.
a. Trojan House
b. Online Predator
c. Theft
d. Internet Scams
DESCRIPTIVE QUESTIONS
40
1 What do you mean by Operating System? 1
Ans. Operating System: It is a software that acts as an interface between the user
and the computer.
2 Give two examples of mobile operating system. 2
Ans.
File Folder
a. A Notepad file
b. A Sound File
c. An image file
a. Cut
b. Copy
c. Paste
Ans. Backing up data means to save the information present on your computer on
another device, such as CD/DVD drives or hard disk.
Ans. We get mails from companies who are advertising a product or trying to
attract you to their website. Such mails are called Spam.
Ans. Viruses are computer programs that can damage the data and software
programs or steal the information stored on a computer.
13 Name two types of Virus. 2
Ans. Few tips to protect our data from online theft and viruses are:
a. Use passwords to login to your computer:
b. Install Anti-virus and Firewall:
c. Use Data Encryption
42
d. Give details of your credit card or bank account only on secure sites
15 What do you mean by threats to Computer? 1
Ans. Threats are the ways in which personal information can be leaked from a
computer without our knowing.
16 List the various threats to a computer and its data. 2
1 Virus
2. Phishing
3. Online theft
4. Cyber crime
17 What is ‘s’ in “https”? 1
18 a. Antivirus
43
19 a. Delete
20 c. Spam
21 b. It can overheat.
25 c. Both a) and b)
26 a. Physical
27 b. Identity
28 b. Online Predator
29 d. Internet Scams
30 b. https://
44
UNIT 4
Entrepreneurial Skill
An entrepreneur is an individual or a team, having an innovative idea, and takes every step to turn
the idea into reality, while bearing the risks. Entrepreneurship is the process of setting up a
business, taking it from an idea to realization. Entrepreneurship is the ability and readiness to
develop, organize, and run a business enterprise, along with any of its uncertainties in order to
make a profit.
Society is described as an aggregate of people living together in a community, who associate for
various engagements including business.
Entrepreneurship is the attitude of mind to seek opportunities, take calculated risks and derive
benefits by setting up a venture. It comprises of numerous activities involved in conception,
creation, and running an enterprise.
The beauty of entrepreneurship in a society is that as businesses prosper the impact the
businesses create also increases. It is due to entrepreneurial activity that the society is provided
with goods and services. In turn, society provides market for products and services provided by the
entrepreneur.
• Fosters Creativity
45
Role of society in boosting entrepreneurship:
Qualities of an Entrepreneur
The qualities of an Entrepreneur are the key value to success. They play the role to guide the
person to achieve his/her goal. Some qualities of an Entrepreneur are stated below:
46
QUALITIES OF
AN
ENTREPRENEUR
INDEPENDENCE ENERGETIC
SELF
PERSEVERANT
CONFIDENT
Hard work: Entrepreneur work hard to be successful. Entrepreneurs use a lot of trial and error and
keep putting in work till they succeed.
Optimism: Positivity and belief in what they do is what takes entrepreneurs far in their journey.
Entrepreneurs should not think negatively or be afraid of adverse situations. For an entrepreneur,
part of being optimistic is about learning from mistakes and failures and finding alternative ways to
do things.
Independence: Entrepreneurs prefer to be their own master and not work under someone else.
Entrepreneurs like the independence to drive a business on their own.
Energetic: Drive and energy is always high in successful entrepreneurs which makes them
extremely proactive. They are continuously taking actions to try multiple approaches and execute
things.
Self-confident: Belief in one’s own vision and abilities and passion for the goal makes successful
entrepreneurs confident. Entrepreneurs are able to transfer this passion and vision to investors,
employees, customers etc. to sell their idea to every stakeholder.
Perseverant: A way of thinking that helps to accept failure, learn from mistakes, not give up,
continuously experiment etc. is crucial for an entrepreneur. Hence, entrepreneurs need to be
perseverant in their pursuit.
47
Functions of an Entrepreneur
48
Entrepreneurial functions
Risk taking:
● Risk taking is about taking responsibility and planning for a loss or mishap that may occur
in the future due to unforeseen contingencies.
● Some common risks entrepreneurs take are around return on investment, hiring of new
employees, working with vendors etc.
● An entrepreneur plays the function of developing a certain risk-taking appetite and taking
calculative risks to reduce adverse consequences.
Innovation:
● Entrepreneurs innovate by introducing new concepts, products, services, designs, ideas
etc.
● They may introduce something new and innovative in any branch of economic activity.
● An entrepreneur foresees a potentially profitable opportunity and innovates in the effort to
exploit it.
Promotional functions
Idea Discovery:
● The first step towards entrepreneurship is discovery of a business idea.
● An entrepreneur comes up with a business idea and thinks about ways to implement it.
● It is about seeking opportunities for a specific type of business and finding ways to
commercialise it.
● Usually, entrepreneurs work around the process of idea discovery by exploiting natural
resources, finding a market need or calculating the profit potential.
Detailed Investigation:
● While coming up with ideas can seem like an easy process, the challenge is to understand
if the idea has the potential to turn into a viable business venture.
● For this, an entrepreneur conducts research, investigates and evaluates an idea
considering various factors and estimates the total demand for a new product or service.
49
Assembling the Requirements:
● Some basic business requirements include infrastructure or office space, human
resources, key vendors or partners, working capital etc.
● In a manufacturing or product-based business, some requirements are selecting the
factory site, sourcing plant and machinery, hiring staff, finding the right suppliers etc.
● No matter what is the type of the business, an entrepreneur has to work towards
assembling and organising all the requirements once he/she is sure about the practicality
and profitability of the proposition.
● Once this function is performed, the project is set to start smoothly.
Financing:
● Raising capital for a business is one of the core functions that entrepreneurs perform
themselves, not just at the initial stage of the business, but even to grow and scale the
business.
● First, the requirements of finances are estimated. Next, the sources from which capital will
come are determined.
● This includes calculating the long-term and short-term financial requirements and
considering the debt equity ratio.
Managerial functions
Planning
● An entrepreneur documents a business idea in the form of a business plan, to detail each
element of the business such as product or service description, operations, marketing,
finance, accounting, growth plan etc.
● A business plan serves as a guide to determine the business objectives and the course of
action.
● It helps to detail the “what, when, how and who” of doing every specific task.
Organizing
● Organizing in the managerial context refers to setting specific and attainable goals and
objectives to be achieved by different departments and by each employee.
● It is about arranging, directing, guiding, coordinating, and controlling the key business
activities
Directing
● Directing is about initiating planned action and ensuring that each employee is performing
effectively.
● This also includes doing continuous performance reviews and organizing tasks according
to plans.
50
Staffing
● Staffing refers to different sub-processes around human resource management, such as
manpower planning, recruitment, selection, placement, training, transfer, salary,
promotion, payroll, appraisal, etc.
● The objective of staffing is to fill a particular position with the right employee at the right
time.
Leadership
● Leadership is more of a skill than a function for an entrepreneur as he or she has to lead,
guide and supervise people who work for the business.
● It is the process by which an entrepreneur directs, guides and influences the work of
others in choosing and attaining specified goals by mediating between the individual and
organization in such a manner that both get maximum satisfaction.
Communication
● An entrepreneur has to communicate every single day, in the form of writing, responding,
drafting emails, verbal instruction, discussion, etc.
● Entrepreneurs spend 75% to 90% of their working time communicating with others.
● It refers to the exchange of ideas, feelings, emotions, knowledge, and information between
two or more persons.
● Nothing happens in management until effective communication takes place.
Supervision
● After issuing instructions, the entrepreneur has to see that the given instructions are
carried out.
● Supervision refers to the job of overseeing subordinates at work to ensure the maximum
utilization of resources, to get the required and directed work done, to correct the
subordinates whenever they go wrong, and ensure each function of the business runs
smoothly.
Motivation
● Along with guiding employees, an entrepreneur also plays the role of motivating them and
encouraging positive behavior and culture within the organization.
● Motivating employees is about creating an urge in them to exhibit the desired behavior and
positive attitude towards work.
● Employees with high motivation automatically do other things along with it to perform
successfully, such as being productive, flexible, competitive, comprehensive, efficient, etc.
Co-ordination
● Coordination between different departments of the business helps to ensure that work
happens in a timely manner.
● Activities of all employees must be channelized towards goal achievement.
● An entrepreneur has to set certain targets, measures, goals, etc.
51
● With different departments to ensure all are coordinating and working effectively internally
as well.
Controlling
● Sometimes controlling is necessary for the entrepreneur to set company rules and
policies.
● The controlling function helps the entrepreneur to set performance standards, measure
and compare productivity and performance, identify variations, take corrective action, etc.
Negotiation
● An entrepreneur negotiates terms and conditions for many parts of the business such as
payment terms and timelines, salaries of employees, vendor quotations, etc.
Commercial Functions
Marketing
● Marketing is about moving the product or service from the producer into the hands of the
end customer or user.
● It involves promotion, advertising, distribution, customer service, etc
● An entrepreneur has to perform this function to make people aware of the offerings of the
business and makes sales.
Role of entrepreneurs:
Innovator’s Role
52
Entrepreneurs innovate by bringing unique and new products and services into the market.
Innovation in the industry results in higher production efficiency which has led to an increase in
employment and income levels.
Agent’s role
Entrepreneurs are perceived as ‘Agents of Change’. They identify the opportunities, establish
enterprises, and build up industries which in turn lead to the overall development of the economy.
Coordinating role
An entrepreneur has to coordinate the various factors for production. It involves the selection of the
best possible combination of factors.
The fruit of bearing risks can be profit, which leads to wealth generation for the overall economy.
Entrepreneurs retain some amount of the profits earned and put it back into the business.
Therefore, by assuming risk entrepreneurs contribute to the economy.
Entrepreneurs enable the formation of capital by mobilizing idle savings for the purpose of carrying
on the business. This mobilization of capital leads to the development of assets, trade activities,
an increase in capital availability, and economic development.
Imitating role
In developing nations, entrepreneurs usually imitate or adopt the innovations done by the
entrepreneurs of the developed nations. These innovations are adapted according to the local
needs and conditions and work towards overcoming entrepreneurial challenges.
Entrepreneurs generate employment, income, and wealth which improves the overall standard of
living in society. Improved standard of living leads to economic development as it reduces the
disparity in income.
Balancing role
Entrepreneurship is encouraged with small and micro enterprises and small-scale industries as
well. This encourages regional development and removes development imbalances in the
economy
53
IMPORTANCE OF AN ENTREPRENEUR
Efficiency improvements
● A successful entrepreneur tends to adapt to an established business and increase their
own efficiency.
● They innovate with current systems and introduce new technologies which can
significantly create advancement in the industry.
● Hence, during any major changes in the economy, entrepreneurs adapt and do not have
to go out of business.
New markets
● Entrepreneurs can often ‘redefine the rules’ of an established industry.
● They do this by creating new markets for existing products and slightly innovating in small
ways to suit the needs of a new target market.
New values
● Sometimes, entrepreneurs choose ethics over profit and offer a more ethical product to the
world, and are transparent about it.
● For example, Jaipur Rugs has multiple artisans who work towards making rugs that are
sold around the world.
● However, Jaipur rugs are very transparent about their artisan community and they ensure
that artisans are given a fair share of profit.
a) Entrepreneurs are born, not made: It is an assumption that entrepreneurial qualities are
inborn and that only people with certain natural talents can become entrepreneurs. This is a myth
and research had established that almost anyone can be an entrepreneur with the right skills,
drive and passion.
b) It takes a lot of money to start a business: While certain amount of capital is required for
take a business off the ground, it varies depending on the business. The key in entrepreneurship
is to start with resources available and grow slowly and steadily
c) Entrepreneurs take risk: While entrepreneurs definitely have to bear some risks, they do not
necessarily put themselves in high-risk situations. Entrepreneurs take calculated risks and weigh
risk versus reward.
f) One must know everything before starting a business: Entrepreneurs continuously thrive to
be in a constant state of learning. What actually counts is not what you know, but how fast you
can learn.
******************************************************************************************************
A. MCQ QUESTIONS: (Each question carries 1 mark)
a. Software Engineer
b. Entrepreneur
c. Civil Engineer
d. Mechanical Engineer
4. The process of developing a business plan, launching and running a business using
innovation to meet customer needs and to make a profit is __________________.
55
a. Software Engineer
b. Entrepreneur
c. Civil Engineer
d. Mechanical Engineer
5. A self-employed person who is always trying to make his/her business better by taking
risks and trying new ideas is an _________.
a. Business Man
b. Entrepreneur
c. Employer
d. None of the above
6. What do entrepreneurs do when she/he runs their business?
a. Fulfill Customer Needs
b. Use Local Materials
c. Create Jobs
d. All of the above
7. When a person begins a business, he or she may encounter several challenges and
failures. Even while taking a significant risk, an entrepreneur must think _____________.
a. Positively
b. Negatively
c. Both a) and b)
d. None of the above
8. It is necessary for an entrepreneur to continuously _________ towards his/her own and
company’s goals.
a. Work Hard
b. Always take rest
c. Not participate actively
d. None of the above
9.Entrepreneurs need to be open to __________and try them without fear of failure.
a. Invest all of money
b. New Ideas
c. Both a) and b)
d. None of the above
10. Experimenting with many ideas is a quality related to __________.
56
a. Perseverance
b. Confidence
c. Creativity
d. Trial and error
11.An entrepreneur should be able to see a problem from different perspectives and come
up with original and______________.
a. Creative Solutions
b. New Ideas
c. Both a) and b)
d. None of the above
12. An entrepreneur should be willing to take a ___________ and is always open to new
ideas to make his/her business grow.
a. Satisfying human need
b. Product and Service
c. Calculated Risk
d. Regular Production
13. Ravi’s customer comes to his store and starts shouting at him. He does not get angry.
He listens to what his customer is saying. He is ____________.
a. Hardworking
b. Confident
c. Patient
d. Prying new ideas
14. Susheela decides to sell her company tyres in Sri Lanka. It does not sell and she has a
loss. She apologizes to the people who work for her. She says she will plan better next time.
She _______________________.
a. takes responsibility for your mistakes
b. thinks before making a decision
c. does not give up
d. is creative
15. A myth, or a misconception about entrepreneurship is __________.
a. To start a business we required lot of money
b. Business should be unique or special
c. entrepreneurs are born, not made
d. All of the above
57
16. Ramya and Ramu both own plant shops. Ramu sits at his shop every day. When
customers come, he sells to them. Ramya walks around and gets customers to her shop.
She also sells seeds and flowers. Who is Entrepreneur out of Ramya and Ramu.
a. Ramya
b. Ramu
c. Both of the above
d. None of the above
17. What do entrepreneurs do when they run their business?
a. They help in increasing jobs in their area.
b. Helping the people in the society to earn money.
c. Both of the above
d. None of the above
18. Which of the following entrepreneurship refers to starting industries in which
manufacturing, trading, providing services, productions are done on a micro scale?
a. Women Entrepreneurship
b. Agricultural Entrepreneurship
c. Small Scale Entrepreneurship
d. None of the above
19. An enterprise owned and controlled by a woman and giving at least 51 per cent of the
employment generated in the enterprise to women is _________
a. Agricultural Entrepreneurship
b. Small Scale Entrepreneurship
c. Social Entrepreneurship
d. Women Entrepreneurship
20. Mary buys bulbs for her business from Noida. She learns that bulbs are cheaper in
Faridabad. So, she decides to start buying bulbs from there.
ANSWERS
1 a 5 b 9 b 13 c 17 c
58
2 d 6 d 10 d 14 a 18 c
3 b 7 a 11 c 15 d 19 d
4 b 8 a 12 c 16 a 20 a
B. DESCRIPTIVE QUESTIONS
1 MARK QUESTIONS:
1. What do you mean by Entrepreneur?
Ans: Entrepreneurs are people with vision who recognize and pursue opportunity, create and
establish business or new ventures, take into account the risk involved by using available
resources.
2.What do you mean by Entrepreneurship?
Ans: Entrepreneurship is the organizing an enterprise to undertake a new production process,
raising capital, arranging labour and raw materials, etc.
3.Entrepreneurs are not job seekers but they create opportunities of employment for people.
(True/False)
Ans. True.
2 MARK QUESTIONS:
1. Explain any two role of entrepreneurs?
Ans. Innovator’s Role: Entrepreneurs innovate by bringing unique and new products and services
into the market.
Risk assumption role: Entrepreneurs are not risk aversive and they realize that taking risks is a part
of business.
Employment Generation role: Entrepreneur solves the problem of unemployment by generating
jobs and employing people.
2. State any two benefits of Entrepreneurship to society.
Ans.
a) Entrepreneurs provide new job opportunities
b) Entrepreneurs increase competition & boost productivity
c) Entrepreneurs create new business & new markets.
d) Entrepreneurs add national income.
e) Entrepreneurs introduce innovative technology and low cost products
59
4. What is meant by Agricultural Entrepreneurship?
Ans. Agricultural Entrepreneurship can be defined as being primarily related to the marketing and
production of inputs and products used in agricultural activities.
10. List any difference between wage employed and self-employed people.
Ans. Wage employed people are people who work for a person or an organization and get paid for
that work.
Self-employed people are those who start businesses to satisfy the needs of people.
60
f) Managerial skills: The Entrepreneur must have right managerial skills so as to handle the group
of people efficiently.
g) Organization building: It implies skills to build an organization. Building an organization is
important part of Entrepreneurship development.
14. What do you think are the important functions of an entrepreneur? Write your answer giving
suitable examples.
Ans.
The functions of an entrepreneur are:
• Making Decisions: An entrepreneur makes decisions every day. This includes what to
produce or sell, how much and where to sell.
• Managing the Business: An entrepreneur plans the future of his or her business. He/she
arranges for raw material, hires people for work, and tells everyone what to do. They also
check if the plan is being followed.
• Divide Income: The entrepreneur divides the business money into many groups. He/she
spends money to buy material, pays rent of the building and salaries to people.
61
• Taking Risk: Risk is the chance of something going wrong. An entrepreneur takes risks
against fires, lost items and theft.
• Create a new Method, Idea, or Product: An entrepreneur is always trying new things. He/she
does this to increase their importance and income.
a. Fulfil Customer Needs – A product or service that people want is referred to as demand.
Entrepreneurs discover what people desire. Then students use their imaginations to come up with
a business plan to address that demand.
b. Use Local Materials – Entrepreneurs produce low-cost items by using the materials and people
available to them.
c. Help Society – Entrepreneurs have a good interaction with the general public. They gain money
by doing things that help society. Some business people donate money to create schools and
clinics, while others work to save the environment.
d. Create Jobs – They buy more material, and from more people. They also hire more people to
work for them. In this way, more people have jobs.
e. Sharing of Wealth – Wealth means having enough money to live a comfortable life. As
entrepreneurs grow their business.
f. Lower Price of Products – The price of a product decreases when more entrepreneurs sell the
same thing. In India, for example, as more mobile phones were sold, the cost of the phone
decreased.
16. List any five qualities of the entrepreneur?
They are confident. They believe in themselves and their abilities.
They keep trying new ideas in their business.
They are patient.
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
17. Write any four Functions of entrepreneurship?
Ans. Planning, organizing, decision making, managing, innovating, risk bearing, etc.
62
18. How do entrepreneurs contribute to society?
Ans. Entrepreneurs contribution to the welfare of society is of high order. A business person apart
from making money for him or herself also helps the society in many ways financially and socially.
Also they contribute in form of donations, sponsorship, welfare programs, advisors to respective
government, etc.
Innovator’s role
Agents’ role
Innovator
Risk Assumption
Capital formation
Employment generation
Ans. Entrepreneurship is becoming the most pursued career choice. The term entrepreneurship is
defined as the type of self-employment where one is running a business and looking for ways to
make the business better to make profits.
21. “Entrepreneurs are born, not made.” Do you agree with this statement? Justify your answer.
Ans. No, this is a myth/misconception about entrepreneurship.
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.
22. Entrepreneurship has a positive impact on society. Write down any two.
Ans.
1. Some of them work towards saving the environment.
2. Some of them give money to build schools and hospitals.
63
Unit 5
GREEN SKILLS
SUSTAINABLE DEVELOPMENT
As the human race progressed, we neglected the vitality of nature in our lives. In pursuit to fulfil our
unending wants we started exploiting the nature that has resulted in what we see today, the
scarcity. There is scarcity of clean water to drink, scarcity of pure air to breathe, scarcity of
unadulterated food, rising issue of global warming, depletion of ozone layer.
64
Everyone in the world today is talking about the measures to curb these rising problems. There are
World Summits being organised to find a solution to these global problems. And the solution to
these problems is only one – SUSTAINABILITY.
Sustainability focuses on how human beings can live in peace and harmony with nature without
creating ecological disturbance. The aim is that we visualize the long term impact of our actions on
environment and take corrosive measures to maintain balance between our demands and the
supply of natural resources.
SUSTAINABLE DEVELOPMENT
Sustainable development focuses on long term, integrated approach to develop a healthy, social
and economically viable society. The aim is to inculcate the value of self-resistance amongst the
people to save natural resources for everyone to utilize judiciously and still ensuring its availability
for future generations.
In our daily life we can contribute to create a Sustainable Society by following 4Rs’ and 1U of
Sustainability. These are REFUSE, REDUCE, REUSE, RECYCLE and UPCYCLE.
REFUSE - Not to use products that may not harm the environment.
REDUCE - To minimize the use of the products that may cause harm to the environment.
65
REUSE - To reuse products as far as possible, in order to reduce the waste generation.
RECYCLE - After reusing the product, we must try to recycle it as far as possible.
UPCYCLE - Any product that is not usable can be upcycled with creativity and innovation. It gives
a new look to the old product and makes it look desirable.
2. Not only for the next generation but even for the existing
generation, the quality of basic resources is deteriorating
leading to major health concerns such as Cancer, Bronchitis etc. Ensuring sustainability will help
curb these problems.
3. Rising demands is leading to economic disparity. The rich is becoming richer while the poor is
becoming poorer. The uneven distribution of available resources across different economic fronts
is leading to discrimination, giving rise to crime and creating
social imbalance. To ensure proper balance Sustainability
is important.
5. Adoption of Sustainable Development in our daily life and at our work place will also promote
economic growth. Young entrepreneurs with minimum investment can produce better output.
Introduction of Solar Power Plants, Waste Water Treatment Plants, Electric Vehicles etc. will not
only help in protecting Environment but shall also contribute in Saving money and resources. The
66
economy that reduces environmental risks and strikes ecological balance is termed as Green
Economy.
1. poverty
2. Zero Hunger
3. Good Health and Well Being
4. Quality Education
5. Gender Equality
6. Clean water and Sanitation
7. Affordable and Clean Energy
8. Decent Work and Economic Growth
9. Industry Innovation and Infrastructure
67
10. Reduced Inequalities
11. Sustainable Cities and Communities
12. Responsible Consumption and Production
13. Climate Action
68
3. With the existing issues of climate change, number of species has extinct and many are on verge
of their extinction. Under such circumstances striking a balance in the food chain is a big
responsibility.
4. The market all over the world is trying to capture as many resources as possible to maximize
their profit. In pursuit of maximising the profit they overuse and exploit the resources.
5. In the time of nuclear race, where every developing country is trying its hand to become
developed nation, ensuring world peace is a global challenge.
6. It is the responsibility of every country to ensure having a full proof policy towards Sustainable
Development. While the challenge remains that many are simply leaving loose ends in the
execution of policies.
7. Last but most important, while it is the responsibility and accountability of every individual to
promote Sustainable Development, there is a huge world population which is simply insensitive
towards its need.
QUESTIONS
1 mark QUESTIONS
17
3. Give any one practice / sustainable process that is being used to help preserve the
environment.
69
The Sustainable Development Goals (SDGs) are a universal call of action to end
poverty, protect the planet, and ensure that all people enjoy peace and prosperity.
Food and nutrition security, safe drinking water, energy security, and waste
management.
Any product that is not usable can be upcycled with creativity and innovation to
give a new look to an old product, this helps in sustainable development.
REFUSE implies refusing use of those products which may cause harm to
environment.
DESCRIPTIVE (2 MARKS)
1. Enumerate any two initiatives through which we can reduce inequalities in our
society
• Using solar power i.e., power generated using the sun does not cause
pollution as it does not require burning of non-renewable fuels, such as
coal.
• Use of biogas is also an eco-friendly alternative to natural gas.
3. ‘Reduced Inequalities’ is one of the Sustainable development goals set by the UN.
Give any two ways to reduce inequalities.
70
• Be helpful to one another.
• be friendly with everyone
4. What are the problems related to sustainable development? Discus any two.
• Food: Large areas of rich, fertile land needed to grow crops, which is
becoming less as we are using up more and more land for other purposes –
cities, roads, airports, industries, etc. Soil nutrients are also getting depleted
and lots of chemicals are spoiling the soil due to use of chemical fertilizers.
• Water: We use fresh water from rivers and ponds for drinking and cleaning
but dump garbage into them. The rivers and ponds are getting polluted.
This way after several years, we will have no clean water for our use.
• Fuel: We are using a lot of wood from trees as fuels and for construction of
homes and furniture. As more and more trees are being cut, it is affecting
the climate of the place. Extreme weather conditions, such as floods,
extreme cold or heat, are seen in many places, which affect the people
living there.
5. Briefly explain importance of sustainable development.
• It will ensure that resources like air, water, forests are saved to future
generation.
• Problems like Climate Change, Emission of Green House gases can be
taken care of with the help of Sustainable Development.
• Adoption of Sustainable Development in our daily life and at our work place
will also promote economic growth.
71
INTRODUCTION TO ARTIFICIAL INTELLIGENCE
Humans developed machines to make their lives easier to accomplish tasks which are too tedious
or are time consuming. Therefore humans put efforts in making the machines more sophisticated
and smart.
Children are asked to compare old TV and smart TVs. How they differ in their working.
Similarly Old phones and smartphones are compared, to understand about latest facilities in smart
phones.
ARTIFICIAL INTELLIGENCE:
Artificial is something which is man-made, which does not occur naturally.
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.’
ARTIFICIAL INTELLIGENCE
ARTIFICIAL INTELLIGENCE
HUMAN INTELLIGENCE:
72
Any device that can perform the above, can be termed as intelligent device.
When a machine possesses the ability to mimic human traits i.e make decisions, predict the future,
learn and improve on its own by collecting data, understand it, analyse it , learn from it and improve
it, it is said to have Artificial Intelligence. Machines become intelligent once they are trained with
data and algorithm.
73
There are mainly 9 types of Intelligence :-
74
Exercise – 1 :
Teachers can list out some professions and ask students to identify the type of intelligence used in
their professions.
For Eg:
75
Lawers : Linguistic Intelligence
Musicians : Musical Intelligence
Architect : Mathematical, Logical Reasoning
Exercise – 2 :
Allow students to check on, the type of intelligence used by them, when they are exposed to
various scenarios.
Identify and list the intelligence types that you have in descending order.
What is Intelligence? Explain in brief any three types of intelligence that are mainly perceived by
human beings?
76
With the use of big data, AI in E-Commerce is impacting customer choices by recording the data
of previous purchases, searched products, and online browsing habits.
d. Navigate to Places:
To help us navigate to places, apps like UBER and Google Maps exist. Thus, one no longer needs
to stop to ask for directions.
e. Improved Gaming Experience:
AI has changed the world of gaming by making the game more intelligent with enhanced graphics,
providing the ability to learn using machine learning algorithms. Games, understand human
patterns and give responses to new difficulty levels. AI can adapt to your playing style by making
the game more exciting.
f. Platforms that provide recommendations:
Platforms like Netflix, Amazon, Spotify, YouTube etc. show us recommendations on the basis of
what we like. They even cater to needs of connecting with friends on social media platforms with
apps like Facebook and Instagram. They also send us customized notifications about our online
shopping details, auto-create playlists according to our requests and so on. Taking selfies with
Snapchat filters are all possible now.
g. Monitor Health:
AI is also being used to monitor our health. Chatbots and other health apps are available, which
continuously monitor the physical and mental health of its users.
The humanoids like Sophia, to get citizenship, biometric security systems like the face locks in
phones, real-time language translators, weather forecasts, all use AI.
AI, ML & DL :
78
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.
DL is a ML algorithm that
AI is a computer algorithm ML is an AI algorithm which uses deep (more than one
which exhibits intelligence allows system to learn from layer) neural networks to
through decision making. data. analyze data and provide
output accordingly.
79
It attains the highest rank in
The aim is to basically The aim is to increase
terms of accuracy when it is
increase chances of accuracy not caring much
trained with large amount of
success and not accuracy. about the success ratio.
data.
DL can be considered as
neural networks with a large
Three broad number of parameters layers
categories/types Of AI are: Three broad lying in one of the four
Artificial Narrow categories/types Of ML are: fundamental network
Intelligence (ANI), Artificial Supervised Learning, architectures: Unsupervised
General Intelligence (AGI) Unsupervised Learning and Pre-trained Networks,
and Artificial Super Reinforcement Learning Convolutional Neural
Intelligence (ASI) Networks, Recurrent Neural
Networks and Recursive
Neural Networks
Examples of AI
applications include: Examples of ML applications Examples of DL applications
Google’s AI-Powered include: Virtual Personal include: Sentiment based
Predictions, Ridesharing Assistants: Siri, Alexa, news aggregation, Image
Apps Like Uber and Lyft, Google, etc., Email Spam analysis and caption
Commercial Flights Use an and Malware Filtering. generation, etc.
AI Autopilot, etc.
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 categorized into
three domains:
80
a. Data Sciences
Data sciences is a domain of AI related to data systems and processes. 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.
Example of Data Science:
Price Comparison Websites
These websites are being driven by lots of data giving us the convenience of comparing the price
of a product from multiple vendors at one place.
PriceGrabber, PriceRunner, Junglee, Shopzilla, DealTime are some examples of price
comparison websites.
b. Computer Vision
Computer Vision (CV) , is a domain of AI that depicts the capability of a machine to get and analyze
visual information and predict some decisions about it. The entire process involves image
acquiring, screening, analyzing, identifying and extracting information. This extensive processing
helps computers to understand any visual content and act on it accordingly.
81
In computer vision, Input to machines can be photographs, videos and pictures from thermal or
infrared sensors, indicators and different sources.
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.
Examples of Computer Vision
Self-Driving cars/ Automatic Cars
CV systems scan live objects and analyse them, based on whether the car decides to keep running
or to stop.
Face Lock in Smartphones
Smartphones come with the feature of face locks in which the smartphone’s owner can set up
his/her face as an unlocking mechanism for it. The front camera detects and captures the face and
saves its features during initiation. Next time onwards, whenever the features match, the phone is
unlocked.
c. Natural Language Processing
Natural Language Processing (NLP) , is a branch of artificial intelligence that deals with the
interaction between computers and humans using the natural language.
Natural language refers to language that is spoken and written by people, and natural language
processing (NLP) attempts to extract information from the spoken and written word using
algorithms.
The ultimate objective of NLP is to read, decipher, understand, and make sense of the human
languages in a manner that is valuable.
It has two main components:
Natural Language Understanding (NLU): It is used for spoken or written language to provide a
link between natural language inputs and what they present. It analyzes different aspects of
language.
Natural Language Generation (NLG): It helps to produce meaningful phrases and sentences
along with Text planning, Sentence Planning, and Text realization.
Examples of Natural Language Processing
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.
Smart assistants
Smart assistants like Apple’s Siri and Amazon’s Alexa recognize patterns in speech, then infer
meaning and provide a useful response.
82
Pick the odd one out and justify your answer:
a. Snap Chat Filter
b. Face Lock in Phone
c. Chatbot
d. Image search Option
Answer: Chatbot, as it is NLP based, the other three are Computer vision based
We nowadays have pocket assistants that can do a lot of tasks at just one command. Alexa, Google
Assistant, Cortana, Siri are some very common examples of the voice assistants which are a major
part of our digital devices.
To help us navigate to places, apps like UBER and Google Maps come in there. Thus, one no
longer needs to stop repeatedly to ask for directions.
AI has completely enhanced the gaming experience for its users. A lot of games nowadays are
backed up with AI which helps in enhancing the graphics, come up with new difficulty levels,
encourage gamers, etc.
83
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.
AI is also being used to monitor our health. A lot of chatbots and other health apps are available,
which continuously monitor the physical and mental health of its users.
These applications are not limited to smart devices but also vary to humanoids like Sophia, the
very first humanoid robot sophisticated enough to get citizenship, biometric security systems like
the face locks we have in our phones, real-time language translators, weather forecasts, and
whatnot! This list is huge, and this module will go on forever if we keep tabulating them. So, take
some time, discuss with a friend and identify more and more AI applications around you!
AI Ethics
AI ethics is a set of values, principles and techniques that employee widely accepted standards of
right and wrong to guide moral conduct in the development and use of AI technology.
AI Bias and AI Access
Bias means inclination or prejudice for or against one person or group, especially in a way
considered to be unfair. When AI programs, tool, and algorithm exhibit any kind of bias, it is called
AI bias.
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
84
AI Project Cycle
Let us take some daily examples as projects, requiring steps to solve the problem.
Creating a birthday card.
1. Checking the factors like budget, etc which will help us decide the next steps and
understanding the Project.
2. Acquiring data from different sources like online, with friends etc for Designs and ideas.
3. Making a list of the gathered data.
4. Creating or modelling a card on the basis of the data collected.
5. Showing it to Parents or cousins to let them check it or evaluate it.
1. Problem Scoping
Problem Scoping refers to understanding a problem, finding out various factors which affect the
problem, define the goal or aim of the project.
The Sustainable Development Goals (SDGs), also known as the Global Goals, were adopted by
all United Nations Member States in 2015 as a universal call to action to end poverty, protect the
planet, and ensure that all people enjoy peace and prosperity
85
4 W's of Problem Scoping
4 Problem Statement Template
The 4W’s of Problem Scoping are Who, What, Where, and Why.
This W’s helps in identifying and understanding the problem in a better and efficient manner.
❖ Who - “Who” part helps us in comprehending and categorizing who all are affected directly
and indirectly with the problem and who are called the Stake Holders.
❖ What - “What” part helps us in understanding and identifying the nature of the problem and
under this block, you also gather evidence to prove that the problem you have selected
exists.
❖ Where - "Where” does the problem arise, situation, context, and location?
❖ Why - “Why” is the given problem worth solving?
Ideal Solution How the solution will help the stakeholders Why
2. Data Acquisition
The process of collecting accurate and reliable data to work with.
86
Two types of Data Sets
Base Training set Testing set
Use Used for Training the model Used for Testing the model after it is
trained
Size Is allot bigger than testing data It is smaller than Training set and
and constitutes about 70% to 80% constitutes about 20% to 30%
Data Features
o Refer to the type of data you want to collect.
o Eg: Salary amount, increment percentage, increment period, bonus etc.
Big data
o It includes data with sizes that exceed the capacity of traditional software to process within
an acceptable time and value.
o The main focus is on unstructured type of data
• Volume
• Amount of data produced
• Variety
Big Data • Types of data produced
• Velocity
• Speed of data produced
❖ Web Scraping
• Web Scraping means collecting data from web using some technologies.
• We use it for monitoring prices, news and etc.
• Example: Web Scrapping using beautiful soup in python.
❖ Sensors
• Sensors are very important but very simple to understand.
• Sensors are the part of IoT (Internet of things)
• Sensors collect the physical data and detect the changes.
❖ Cameras
• Camera captures the visual information and then that information which is called image is
used as a source of data.
• Cameras are used to capture raw visual data.
❖ API
• Application Programming interface.
• API is a messenger which takes requests and tells the system about requests and gives the
response.
• Ex: Twitter API, Google Search API
❖ Observations
• When we observe something carefully, we get some information
• For ex: Scientists Observe creatures to study them.
• Observations are a time-consuming data source.
❖ Surveys
• The survey is a method of gathering specific information from a sample of people.
• Example, a census survey for analysing the population
87
3. Data Exploration
In this stage of project cycle, we try to interpret some useful information out of the data we have
acquired. For this purpose, we need to explore the data and try to put it uniformly for a better
understanding. This stage deals with validating or verification of the collected data and to analyze
that:
➢ The data is according to the specifications decided.
➢ The data is free from errors.
➢ The data is meeting our needs
This stage is divided into 2 sub stages.
1) Data Cleaning
2) Data Visualization.
Data Cleaning
Data cleaning helps in getting rid of commonly found errors and mistakes in a data set. These are
the 3 commonly found errors in data.
1) Outliers: Data points existing out of the range.
2) Missing data: Data points missing at certain places.
3) Erroneous data: Incorrect data points.
Outliers
An outlier is a data point in a dataset that is distant from
all other observations.
or
An outlier is something that behaves differently from
the combination/ collection of the data.
Missing Data
What do these NaN values indicate? They
are the missing values in the data set. We
can handle them in two ways:
1. By eliminating the rows of missing values.
(Generally, not recommended as it might reduce the
data set to some extent leading to less data to be
trained)
2. By
using an Imputer to find the best possible
substitute to replace missing values.
Erroneous Data
88
Erroneous data is test data that falls outside of what is acceptable and should be rejected by the
system.
Student Name Class
RIYA GEORGE XA
JOSHUA SAM XA
APARNA BINU XA
SIDHARDH V R XA
NITHILA M 57
ATHULYA M S XA
ANUJA MS XB
KEERTHI
XB
KRISHNANATH
Data Visualization
Why we need to explore data through visualization?
1) We want to quickly get a sense of the trends, relationships, and patterns contained within
the data.
2) It helps us define strategy for which model to use at a later stage.
3) Visual representation is easier to understand and communicate to others.
Example:
89
Data Visualization Techniques
1. Area Graphs
Area Graphs are Line Graphs but with the area below the
line filled in with a certain colour or texture. Like Line
Graphs, Area Graphs are used to display the
development of quantitative values over an interval or time
period. They are most commonly used to show trends, rather
than convey specific values.
2. Bar Charts
The classic Bar Chart uses either horizontal or vertical bars
(column chart) to show discrete, numerical comparisons
across categories. Bars Charts are distinguished from
Histograms, as they do not display continuous
developments over an interval. Bar Chart's discrete data is
categorical data and therefore answers the question of "how
many?" in each category.
3. Histogram
A Histogram visualizes the distribution of data over a
continuous interval or certain time period. Each bar in a
histogram represents the tabulated frequency at each
interval/bin. Histograms help give an estimate as to
where values are concentrated, what the extremes are and
whether there are any gaps or unusual values.
4. Line Graphs
Line Graphs are used to display quantitative values over
a continuous interval or time period. A Line Graph is most
frequently used to show trends and analyze how the data has
changed over time. Line Graphs are drawn by first
plotting data points on a Cartesian coordinate grid, then
connecting a line between all of these points. Typically, the
y-axis has a quantitative value, while the x-axis is a
timescale or a sequence of intervals. Negative values can
be displayed below the x-axis.
5. Pie Charts
Pie Charts help show proportions and percentages between categories, by dividing a circle into
proportional segments. Each arc length represents a proportion of each category, while the full
90
circle represents the total sum of all the data, equal to 100%. Pie Charts are ideal for giving the
reader a quick idea of the proportional distribution of the data.
6. Scatterplots
Scatterplots use a collection of points placed using
Cartesian Coordinates to display values from two
variables. By displaying a variable in each axis, you can detect
if a relationship or correlation between the two variables exists.
7. Flow Charts
This type of diagram is used to show the sequential steps
of a process. Flow Charts map out a process using a
series of connected symbols, which makes the process easy
to understand and aids in its communication to other
people. Flow Charts are useful for explaining how a
complex and/or abstract procedure, system, concept or
algorithm work. Drawing a Flow Chart can also help in
planning and developing a process or improving an
existing one.
4. Modelling
It’s the fourth stage of AI project cycle. In previous stage, i.e. graphical representation makes
the data understandable for humans as we can discover trends and patterns out of it.
91
But when it comes to machines accessing and analyzing 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.
Generally, AI models can be classified as follows:
Rule Based
AI Models
Machine Learning
Learning Based
Deep Learning
data
Rule based approach answers
rules
Thus, machine learning gets introduced as an extension to this as in that case, the machine
adapts to change in data and rules and follows the updated path only, while a rule-based model
does what it has been taught once.
data
Learning based approach rules
answers
92
After training, the machine is now fed with testing data. Now, the testing data might not have similar
images as the ones on which the model has been trained. So, the model adapts to the features
on which it has been trained and accordingly predicts the output.
In this way, the machine learns by itself by adapting to the new data which is flowing in.
This is the machine learning approach which introduces the dynamicity in the model.
Generally, learning based models can be classified as follows:
Dimensionality
Regression Classification Clustering
Reduction
I. Supervised Learning
In a supervised learning model, the dataset which is fed to the machine is labelled. In other
words, we can say that the dataset is known to the person who is training the machine only then
he/she is able to label the data. A label is some information which can be used as a tag for data.
For example, students get grades according to the marks they secure in examinations. These
grades are labels which categorize the students according to their marks.
There are two main types of supervised learning models:
Regression
Supervised
Learning
Classification
a) Classification
In this model, data is classified according to the labels. For
example, in the grading system, students are classified on the basis of
the grades they obtain with respect to their marks in the
examination. This model works on discrete dataset which means
the data need not be continuous.
93
b) Regression
This model work on continuous data. For example, if you wish
to predict your next salary, then you would put in the data of your
previous salary, any increments, etc., and would train the model.
Here, the data which has been fed to the machine is
continuous.
Clustering
Unsupervised
Learning
Dimensionality
Reduction
a) Clustering
It refers to the unsupervised learning algorithm which can cluster
the unknown data according to the patterns or trends identified out of
it. The patterns observed might be the ones which are known to the
developer or it might even come up with some unique patterns out of
it.
b) Dimensionality Reduction
We humans are able to visualize up to 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
visualize them as they exist beyond our visualization ability.
Hence, to make sense out of it, we need to reduce their
dimensions. Here, dimensionality reduction algorithm is used.
94
III. Reinforcement Learning
It a type of machine learning technique that enables an agent(model) to learn in an interactive
environment by trial and error using feedback from its own actions and experiences. Though both
supervised and reinforcement learning use mapping
between input and output, unlike supervised learning
where feedback provided to the agent(model) is correct
set of actions for performing a task,
reinforcement learning uses rewards and
punishment as signals for positive and negative
behavior. Reinforcement learning is all about making
decisions sequentially.
5. Evaluation
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. i.e. oonce 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.
The efficiency of the model is calculated on the basis of the parameters mentioned below:
1. Accuracy
Accuracy is
defined as
the
percentage of correct predictions out of all the observations.
2. Precision
Precision is defined as the percentage of true positive cases versus all the cases where the
prediction is true.
3. Recall
Recall is defined as the fraction of positive cases that are correctly Identified.
4. F1 score
The F1 score is a number between 0 and 1 and is the harmonic mean of precision and recall
95
Questions
1 mark Questions
1) Which of the following is correct about the rule-based approach?
a. We cannot provide enough rules to the machine.
b. A drawback/feature for this approach is that the learning is static.
c. Once the rules are fed into the system, it takes into consideration any changes
made in the original training dataset.
d. It can improve itself based on the feedbacks.
4) Assertion (A): We can use histograms when data is in categories (such as "Pop",
"Rock", ”Jazz”, ”Hip-Hop” etc.)
Reason (R): We use bar charts when we have continuous data (such as a person's height or
weight)
a. (A) is false but (R) is true
b. (A) is true but (R) is false
c. Both (A) and (R) are true
d. Both (A) and (R) are false
5) Choose the correct option
a. Unsupervised learning ->labelled dataset, Regression
b. Supervised learning -> labelled data set, Regression
c. Unsupervised learning ->unlabelled dataset, Classification
d. Supervised learning -> unlabelled data set, Regression
6) Data about the houses such as square footage, number of rooms, features,
whether a house has a garden or not, and the prices of these houses, i.e., the
corresponding labels are fed into an AI machine. By leveraging data coming from thousands
of houses, their features and prices, we can now train the model to predict a new house’s
price. This is an example of
a) Reinforcement learning
b) Supervised learning
c) Unsupervised learning
96
d) None of the above
97
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.
13) Differentiate between Prediction and Reality.
a) Prediction is the input given to the machine to receive the expected result of the reality.
b) Prediction is the output given to match the reality.
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.
d) Prediction and reality both can be used interchangeably.
14) Which of the following statements is true for the term Evaluation?
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.
15) Which of the following is not part of the AI Project Cycle?
a) Data Exploration
b) Modelling
c) Testing
d) Problem Scoping
16) ________________________ refers to the AI modelling where the machine learns by
itself.
a) Learning Based
b) Rule Based
c) Machine Learning
d) Data Sciences
17) Define the term Machine Learning. Also give 2 applications of Machine Learning in our
daily lives.
98
a) Pixel it activity
b) Decision trees
c) Histogram
d) Illustration diagram
21) Match the best choice of graph for the data below.
1. Chart to show the number of students in a school over past 5 years.
2. Chart to show the temperature on each day of the week.
3. Chart to show percentage of each sale of ticket type at a concert
99
28) ____________ is one of the types supervised learning model, where data is classified
according labels and data need not be continuous.
[CBSE TERM-1 2021]
a) Regression
b) Clustering
c) Classification
d) Dimensionality reduction
31) 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.
Therefore, it must be followed by: [CBSE TERM-1 2021]
a) Problem Scoping c) Data Acquisition
b) Data Exploration d) Modelling
32) Classification and regression are _______________ , and approach followed is
_______________ [CBSE TERM-1 2021]
a) Supervised, Learning c) Unsupervised, Learning
b) Reinforcement, Learning d) Supervised, rule-based
33) ________ refers to the unsupervised learning algorithm which can cluster the unknown
data according to the patterns or trends identified out of it.
[CBSE TERM-1 2021]
a) Regression c) Classification
e) Clustering d) Dimensionality reduction
34) Accuracy, Recall, Precision, F1 Score are the parameters to calculate the efficiency under
__________ [CBSE TERM-1 2021]
a) Data Acquisition c) Data Evaluation
b) Data Testing d) Data Modelling
35) Assertion(A): The training data should be authentic and relevant to the problem statement
scoped. [CBSE TERM-1 2021]
Reason(R): It increases the AI project efficiency.
a) Both A and R are true, and R is the correct explanation of A.
b) Both A and R are true, but R is not the correct explanation of A.
c) A is true but R is false.
100
d) A is false but R is true.
36) Which type of graphical representation suits best for continuous type of data
like monthly exam scores of a student?
2 Mark Questions
37) What are the two different approaches for AI modelling? Define them
38) Draw the graphical representation of Classification AI model. Explain in brief.
39) Draw the graphical representation of Regression AI model. Explain in brief
40) Draw the graphical representation of Clustering AI model. Explain in brief.
41) Explain Data Exploration stage
3 Mark questions
42) Differentiate between rule-based and learning-based AI modelling approaches.
43) Explain the following:
a. Supervised Learning b. Unsupervised Learning
44) Differentiate between classification and clustering algorithms with the help of suitable
examples.
101
NATURAL LANGUAGE PROCESSING
INTRODUCTION
Computers can understand the structured form of data like spreadsheets and the tables
in the database, but human languages, texts, and voices form an unstructured category
of data, and it gets difficult for the computer to understand it, and there arises the need
for Natural Language Processing.
A usual interaction between machines and humans using Natural Language Processing
could go as follows:
Humans talk to the computer
The computer captures the audio
There is an audio to text conversion
Text data is processed
Data is converted to audio
The computer plays the audio file and responds to humans
1.Chatbots
3.Voice Assistants
These days voice assistants are all the rage! Whether its Siri, Alexa, or Google Assistant,
almost everyone uses one of these to make calls, place
reminders, schedule meetings, set alarms, surf the internet, etc.
These voice assistants have made life much easier. But how do
they work? They use a complex combination of speech
recognition, natural language understanding, and natural
language processing to understand what humans are saying and
then act on it. The long term goal of voice assistants is to become
a bridge between humans and the internet and provide all manner of services based on
just voice interaction. However, they are still a little far from that goal seeing as Siri still
can’t understand what you are saying sometimes!
4.Language Translator
Want to translate a text from English to Hindi but don’t know Hindi? Well, Google Translate
is the tool for you! While it’s not exactly 100% accurate, it is still
a great tool to convert text from one language to another.
Google Translate and other translation tools as well as use
Sequence to sequence modeling that is a technique in Natural
Language Processing. It allows the algorithm to convert a
sequence of words from one language to another which is
translation. Earlier, language translators used Statistical machine translation (SMT)
which meant they analyzed millions of documents that were already translated from one
language to another (English to Hindi in this case) and then looked for the common
patterns and basic vocabulary of the language. However, this method was not that
accurate as compared to Sequence to sequence modeling.
103
5.Sentiment Analysis
6.Grammar Checkers
Grammar and spelling is a very important factor while writing professional reports for your
superiors and even assignments for your lecturers. After all, having
major errors may get you fired or failed! That’s why grammar and spell
checkers are a very important tool for any professional writer. They can
not only correct grammar and check spellings but also suggest better
synonyms and improve the overall readability of your content. And
guess what, they utilize natural language processing to provide the best
possible piece of writing! The NLP algorithm is trained on millions of
sentences to understand the correct format. That is why it can suggest the correct verb
tense, a better synonym, or a clearer sentence structure than what you have written.
Some of the most popular grammar checkers that use NLP include Grammarly,
WhiteSmoke, ProWritingAid, etc.
Emails are still the most important method for professional communication. However, all
of us still get thousands of promotional Emails that we don’t want to read.
Thankfully, our emails are automatically divided into 3 sections namely,
Primary, Social, and Promotions which means we never have to open
the Promotional section! But how does this work? Email services use
natural language processing to identify the contents of each Email with text
classification so that it can be put in the correct section. This method
is not perfect since there are still some Promotional newsletters in
Primary, but it’s better than nothing. In more advanced cases, some companies also use
specialty anti-virus software with natural language processing to scan the Emails and see
if there are any patterns and phrases that may indicate a phishing attempt on the
employees.
8. Text Summarization
104
Text summarization is the process of creating a shorter version of the text with only vital
information and thus, helps the user to understand the text in a shorter amount of time.
The main advantage of text summarization lies in the fact that it reduces user’s time in
searching the important details in the document.
There are two main approaches to summarizing text documents –
1. Extractive Method: It involves selecting phrases and sentences from the original
text and including it in the final summary.
Example:
Original Text: Python is a high-level, interpreted, interactive, and object-oriented
scripting language. Python is a great language for the beginner-level programmers.
Extractive Summary: Python is a high-level scripting language is great language for
beginner-level programmers.
2. Abstractive Method: The Abstractive method involves generating entirely new
phrases and sentences to capture the meaning of source document.
Example:
Original Text: Python is a high-level, interpreted, interactive, and object-oriented
scripting language. Python is a great language for the beginner-level programmers
Abstractive Summary: Python is interpreted and interactive language and it is easy
to learn.
1. Text Classification
Texts are a form of unstructured information that possesses very prosperous
records inside them. Text Classifiers categorize and arrange exceptionally a
great deal with any form of textual content that we use currently. 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. For example, an application of text categorization is spam filtering in
email. A very fundamental key and remarks for commercial enterprise would be
how their merchandise is touching their meant buyers and Text Classification
offers solutions to enterprise questions with the aid of classifying people’s
opinions on the stated brand, price, and aspects.
Questions
105
5 I used to identify opinions online to help what customers think about
the products and services. Who am I?
INTRODUCTION TO CHATBOTS
Chatbots is a computer program designed to simulate conversation with human users,
especially over the internet powered by Artificial intelligence.
Eg:
Mitsuku Bot
https://www.pandorabots.com/mitsuku/
https://www.cleverbot.com/
• Jabberwacky*
http://www.jabberwacky.com/
`
• Haptik*
https://haptik.ai/contact-us
• 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/
106
Types of Chatbots
1. Simple Chatbot (Script bots)
2. Smart Chatbots (AI based Smart bots)
2. The sound reaches the brain through a long 2. While typing, if a single mistake is
channel. As a person speaks, the sound made, the computer throws an
travels from his mouth and goes to the error and does not process that
107
listener’s eardrum. The sound striking the part. The communications made
eardrum is converted into neuron impulses, by the machines are very basic
gets transported to the brain, and then gets and simple.
processed.
3. After processing the signal, the brain gains 3. Now, if we want the machine to
an understanding of its meaning of it. If it is understand our language, how
clear, the signal gets stored. Otherwise, the should this happen? What are the
listener asks for clarity from the possible difficulties a machine
speaker. This is how human languages would face in processing natural
are processed by humans. language? Let us take a look at
some of them here:
• There are rules in human language. There are nouns, verbs, adverbs, and adjectives. A word
can be a noun at one time and an adjective some other time. There are rules to provide structure
to a language.
• 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.
1. His face turned red after he found out that he had taken the wrong bag
o 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?
2. The red car zoomed past his nose
o Probably talking about the colour of the car, that travelled close to him in a flash.
3. His face turns red after consuming the medicine
o Is he having an allergic reaction? Or is he not able to bear the taste of that
medicine?
Sample Questions
1. Which of these chatbots is/are not AI based 1
a) Script bot b) Smart bot c) Hybrid bot d) None of these
Answers
1 A) Script bot
2 AskDISHA 2.0
Activity
1. List some statements with syntax and same semantics and vice-versa.
2. Enact the Smartbot in the class. Incorporate the communication skills.
Text Normalisation is a process to reduce the variations in text’s word forms to a common form
when the variation means the same thing.
Text Normalisation
He visited Goa
he visited goa
Normalize Text he visited goa
HE VISITED GOA
hE vISItED GoA
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:
1. Sentence Segmentation
Under sentence segmentation, the whole text is divided into individual sentences.
Eg
• Hello world.
Hello world. AI is fun to know. It • AI is fun to know.
has started impacting our lives • It has started impacting our
in many ways. Many more lives in many ways.
revolutionary technologies will • Many more revolutionary
soon evolve out of it. technologies will soon
evolve out of it.
110
2. 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.
These words occur the most in any given sentence 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, the sentence might have special characters and/or numbers. Now it
depends on the type of sentence in the documents 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
111
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 stop words.
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.
5. 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.
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.
112
6. 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.
With this we have normalised our text to tokens which are the simplest form of words. Now it is
time to convert the tokens into numbers. For this, we would use the Bag of Words algorithm
113
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:
1. A vocabulary of words for the corpus
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.
Here is the step-by-step approach to implement bag of words algorithm:
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.
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.
Step 4: Repeat for all documents
Same exercise has to be done for all the documents. Hence, the table becomes:
115
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.
116
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 stop words, 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.
TFIDF stands for Term Frequency and Inverse Document Frequency.
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.
117
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, 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:
118
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:
Total Number of documents: 10
Number of documents in which ‘and’ occurs: 10
Therefore, IDF(and) = 10/10 = 1
Which means: log (1) = 0. Hence, the value of ‘and’ becomes 0.
On the other hand, number of documents in which ‘pollution’ occurs: 3
IDF(pollution) = 10/3 = 3.3333…
Which means: log (3.3333) = 0.522; which shows that the word ‘pollution’ has considerable value
in the corpus.
Summarising the concept, we can say that:
1. Words that occur in all the documents with high term frequencies have the least values and
are considered to be the stop words.
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.
4.
Applications of TF-IDF
1. Document Classification: TF-IDF helps in classifying the type and genre of a
document by looking at the frequencies of words in the text. Based on the TF-IDF
values, it is easy to classify emails as spam or ham, to classify news as real or fake
and so on.
2. Topic Modelling: It helps in predicting the topic for the corpus. Topic modelling refers
to a method of identifying short and informative descriptions of a document in a large
collection that can further be used for various text mining tasks such a summarisation,
document classification etc.
3. Key word Extraction: It is also useful for extracting keywords from text.
4. Information Retrieval System: To extract the important information out of a corpus.
119
5. Stop word Filtering: It helps in removing unnecessary words out of a text body.
NLTK is a leading platform for building Python programs to work with human language data. It
provides easy-to-use interfaces to over 50 corpora and lexical resources such as WordNet, along
with a suite of text processing libraries for classification, tokenization, stemming, tagging, parsing,
and semantic reasoning, wrappers for industrial-strength NLP libraries, and an active discussion
forum.
NLTK is suitable for linguists, engineers, students, educators, researchers, and industry users
alike. NLTK is available for Windows, Mac OS X, and Linux. Best of all, NLTK is a free, open
source, community-driven project.
NLTK has been called “a wonderful tool for teaching, and working in, computational linguistics
using Python,” and “an amazing library to play with natural language.”
Natural Language Processing with Python provides a practical introduction to programming for
language processing. Written by the creators of NLTK, it guides the reader through the
fundamentals of writing Python programs, working with corpora, categorizing text, analyzing
linguistic structure, and more.
Installing NLTK
Mac/Unix
Windows
These instructions assume that you do not already have Python installed on your machine.
120
After installing the NLTK package, please do install the necessary datasets/models for specific
functions to work.
If you’re unsure of which datasets/models you’ll need, you can install the “popular” subset of
NLTK data, on the command line type python -m nltk.downloader popular, or in the Python
interpreter import nltk; nltk.download('popular')
For details, see https://www.nltk.org/data.html
****************************************************************************************************
Raj likes to play footbal but Vijay prefer t pla onlin game
l s o y e s
The above example consists of three documents having one sentence each. After text
normalization, the text would be:
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.
Dictionary:
In this step, the repeated words are written just once and we create a list of unique words.
122
Term Frequency
• The formula is
123
Total Number of documents: 10
This means log(3.3333) = 0.522; which shows that the word ‘pollution’ has considerable
value in the corpus
********************************************************************************************
Activity-2) Through a step-by-step process, calculate TFIDF for the given corpus
1. Create document vectors for the given documents (Term Frequency Table)\
124
2. Record the occurrence of the word in the document using term frequency table
(Document Frequency Table)
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:
4. The formula of TFIDF for any word W becomes: TFIDF(W) = TF(W) * log (IDF(W))
125
MCQ (Answers are bolded)
6. ……………………………… are the words in any language which do not add much
meaning to a sentence. They can safely be ignored without sacrificing the meaning of
the sentence.
126
a) Syntax b) Semantics c) Tokens d) Stop words
7. The process of extracting the root form of the word is known as ……………………………
10. ………………………. Is the process of converting a word to its actual root form as per
the language.
a) Tokenisation b) Stemming c) Lemmatisation d) Segmentation
11. The words extracted through lemmatisation are called ………………………...
a) tokens b) lemmas c) stems d) all of these
12. A …………………………. Is the base form of all its inflectional forms, whereas a stem
isn’t
a) Token b) lemma c) stem d) all of these
13. Regular dictionaries contain ……………………...
a) Token b) lemmas c) stem d) affixes
14.A……………………………... is a model used for extracting features from
text for use in AI based modelling.
a) bag of words b) Text Normalisation
c) Sentence segmentation d) None of these
127
Text normalisation is the process to reduce the variations in text’s word forms to a common
form when the variations mean the same thing.
2. What is a corpus?
The whole collection of words from all the documents being processed is called corpus.
3. What is tokenisation?
Tokenisation is the process of splitting up individual sentences into smaller units called
token.
4. What are stop words?
Stop words are words in any language which do not add much meaning
to a sentence.
5. What do you mean by stemming?
The process of extracting the root form of the word by removing affixes
is known as stemming.
6. What is lemmatisation?
It is the process of converting a word to its actual root form linguistically.
7. What is case normalisation?
Case normalisation refers to conversion of all the words in the same
case. (often lower case)
8. What is Bag – of-words?
Bag – of-words is a model used for extracting features from text for use in
modelling, with many AI algorithms.
9. What is TF-IDF?
TF-IDF is a statistical measure that evaluates how relevant a word is to
a document in a collection of documents.
10 What does TF-IDF refer to?
TF-IDF refers Term Frequency-Inverse Document Frequency
11. What is TF?
TF (Term Frequency) ia the frequency of a word in the document
12. What is IDF?
IDF (Inverse Document Frequency) refers to how common a rare word is in the entire
document set
13. What will be the output of the word “studies” if we do the following?
a) Lemmatization b) Stemming
Ans: a) study b) studi
14. How many tokens are there in the sentence given below?
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.
Ans: 46 tokens
128
15. Identify the stop words in the given sentence:
Pollution is the introduction of contaminants into the natural environment that cause
adverse change. The three types of pollution are air pollution, water pollution and land
pollution.
Stem is the root word generated by stemming process and the lemma is the root word
generated by lemmatisation process.
Stemming and Lemmatisation both generate the foundation sort of the inflected words, but the
difference between a stem and a lemma is that a stem may not be an actual word in the
dictionary, whereas, a lemma is an actual language word.
129
2. What is lemmatisation?
Lemmatisation is very similar to stemming, where the goal is to remove inflections from the
word and map a word to its root form. But unlike stemming, lemmatisation tries to do it the
proper way. It doesn’t just chop things off, it actually transforms words to the actual root, a
real word in dictionary. The reduced forms resulting out of lemmatisation are called lemmas.
For example, in lemmatisation the word “studied” get reduced to its lemma ‘study’ similarly, the
word ‘advisable’ gets reduced to its lemma ‘advise’.
4. What is NLTK?
NLTK is a Python Package that you can use for NLP.It is a platform used for building Python
programs that work with human language data for applying in statistical natural language
processing (NLP). It contains text processing libraries for tokenisation, parsing,
classification, stemming, tagging and semantic reasoning.
Very Long Answer Questions (4 marks)
1. What is text normalisation? What is its use in NLP?
Text normalisation is the process of transforming a text into a canonical (standard) form, e.g.
the word “gooood” and “gud” can be transformed to “good” , its canonical form .
After text normalisation, only the real, contributing words are left in the text, which is useful in
NLP in two ways:
(i) The dataset size is now reduced with unimportant words removed and thus less
processing is required.
(ii) It is easier to gauge the intent from the remaining words.
3. Explain from the given graph, how the value and occurrence of a word are related in a
corpus?
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 the 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.
131
EVALUATION
Activity: 1
Imagine that you have come up with an AI-based prediction model which 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.
Ans:
Case 1: Is there a traffic Jam?
Prediction: Yes Reality: Yes True Positive
Matrix Yes No
Ans.:
The F1 score is also known as the F score or F measure of AI model’s test accuracy. It is
calculated from the precision and recall of the test. Here
132
1) The precision is the number of correctly recognized positive results divided by the number of
all positive results, including those not identified correctly.
2) The recall is the number of correctly identified positive results divided by the number of all
samples that should have been identified as positive.
3) The F1 score is defined as the harmonic mean of the test’s precision and recall.
The formula of F1 score is as below:
(𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 𝑋 𝑅𝑒𝑐𝑎𝑙𝑙)
F1 Score =2X (𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛+𝑅𝑒𝑐𝑎𝑙𝑙)
i) A good F1 score means that you have high true positives and high true negatives. It means
that the machine is correctly identifying real threats and not disturbs the users by false alarms.
ii) An F1 score is considered perfect when it’s 1 while the model is a total failure when it’s 0.
iii) F1 score is a better metric to evaluate the model on real-life classification problems and
when imbalanced class distribution exists.
Activity: 3
Calculate accuracy, precision, recall, and F1 score for the following Confusion Matrix. Suggest
which metric would not be a good evaluation parameter and why?
50 30
Prediction: 1
TP FP
15 25
Prediction: 0
FN TN
Ans:
a) Accuracy: It is defined as the percentage of correct predictions out of all the observations.
(𝑇𝑃+𝑇𝑁)
Accuracy= (𝑇𝑃+𝐹𝑁+𝑇𝑁+𝐹𝑃)x100%
(50+25) 80
𝑥100%= 120 x100%= 0.67
(50+15+25+30)
b) Precision: It is defined as the percentage of true positive cases versus all the cases where
the prediction is true.
133
𝑇𝑃 50 50
Precision = (𝐹𝑃+𝑇𝑃) = (30+50) = 80 = 0.625
c) Recall: It is defined as the fraction of positive cases that are correctly identified.
𝑇𝑃 50 50
Recall = (𝐹𝑁+𝑇𝑃) = (15+50) =65 = 0.769
1) False Positive: Suppose if we see the above confusion matrix for the heart attack cases then
a person is predicted with heart attack but does not have heart attack in reality.
2) False Negative: A person is predicted with no heart attack but in reality person is suffering
from the heart attack.
Hence False negative miss the actual patients. So recall needs more improvement.
Activity: 4
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:
The Confusion
Reality: 1 Reality: 0
Matrix
22 12
Prediction: 1
TP FP
47 118
Prediction: 0
FN TN
Find out Accuracy, Precision, Recall and F1 Score for the given problems.
Ans:.
Calculation:
(𝑇𝑃+𝑇𝑁)
1. Accuracy= (𝑇𝑃+𝐹𝑁+𝑇𝑁+𝐹𝑃)x100%
134
(22+118) 140
𝑥100%= 199 x100%= 0.703
(22+47+118+12)
𝑇𝑃 22
2. Precision = (𝐹𝑃+𝑇𝑃) = (12+22) = 0.647
𝑇𝑃 22
3. Recall = (𝐹𝑁+𝑇𝑃) = (47+22) = 0.318
(𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 𝑋 𝑅𝑒𝑐𝑎𝑙𝑙)
4. F1 Score =2X (𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛+𝑅𝑒𝑐𝑎𝑙𝑙)
Accuracy = 0.703
Precision = 0.647
Recall = 0.318
F1 Score = 0.426
135
ADVANCE PYTHON
Jupyter Notebook
The Jupyter Notebook is an incredibly powerful tool for interactively developing and presenting AI
related projects. The Jupyter project is the successor to the earlier IPython and it is an interactive
way of running python code in the terminal using the REPL model. (Read Eval Print Loop)
136
>python-m pip install jupyter
A kernel provides programming language support in Jupyter. IPython is the default kernel for
Jupyter Notebook. Therefore, whenever we need to work with Jupyter Notebook in a virtual
environment, we first need to install a kernel inside the environment in which the Jupyter notebook
will run.
Virtual environment
A virtual environment is a tool that helps to keep dependencies required by different projects
separated, by creating isolated Python virtual environments for them. This is one of the most
important tools that most of the Python developers use.
Imagine a scenario where we are working on two Python-based projects and one of them works
on Python 2.7 and the other uses Python 3.7. In such situations virtual environment can be really
useful to maintain dependencies of both the projects as the virtual environments will make sure
that these dependencies are not conflicting with each other and no impact reaches the base
environment at any point in time. Thus, different projects developed in the system might have
another environment to keep their dependencies isolated from each other.
Creating virtual environments is an easy task with Anaconda distribution. Steps to create one are:
2. As we open the Anaconda prompt, we can see that in the beginning of the prompt message,
the term (base) is written. This is the default environment in which the anaconda works.
Now, we can create our own virtual environment and use it so that the base does not get
affected by anything that is done in the virtual environment.
137
3. Let us now create a virtual environment named env. To create the environment, write conda
create -n env python=3.7
4. After some processing, the prompt will ask if we wish to proceed with installation 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:
138
This would activate the virtual environment and we can see the term written in brackets has
changed from (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
It will again ask if we wish to proceed with the installation, type Y to begin the installation. Once the
installations are complete, we can start working jupyter notebooks in this environment.
Introduction to Python
Python is a programming language which was created by Guido Van Rossum . It can be used to
follow both procedural approach and object-oriented approach of programming. Python has a lot
of functionalities which makes it so popular to use.
139
Applications of Python
There exist a wide variety of applications when it comes to Python. Some of the applications are:
140
PYTHON BASICS
Comments
Comments are the statements which are incorporated in the code to give a better understanding
of code statements to the user.
1. Single Line
2. Multi Line
A single-line comment is used to add some explanatory text in the program for better understanding
of the next line. A # sign is used to write a single line comment in the python program
For example,
# statement to add two numbers
res = 6 + 7
#Print the result
print(res)
Multiline comments
The multiline comments are written in python using triple quotes. You can write number lines
starting with triple quotes and end with triple quotes.
For example,
'''Write a python program to display the difference between two numbers, the first number should
be larger than second number'''
n1=5
n2=2
res=n1 - n2
print(res)
Keywords are the reserved words or pre-defined words with a special meaning to the machine by
default. So the user cannot use them anywhere else or it cannot be changed or modified in the
entire program. They are always case-sensitive.
141
Identifiers
Identifiers are names used in programs to identify small units of programs such as variables,
objects, classes, functions etc.
Identifiers defined by the following few rules as follows:
Examples:
142
Variables
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.
For example,
a=10
b=20
These declarations make sure that the program reserves memory for two variables with the names
a and b. The variable names stand for the memory location.
Note:
Assignment operator is used in Python to assign values to variables. For example, a = 5 is a simple
assignment operator that assigns the value 5 on the right to the variable a on the left.
Datatypes
In program, you have a choice to use any type of data such as real numbers, numbers with
decimals, numbers without decimals, text, etc. These type of data is defined by datatype in Python.
The python interprets the type of the variable according to the value stored in the variable. Follow
the below-given link to know more about data types.
143
Python Input and Output
We use the print() function to output data to the standard output device (screen). We can also
output data to a file.
An example is given below.
a = "Hello World!"
print(a)
The output of the above code will be: Hello World!
a = 20 30
b = 10
print(a + b)
print(15 + 35) 50
144
input() function
The input() function is used to accept values from the user at runtime. This function accepts and
returns the text data by default. Therefore, you need to specify the data type if you want to use
numbers or any other datatype. This process is known as typecasting
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.
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 operators.
Values and variables when used with operators are known as operands.
145
Conditional Statements
While coding in Python, sometimes 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.
146
Some of them are:
Simple if Statement
If you have only one condition to be execute or one possibility of output, simple if statement is
useful for the same. Simple it executes the True condition block. Suppose, If gate is open you are
allowed to go inside!
if <condition>:
statement(s)
Example:
gate_status = "open"
if gate_status=="open":
print("Entry is permitted")
if else statement
147
If else statement evaluates the test expression and will execute body of if only if the condition is
true . If the condition is false body of else will be executed .The blocks are separated using proper
indentation.
if <condition>:
statement(s)
else:
statement(s)
Python if-elif-else ladder is used in the case when you have more than two choices or possibilities.
The elif is a short form of else if. The ladder means it will continue upto n possiblities.
if <condition1>:
statement(s)
elif <condition2>:
statement(s)
elif <condition3>:
148
statement(s)
....
....
....
else:
statement(s)
Example :
if num > 0:
print("Positive number")
elif num == 0:
print("Zero")
else:
print("Negative number")
Python loops
149
Loops are a collection of statements executed repeatedly until the condition evaluates to false. It
is also known as iteration or iterative statements. It can be also considered as step by step
execution of python statements until the condition evaluates to false.
Types of Loop
1. While: A while loop is used when you have different repetitive statements with a single
condition. When the condition gets false, your loop will terminate itself. While loop may have
else block too quite often.
2. For: The easy and popular loop is for a loop. It is very easy to write and understand because
all the parts of loops are written in the same line in for loop. It will reduce the lines of codes
as three parts of loops are written in a single line.
while loop
150
i=1
while i<=10:
print(i)
i=i+1
print("End of loop")
For Loop
The for loop is used to execute the sequence of statements executed in a series. It is the most
popular loop among python developers. It is also work in a similar way as while loop is working.
Observe the syntax of for loop:
So here variable is a variable from and then you can take a sequence to execute the statements.
The in operator is used to take check the value in the specified sequence.
The range() function takes three basic parameters. The first is a start, the second is a stop and the
third is a step.
range(start,stop,step)
for i in range(1,10,1):
print(i)
In the above code, the range function is used. Hence, the loop starts with 1, stops with 9 and taking
one step in every execution. The output will be 1 to 9 numbers only.
PYTHON PRACTICALS :
151
9 Area of a triangle
10 Arithmetic Operations (+,-,*,?)
11 Calculate Simple Interest
CONDITIONAL STATEMENTS
12 Check whether a given number is even or odd using if else
13 Largest among two numbers using if else
42 Print day name in words using if elif else ladder
Print the grade of a student based on percentage using if elif else ladder after
15
inputting marks in 5 subjects
16 Print a single digit in words using if elif else ladder
17 Design a four function calculator using if elif else ladder
18 Electricity Bill Calculation using if else if ladder
LOOPING STATEMENTS
19 Print natural numbers upto N
20 Print sum of natural numbers upto N
21 Printing even no.s upto a limit
23 To check whether a number is Armstrong or not
24 To find the reverse of a number
25 Print Fibonacci series up to N
26 Find the Factorial of a number
27 Print Multiplication Table
28 Find the Sum and Average of even and odd numbers from a set of N numbers
29 Find the Largest among N numbers
152
DATA SCIENCES
Python for Data science
Every AI project requires a programming-based model which is trained to produce outcomes. Data
Sciences also are heavily dependent on programming language that is capable of processing large
amounts of data while applying data science functions. Python is one such language and is mostly
used I data science projects.
Numpy
Numpy, which stands for Numerical Python,
Python library that provides functionality to do the following:
• Create a multidimensional array object (called ndarray or Numpy array).
• Providing tools for working with ndarrays,
Numpy Arrays
An array in general refers to named group of homogeneous elements
A Numpy array is simply a grid that contains values of the same/homogeneous type.
import numpy as np
list =[1, 2,3,4]
A1=np.array(list)
print(a1)
Although Numpy Arrays look similar to python Lists.
Difference between Numpy Array and Python Lists
Lists Numpy Arrays
Python lists can store any type of data Numpy Arrays can store only
and mixed type of data in them. homogeneous data in them
Lists are part of core Python so no Numpy arrays require Numpy library to
library is needed to create them. be imported first of all that is following
statement must be first written in the
program before using Ndarrays
Import Numpy as np
Lists size can easily be changed Numpy arrays cannot be resized
directly.
Mathematical functions cannot be Ndarray support vector operations and
applied directly to lists. hence mathematical and statistical can
be directly applied to Ndarray elements.
153
Lists consume more memory than Ndarrays are faster than lists.
Ndarray.
Adding new elements to a list does not Adding new elements to an Ndarray
create a new lists. internally creates anew Ndarray and old
ndarray is deleted
PANDAS
Pandas or Python pandas are python’s library for data analysis. Pandas have derived its name
from “Panel data system” which is an econometrics term for multi -dimensional, structured data
sets.
Pandas is a software library written for the python programming language for data manipulation
and analysis, and are a popular choice for data science.
The Pandas library has two primary data structure, Series (1-dimensional) and Data frame (2-
dimensional), that can handle the vast majority of typical use cases in finance, statistics, social
science, and many areas of engineering.
import pandas as pd
Example:
import pandas as pd
mydataset = {
'cars': ["BMW", "Volvo", "Ford"],
'passings': [3, 7, 2]
}
myvar = pd.DataFrame(mydataset)
print(myvar)
MATPLOTLIB
Matplotlib is a Python library used for Data Visualization. Data Visualization is an essential
component of data sciences.
import matplotlib as mp1
You can create bar-plots, scatter-plots, histograms and a lot more visualizations with Matplotlib.
Data Visualization
Data Visualization basically refers to the graphical or visual representation of information and
data using visual elements like charts, graphs, and maps etc.
For data visualization in python, the Matplotlib library’s Pyplot interface is used.
154
Pyplot is a collection of methods within matplotlib library which allows user’s to construct 2D
plots easily and interactively.
1. Line Chart
A line chart or line graph is a type of chart which displays information as a series of data
points called ‘markers’
A line chart is created using plot() function.
2. Bar Chart
A bar chart or bar graph is a chart or graph that presents categorical data with rectangular
bars with heights or lengths proportional to the values that they represent.
With Pyplot, a bar chart is created using bar() and barh() functions.
3. Scatter Plot
The scatter plot is similar to a line chary, the major difference is that while line graph
connects the data points with a line, scatter chart simply plots the data points to show the
trend in the data.
With Pyplot, a scatter chart is created using scatter () function.
4. Pie Chart
A pie chart is a circular statistical graphic, which is divided into slices to illustrate numerical
proportion.
With Pyplot, a pie chart is created using pie () function.
5. Histogram Plot
A histogram is atype of graph that provides a visual interpretation of numerical data by
indicating the number of data points that lie within a range of values.
With Pyplot, a histogram is created using hist () function.
6. BoxPlot Chart
A Box Plot is the visual representation of the statistical five number summary of a given data
set.
With Pyplot, a boxplot is created using boxplot () function.
STATISTICAL LEARNING
Data processing mainly aims at transforming data into a form most suited for an application. There
are many statistical techniques used for data processing some basic and commonly used statistical
techniques useful for different types of measures.
MEASURES OF CENTRAL TENDENCY
A measure of central tendency is a single value that attempts to describe a set of data by
identifying the central position within that set of data. The most common measures of central
tendency are mean, median, and mode.
1. Mean
The measure of central location.
155
statistics.mean()
2. Median
Another measure of central location that, unlike the mean is not affected by extremely large
or extremely small data values.
statistics.median()
3. Mode
The data entry that occurs with the greatest frequency.
statistics.mode()
Measures of Variability
Measures of variability refer to the scatter or spread of scores around their central tendency. The
measures of variability indicate how the distribution scatters above and below the central
tendency. The most common measures of variability are range, variance, and standard deviation.
Range
The Range is the difference between the lowest and highest values of a given set of values.
Range=(Max.data entry)-(Min.data entry)
Variance
The variance is the average of the squared differences from the mean.
statistics.variance()
Standard Deviation
Standard Deviation is a statistic used to describe the spread of data about the mean, which is
found by calculating the positive square root of the variance.
statistics.stdev()
156
Example:
import numpy
speed = [99,86,87,88,111,86,103,87,94,78,77,85,86]
x = numpy.mean(speed)
print(x)
output
89.76923076923077
KNN is a simple, supervised machine learning (ML) algorithm that can be used for classification
or regression tasks - and is also frequently used in missing value imputation. It is based on the
idea that the observations closest to a given data point are the most "similar" observations in a
data set, and we can therefore classify unforeseen points based on the values of the closest
existing points. By choosing K, the user can select the number of nearby observations to use in
the algorithm.
KNN is a supervised Learning algorithm that classifies a new data point into the target class,
counting on the features of its neighbouring data points.
• Features: The variables based on which similarity between two points is calculated.
• Distance function: Distance metric to be used for computing similarity between points.
• Scoring function: The function which finds the majority score and class for the query point.
157
• For Recommender system
• For Looking for similar documents
• For Text categorisation
• For Detecting frauds
• In Health and Medicine
• For Estimating soil Water parameter
Practicals
1.
import numpy as np
print(arr)
2.
import numpy as np
arr = np.array(42)
print(arr)
3.
import pandas as pd
mydataset = {
'cars': ["BMW", "Volvo", "Ford"],
'passings': [3, 7, 2]
}
myvar = pd.DataFrame(mydataset)
print(myvar)
4.
import pandas as pd
a = [1, 7, 2]
myvar = pd.Series(a)
print(myvar)
5.
import pandas as pd
data = {
158
"calories": [420, 380, 390],
"duration": [50, 40, 45]
}
myvar = pd.DataFrame(data)
print(myvar)
6.
import statistics
print(statistics.mean([1, 3, 5, 7, 9, 11, 13]))
print(statistics.mean([1, 3, 5, 7, 9, 11]))
print(statistics.mean([-11, 5.5, -3.4, 7.1, -9, 22]))
7.
import statistics
print(statistics.median([1, 3, 5, 7, 9, 11, 13]))
print(statistics.median([1, 3, 5, 7, 9, 11]))
print(statistics.median([-11, 5.5, -3.4, 7.1, -9, 22]))
8.
import statistics
print(statistics.mode([1, 3, 3, 3, 5, 7, 7 9, 11]))
print(statistics.mode([1, 1, 3, -5, 7, -9, 11]))
print(statistics.mode(['red', 'green', 'blue', 'red']))
9.
import statistics
print(statistics.stdev([1, 3, 5, 7, 9, 11]))
print(statistics.stdev([2, 2.5, 1.25, 3.1, 1.75, 2.8]))
print(statistics.stdev([-11, 5.5, -3.4, 7.1]))
print(statistics.stdev([1, 30, 50, 100]))
10.
import statistics
print(statistics.variance([1, 3, 5, 7, 9, 11]))
print(statistics.variance([2, 2.5, 1.25, 3.1, 1.75, 2.8]))
print(statistics.variance([-11, 5.5, -3.4, 7.1]))
print(statistics.variance([1, 30, 50, 100]))
11.
import matplotlib.pyplot as plt
import numpy as np
xpoints = np.array([1, 2, 6, 8])
ypoints = np.array([3, 8, 1, 10])
plt.plot(xpoints, ypoints)
plt.show()
159
QUESTIONS
I. One mark question:
1. A python package which stands for ‘Numerical Python’ is named and used as ____
in Python programs.
2. ____ is another name for Numpy arrays.
3. Series is a data structure belonging to python’s ___ library.
4. The _____ is the mathematical average of a set of data value.
5. KNN refers to _____.
160
COMPUTER VISION
161
Agriculture: Drones mounted with computer vision technology are being used for crop monitoring.
Computer vision systems can monitor animals such as cattle, sheep, pigs or other with cameras
Google Translate App: By using optical character recognition to see the image and augmented
reality to overlay an accurate translation, Google translate app is a convenient tool that uses
Computer Vision to read signs in a foreign language and to translate it to your preferred language.
Questions
Fill in the blanks
1. Emoji Scavenger Hunt game is based on ______ technology.
2. A ________ is a computer vision-based technology that identifies or verifies or matches a
digital image of a human face against a database of stored face image.
3. __________ refers to a search where the search query is formed using a pasted image and
the search engine looks for matching or similar images from around the web.
4. Google reverse image search facility is officially known as _______
5. _________ technology makes computers, machines and devices analyse and understand
the images captured by camera.
Short Answer Questions
1. What is computer vision?
2. What are some applications of computer vision?
3. What is reverse image search?
Answers
1. CV
2. Facial recognition
3. Reverse Image Search
4. Google Search by Image
5. CV
Computer vision concepts
Digital Images used with C
1. Pixel: - A pixel represents the smallest piece of the screen that can be controlled individually
in terms of colour and intensity.
2. Pixel Colour and Intensity: - Combination of three different colour signals- Red, Green, Blue
(RGB) ◦ White - (255,255,255) ◦ Black - (0,0,0)
162
3. Resolution: - It refers to the quality and size of an image in terms of the number of pixels it
contains, typically as ‘width x height’. ◦ Eg:- 100 * 100 pixel image has a total of 10000 pixels.
4. Colour Depth / Pixel Value: - The amount of information that is stored about a pixel
determines its colour depth (pixel value), which controls how precisely the pixel’s colour can
be specified.
5. Grayscale Images:- It is an image in which the only colours are shades of gray
6. RGB Images (Coloured Images): - It is a coloured image that is formed by the three-colour
information stored for each pixel of a digital image
163
Image Features:
An image feature is a measurable piece of data in image which is unique to this specific object,
such as a distinct colour, specific shape or an image segment
OpenCV
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.
To install OpenCV library, open anaconda prompt and then write the following command:
pip install opencv-python
In order to work with OpenCV in Python programs or scripts, import the module first.
import cv2 # import OpenCV
from matplotlib import pyplot as plt # import matplotlib
165
import numpy as np # import numpy
We import numpy as we want to store the pixel values in the numpy array We import matplotlib
to allow us to display our images on the Jupyter notebook itself
img = cv2.imread('Images/man.jpg')
plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
plt.title('man')
plt.axis('on')
plt.show()
166
roi = img[1500:2500,1000:2000] #img[range of y, range of x]
plt.imshow(cv2.cvtColor(roi, cv2.COLOR_BGR2RGB))
plt.title('man')
plt.axis('off')
plt.show()
img = cv2.imread('Images/man.jpg')
resized=cv2.resize(img,(int(img.shape[1]/10),int(img.shape[0]/10)))
plt.imshow(cv2.cvtColor(resized, cv2.COLOR_BGR2RGB))
plt.title('man')
plt.axis('off')
plt.show()
print(resized.shape)
cv2.imwrite('rem_man.jpg',resized)#save the image
167
• A convolution tool that separates and identifies the distinct features of an image for
analysis in a process known as Feature Extraction
• A fully connected layer that takes the output of the convolution process and predicts
the image’s class based on the features retrieved earlier.
• The CNN is made up of three types of layers: convolutional layers, pooling layers,
and fully-connected (FC) layers.
Convolutional Layer
The convolutional layer is where the action begins. The convolutional layer is designed to
discover image features.
Convolutional Layer is the backbone of CNN working model. In this layer, pixel by pixel scanning
takes place of the images and then it creates a feature map to define future classification
As per its name, this layer uses convolution operation on the images with the help of several kernels
to produce several features such as edges, colour, gradient orientation, etc. This way collected
outputs (features) are gathered in the form of Feature Map or the Activation Map.
Pooling layer
The pooling layer is used to minimize the number of input parameters, i.e. it focuses on the
most important aspects of the information obtained.
Connected layer
It is a standard feed-forward neural network. It’s the last straight line before the finish line,
where everything is already visible. It’s only a matter of time until the results are confirmed.
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.
169
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
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 colour 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
The Pooling layer is responsible for reducing the spatial size of the Convolved Feature while still
retaining the important features.
There are two types of pooling which can be performed on an image.
1) Max Pooling: Max Pooling returns the maximum value from the portion of the image covered by
the Kernel.
2) Average Pooling: Average Pooling returns the average value from the portion of the image
covered by the Kernel.
The pooling layer is an important layer in the CNN as it performs a series of tasks which are as
follows :
1) Makes the image smaller and more manageable
170
2) Makes the image more resistant to small transformations, distortions and translations in the
input image.
171
Testing CNN
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
What is a kernel?
In Convolutional neural network, the kernel is nothing but a filter that is used to extract the features
from the images. A Kernel is a matrix used for applying various effects on image through
convolution such as for blurring, sharpening, embossing, edge detection and more
In Image processing, the Kernel’s value depends upon the type of effect being applied. The output
of the convolution process changes with the changing kernel values(Fig 3.3).For example , for
sharpening the image, the kernel values will be different from the blurring kernel. And accordingly
the same picture will look different with one thing common that the same effect will be applied to
each pixel of the image
2) In convolution operation, the ______ is a matrix of values whose size and values determine
the transformation effect of the image through convolution process.
a) ReLU b) Kernel
c) Pooling d) None of these
3) Which of the following is not a layer of the CNN architecture?
172
4) In a CNN, which of these layers use convolution operation on the images with the help of
several kernels?
6) Which of the polling types are used mostly in the pooling layer?
7) In a CNN, which of these layers performs classification based on the features by previous
layer by classifying the images based on their labels assigning after image flattening?
Python Basics-1
AIM- Write a Python program to print the following string in a specific format.
SOURCE CODE-
print("Twinkle, twinkle, little star, \n\tHow I wonder what you are! \n\t\tUp
above the world so high, \n\t\tLike a diamond in the sky. \nTwinkle, twinkle,
little star, \n\tHow I wonder what you are!")
OUTPUT-
RESULT- The source code is executed successfully and the output was verified.
174
PROGRAM NO-2
Python Basics-2
AIM- Write a Python program to print 5 lines about yourself using print() function.
SOURCE CODE-
OUTPUT-
RESULT- The source code is executed successfully and the output was verified.
175
PROGRAM NO-3
Python Basics-3
176
OUTPUT-
RESULT- The source code is executed successfully and the output was verified.
177
PROGRAM NO-4
Python Basics-4
SOURCE CODE-
178
OUTPUT-
RESULT- The source code is executed successfully and the output was verified.
179
PROGRAM NO-5
Python Basics-5
AIM- A tours and travels company charges their customer as per following criteria according
to customer category.
Category Charges
A 18
B 15
C 12
D 10
Others 20
SOURCE CODE-
OUTPUT-
RESULT- The source code is executed successfully and the output was verified.
180
PROGRAM NO-6
LISTS AND ITS OPERATIONS
AIM- Write a Python program:-
1. To declare a list as num = [10, 30, 40, 20, 50] and print it.
2. To sort the list num in Ascending and the Descending order in Python.
3. To create a list as List1 = ['Hello', 10, 'world', 20] and iterate in reverse order.
4. To remove an element of List1 using List1.pop() .
5. To add an element to a List1 using List1.append().
SOURCE CODE-
181
OUTPUT-
RESULT- The source code is executed successfully and the output was verified.
182
PROGRAM NO-7
DATA SCIENCE
Data Visualization Tools
AIM- Write a short note about five essential plots that can help in data visualization and write a
Python program to show each.
Introduction: Data visualization is the process of turning your data into graphical
representations that communicate logical relationships and lead to more informed
decision-making.In short, data visualization is the representation of data in a graphical or pictorial
format.
There are five essential plots that have we need to know well for basic data visualization.
• Line Plot
• Bar Chart
• Histogram Plot
• Scatter Plot
• Pie Chart
1. Line Plot:
• A line plot is used to show observations gathered at regular intervals.
• The x-axis shows the regular interval, such as time.
• The Y- axis shows the observations.
• A line plot can be built by the calling the plot() function and passing the X-
axis data for the regular interval, and Y – axis for the observations.
# code to create a line plot
pyplot.plot(x, y)
2. Bar Plot:
• A bar chart presents relative quantities for multiple categories.
• The x-axis shows the categories that are spaced evenly.
• The Y- axis shows the quantity for each category and is drawn as a bar from the baseline to
the required level on the Y-axis.
• A bar chart can be built by the calling the bar() function and passing the category names for
the X-axis and the quantities for the Y – axis.
3. Histogram Plot
• Histogram plots are used for summarizing the distribution of a data sample.
• The x-axis shows distinct bins or intervals for the observation.
• The Y- axis shows the frequency or tally of the number of observations
in the dataset that has assigned to each bin.
• A Histogram plot can be designed by the calling the hist() function and
passing a list or array that shows the data sample.
# code to create a histogram plot
pyplot.hist(x, y)
4. Scatter Plot:
• A scatter plot can be designed by the calling the scatter() function and passing a list or
array that shows the data sample.
183
# code to create a scatter plot
pyplot. Scatter(x, y)
5. Pie Chart
• A Pie Chart is a circular statistical plot that can display only one series of data.
• The area of the chart is the total percentage of the given data. The area of slices of
the pie represents the percentage of the parts of the data
• # code to create a pie plot
pyplot.pie(values, labels = Names)
SOURCE CODE-
184
185
OUTPUT-
186
RESULT- The source code is executed successfully and the output was verified.
187
PROGRAM NO-8
INTRODUCTION TO COMPUTER VISION
AIM- Write a Python program
a. To read and display an image using OpenCV in Google Colab.
b. To dsiplay the height and width of an input image.
c. To covert BGR format of OpenCV to RGB format.
Introduction:
Computer Vision Computer vision is a field/domain of artificial intelligence (AI) that enables
computers and systems to derive meaningful information from digital images, videos and other
visual inputs — and take actions or make recommendations based on that information.
OpenCV-Python is a library of Python bindings designed to solve computer vision problems.
Python is a general purpose programming language started by Guido van Rossum that became
very popular very quickly, mainly because of its simplicity and code readability. It enables the
programmer to express ideas in fewer lines of code without reducing readability. OpenCV was
started at Intel in 1999 by Gary Bradsky, and the first release came out in 2000. Vadim Pisarevsky
joined Gary Bradsky to manage Intel's Russian software OpenCV team. In 2005, OpenCV was
used on Stanley, the vehicle that won the 2005 DARPA Grand Challenge.
SOURCE CODE-
# Importing the OpenCV library
import cv2
# Importing the matplotlib library
import matplotlib.pyplot as plt
188
OUTPUT-
RESULT- The source code is executed successfully and the output was verified.
189
PROGRAM NO-9
COMMON IMAGE MANIPULATION USING OpenCV
SOURCE CODE-
# Importing the OpenCV library
import cv2
# Importing the matplotlib library
import matplotlib.pyplot as plt
190
OUTPUT-
RESULT- The source code is executed successfully and the output was verified.
191
PROGRAM NO-10
ADVANCED IMAGE MANIPULATION USING OpenCV
SOURCE CODE-
# Importing the OpenCV library
import cv2
# Importing the matplotlib library
import matplotlib.pyplot as plt
# Thresholding is cool
ret,thresh1 = cv2.threshold(image,127,255,cv2.THRESH_BINARY)
ret,thresh2 = cv2.threshold(image,127,255,cv2.THRESH_BINARY_INV)
ret,thresh3 = cv2.threshold(image,127,255,cv2.THRESH_TRUNC)
ret,thresh4 = cv2.threshold(image,127,255,cv2.THRESH_TOZERO)
ret,thresh5 = cv2.threshold(image,127,255,cv2.THRESH_TOZERO_INV)
for i in range(6):
plt.subplot(2,3,i+1),plt.imshow(images[i],'gray')
plt.title(titles[i])
plt.xticks([]),plt.yticks([])
plt.show()
plt.imshow(image), plt.title('Original')
plt.show()
plt.imshow(blur), plt.title('Blurred')
plt.show()
output = image.copy()
# Adding the text using putText() function
text = cv2.putText(output, 'USE OF OpenCV', (500, 550),
cv2.FONT_HERSHEY_SIMPLEX, 4, (255, 255, 0), 5)
plt.imshow(text), plt.title('Original with TEXT ')
plt.show()
OUTPUT-
193
RESULT- The source code is executed successfully and the output was verified.
194
ARTIFICIAL INTELLIGENCE (417)
Sample Question Paper
Class X Marks: 50
Time: 2 Hours
b) Ramu
c) Both of the above
d) None of the above
195
______ act as an interface between the user and the computer.
a) Operating System
b) Ms Excel
4 1
c) Impress
d) Digital Documentation
196
___________ 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.
a) Evaluation 1
8
b) Problem Scoping
c) Data acquisition
d) Data Exploration
The people who face the stated problem and would be benefitted from the
solution are termed as
9 a) Stakeholders 1
b) Key Persons
c) Who
d) End user
How many SDGs have been announced by the United nations?
10 a) 20 1
b) 17
c) 30
d) 25
You would feed the data into the machine. This is the data with which
the machine can be trained. Now, once it is ready, it will predict his next
data efficiently. This previous data is known as ___________.
12 a. Testing Data 1
b. Training Data
c. Exploring Data
d. All of the above
197
Name any 2 methods of collecting data.
a) Surveys and Interviews
14 1
b) Rumors and Myths
c) AI models and applications
d) Imagination and thoughts
You need to __________ 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.
15 a. Acquire Data 1
b. Database
c. Data Mining
d. None of the above
b) Big Data
c) NLP
d) Data Science
The driverless cars use _______ domains and technologies of AI.
a) GPS
18 b) Data 1
c) Computer Vision
d) all of these
198
___________ 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.
a. Automatic Summarization
19 1
b. Sentiment Analysis
c. Text Classification
d. All of the above
SECTION B
21 Name any 4 qualities of an entrepreneur. 2
Section C
199