Artificial Intelligence With Python Tutorials Point download
Artificial Intelligence With Python Tutorials Point download
Point download
https://ebookbell.com/product/artificial-intelligence-with-
python-tutorials-point-53648020
https://ebookbell.com/product/artificial-intelligence-with-python-
prateek-joshi-47300864
https://ebookbell.com/product/artificial-intelligence-with-python-
your-complete-guide-to-building-intelligent-apps-using-
python-3x-second-edition-2nd-edition-alberto-artasanchez-52951308
https://ebookbell.com/product/artificial-intelligence-with-python-
machine-learning-foundations-methodologies-and-applications-teik-toe-
teoh-42119026
https://ebookbell.com/product/artificial-intelligence-with-python-
cookbook-proven-recipes-for-applying-ai-algorithms-and-deep-learning-
techniques-using-tensorflow-2x-and-pytorch-16-ben-auffarth-43824706
Artificial Intelligence With Python For Beginners Comprehensive Guide
To Building Ai Applications Ferry
https://ebookbell.com/product/artificial-intelligence-with-python-for-
beginners-comprehensive-guide-to-building-ai-applications-
ferry-58443598
https://ebookbell.com/product/artificial-intelligence-with-python-
cookbook-ben-auffarth-12227608
https://ebookbell.com/product/artificial-intelligence-with-python-
your-complete-guide-to-building-intelligent-apps-using-python-3x-2nd-
edition-alberto-artasanchez-prateek-joshi-49847640
https://ebookbell.com/product/artificial-intelligence-with-python-
alberto-artasanchez-170542234
https://ebookbell.com/product/artificial-intelligence-with-python-
prateek-joshi-170635914
AI with Python
i
AI with Python
This tutorial covers the basic concepts of various fields of artificial intelligence like Artificial
Neural Networks, Natural Language Processing, Machine Learning, Deep Learning, Genetic
algorithms etc., and its implementation in Python.
Audience
This tutorial will be useful for graduates, post graduates, and research students who either
have an interest in this subject or have this subject as a part of their curriculum. The
reader can be a beginner or an advanced learner.
Prerequisites
We assume that the reader has basic knowledge about Artificial Intelligence and Python
programming. He/she should be aware about basic terminologies used in AI along with
some useful python packages like nltk, OpenCV, pandas, OpenAI Gym, etc.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish
any contents or a part of contents of this e-book in any manner without written consent
of the publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our
website or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at [email protected]
i
AI with Python
Table of Contents
About the Tutorial ............................................................................................................................................ i
Audience ........................................................................................................................................................... i
Prerequisites ..................................................................................................................................................... i
Learning − l ...................................................................................................................................................... 4
Application of AI .............................................................................................................................................. 6
ii
AI with Python
Introduction ................................................................................................................................................... 86
Pandas: Handling, Slicing and Extracting Statistic from Time Series Data ..................................................... 87
Visualizing Audio Signals - Reading from a File and Working on it .............................................................. 100
iv
AI with Python
vi
1. AI with Python – Primer Concepts
AI with Python
Since the invention of computers or machines, their capability to perform various tasks
has experienced an exponential growth. Humans have developed the power of computer
systems in terms of their diverse working domains, their increasing speed, and reducing
size with respect to time.
While exploiting the power of the computer systems, the curiosity of human, lead him to
wonder, “Can a machine think and behave like humans do?”
Thus, the development of AI started with the intention of creating similar intelligence in
machines that we find and regard high in humans.
1
AI with Python
AI achieves accuracy
With the help of deep neural networks, AI can achieve tremendous accuracy. AI helps in
the field of medicine to diagnose diseases such as cancer from the MRIs of patients.
Understanding Intelligence
With AI, smart systems can be built. We need to understand the concept of intelligence so
that our brain can construct another intelligence system like itself.
What is Intelligence?
The ability of a system to calculate, reason, perceive relationships and analogies, learn
from experience, store and retrieve information from memory, solve problems,
comprehend complex ideas, use natural language fluently, classify, generalize, and adapt
new situations.
Types of Intelligence
As described by Howard Gardner, an American developmental psychologist, Intelligence
comes in multifold:
2
AI with Python
You can say a machine or a system is artificially intelligent when it is equipped with at
least one or all intelligences in it.
Reasoning
Learning
Problem Solving
Perception
Linguistic Intelligence
3
AI with Python
Reasoning
It is the set of processes that enable us to provide basis for judgement, making decisions,
and prediction. There are broadly two types −
Even if all of the premises are true in a statement, inductive If something is true of
reasoning allows for the conclusion to be false. a class of things in
general, it is also true
for all members of that
class.
Learning − l
The ability of learning is possessed by humans, particular species of animals, and AI-
enabled systems. Learning is categorized as follows −
Auditory Learning
It is learning by listening and hearing. For example, students listening to recorded audio
lectures.
Episodic Learning
To learn by remembering sequences of events that one has witnessed or experienced. This
is linear and orderly.
Motor Learning
It is learning by precise movement of muscles. For example, picking objects, writing, etc.
4
AI with Python
Observational Learning
To learn by watching and imitating others. For example, child tries to learn by mimicking
her parent.
Perceptual Learning
It is learning to recognize stimuli that one has seen before. For example, identifying and
classifying objects and situations.
Relational Learning
It involves learning to differentiate among various stimuli on the basis of relational
properties, rather than absolute properties. For Example, Adding ‘little less’ salt at the
time of cooking potatoes that came up salty last time, when cooked with adding say a
tablespoon of salt.
Problem Solving
It is the process in which one perceives and tries to arrive at a desired solution from a
present situation by taking some path, which is blocked by known or unknown hurdles.
Problem solving also includes decision making, which is the process of selecting the best
suitable alternative out of multiple alternatives to reach the desired goal.
Perception
It is the process of acquiring, interpreting, selecting, and organizing sensory information.
Linguistic Intelligence
It is one’s ability to use, comprehend, speak, and write the verbal and written language.
It is important in interpersonal communication.
5
AI with Python
What’s Involved in AI
Artificial intelligence is a vast area of study. This field of study helps in finding solutions to
real world problems.
Machine Learning
It is one of the most popular fields of AI. The basic concept of this filed is to make the
machine learning from data as the human beings can learn from his/her experience. It
contains learning models on the basis of which the predictions can be made on unknown
data.
Logic
It is another important field of study in which mathematical logic is used to execute the
computer programs. It contains rules and facts to perform pattern matching, semantic
analysis, etc.
Searching
This field of study is basically used in games like chess, tic-tac-toe. Search algorithms give
the optimal solution after searching the whole search space.
Genetic Algorithm
Genetic algorithms help in solving problems with the assistance of more than one program.
The result would be based on selecting the fittest.
Knowledge Representation
It is the field of study with the help of which we can represent the facts in a way the
machine that is understandable to the machine. The more efficiently knowledge is
represented; the more system would be intelligent.
Application of AI
In this section, we will see the different fields supported by AI:
Gaming
AI plays crucial role in strategic games such as chess, poker, tic-tac-toe, etc., where
machine can think of large number of possible positions based on heuristic knowledge.
6
AI with Python
Expert Systems
There are some applications which integrate machine, software, and special information
to impart reasoning and advising. They provide explanation and advice to the users.
Vision Systems
These systems understand, interpret, and comprehend visual input on the computer. For
example,
A spying aeroplane takes photographs, which are used to figure out spatial
information or map of the areas.
Police use computer software that can recognize the face of criminal with the stored
portrait made by forensic artist.
Speech Recognition
Some intelligent systems are capable of hearing and comprehending the language in terms
of sentences and their meanings while a human talks to it. It can handle different accents,
slang words, noise in the background, change in human’s noise due to cold, etc.
Handwriting Recognition
The handwriting recognition software reads the text written on paper by a pen or on screen
by a stylus. It can recognize the shapes of the letters and convert it into editable text.
Intelligent Robots
Robots are able to perform the tasks given by a human. They have sensors to detect
physical data from the real world such as light, heat, temperature, movement, sound,
bump, and pressure. They have efficient processors, multiple sensors and huge memory,
to exhibit intelligence. In addition, they are capable of learning from their mistakes and
they can adapt to the new environment.
7
AI with Python
Cognitive
Behaviora
l
Physical
Kinematic
Geometri
c
Agent
An agent is anything that can perceive its environment through sensors and acts upon
that environment through effectors.
A human agent has sensory organs such as eyes, ears, nose, tongue and skin
parallel to the sensors, and other organs such as hands, legs, mouth, for effectors.
A robotic agent replaces cameras and infrared range finders for the sensors, and
various motors and actuators for effectors.
A software agent has encoded bit strings as its programs and actions.
Environment
Some programs operate in an entirely artificial environment confined to keyboard
input, database, computer file systems and character output on a screen.
In contrast, some software agents (software robots or softbots) exist in rich, unlimited
softbots domains. The simulator has a very detailed, complex environment. The
software agent needs to choose from a long array of actions in real time. A softbot is
designed to scan the online preferences of the customer and shows interesting items to
the customer works in the real as well as an artificial environment.
8
2. AI with Python – Getting StartedAI with Python
In this chapter, we will learn how to get started with Python. We will also understand how
Python helps for Artificial Intelligence.
Can be used for broad range of programming: Python can be used for a broad
range of programming tasks like small shell script to enterprise web applications.
This is another reason Python is suitable for AI projects.
Features of Python
Python is a high-level, interpreted, interactive and object-oriented scripting language.
Python is designed to be highly readable. It uses English keywords frequently where as
other languages use punctuation, and it has fewer syntactical constructions than other
languages. Python's features include the following −
Easy-to-learn − Python has few keywords, simple structure, and a clearly defined
syntax. This allows the student to pick up the language quickly.
Easy-to-read − Python code is more clearly defined and visible to the eyes.
A broad standard library − Python's bulk of the library is very portable and cross-
platform compatible on UNIX, Windows, and Macintosh.
9
AI with Python
Interactive Mode − Python has support for an interactive mode which allows
interactive testing and debugging of snippets of code.
Portable − Python can run on a wide variety of hardware platforms and has the
same interface on all platforms.
GUI Programming − Python supports GUI applications that can be created and
ported to many system calls, libraries and windows systems, such as Windows MFC,
Macintosh, and the X Window system of Unix.
Scalable − Python provides a better structure and support for large programs than
shell scripting.
It provides very high-level dynamic data types and supports dynamic type
checking.
It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java.
Installing Python
Python distribution is available for a large number of platforms. You need to download only
the binary code applicable for your platform and install Python.
If the binary code for your platform is not available, you need a C compiler to compile the
source code manually. Compiling the source code offers more flexibility in terms of choice
of features that you require in your installation.
Follow the link to download zipped source code available for Unix/Linux.
10
Random documents with unrelated
content Scribd suggests to you:
“The great majority of our experiments were made on dogs under
curari with artificial respiration, but several were under morphia;
with rabbits there is no particular difficulty in dispensing with all
narcotics.”—Virchow’s Archiv.
Curci (Signor).
Engaged with Chirone in experiments on pirotoxine and
cinchonidine.—Archiv. Ital.
Currie, Andrew Stark, Royal Infirmary, Edinburgh. M.B.
Edin., 1874; M.R.C.S., Eng., 1874.
Held License for Vivisection at Glasgow University Physiological
Laboratory, 1878.
Fano, J., M.D., Free Prof. and Asst. in Physiol. Univ. Florence.
Author of “Recherches expérimentales sur un nouveau centre
automatique dans le tractus bulbo spinal,” “Arch. Ital. de Biol.,” 1883,
Vol. III., p. 365.
Experiments on turtles, toads, and fishes.
“On turtles alone I have made more than fifty experiments. The
experiments on fishes I have only just commenced, and they do not
allow me to draw from them any valid conclusions on the subject.
My attempts to extend my researches to the superior vertebrates—
that is to say, to mammals and birds—are limited to two experiments
on unweaned puppies and one experiment on a pigeon.”—Arch. Ital.
de Biol., Vol. III., 1833, p. 367.
Feltz (Prof.) Nancy Med. Faculty; Prof. Path. Anat. and Physiol.
Med. Fac., Nancy.
ebookbell.com