Example: marketing

AI with Python - tutorialspoint.com

AI with Python i l AI with Python i About the Tutorial Artificial intelligence is the intelligence demonstrated by machines, in contrast to the intelligence displayed by humans. 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.

Intelligence Description Example Linguistic intelligence The ability to speak, recognize, and use mechanisms of phonology (speech sounds), syntax (grammar), and semantics (meaning). Narrators, Orators Musical intelligence The ability to create, communicate with, and understand meanings made of sound, understanding of pitch, rhythm.

Tags:

  Python, With, Intelligence, Tutorialspoint, Rhythm, Ai with python

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of AI with Python - tutorialspoint.com

1 AI with Python i l AI with Python i About the Tutorial Artificial intelligence is the intelligence demonstrated by machines, in contrast to the intelligence displayed by humans. 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.

2 Copyright & Disclaimer Copyright 2016 by Tutorials Point (I) Pvt. Ltd. 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 AI with Python ii Table of Contents About the Tutorial .. i Audience .. i Prerequisites .. i Copyright & Disclaimer .. i Table of Contents .. ii 1. AI with Python Primer Concepts.

3 1 Basic Concept of Artificial intelligence (AI) .. 1 The Necessity of Learning AI .. 1 What is intelligence ? .. 2 What is intelligence Composed Of? .. 3 Learning l .. 4 What s Involved in AI .. 6 Application of AI .. 6 Cognitive Modeling: Simulating Human Thinking Procedure .. 7 Agent & Environment .. 8 2. AI with Python Getting Started .. 9 Why Python for AI .. 9 Features of Python .. 9 Installing Python .. 10 Setting up PATH .. 11 Running Python .. 12 Script from the Command-line .. 13 Integrated Development Environment .. 13 3. AI with Python Machine Learning .. 15 Types of Machine Learning (ML) .. 15 Most Common Machine Learning Algorithms .. 16 AI with Python iii 4. AI with Python Data Preparation .. 20 Preprocessing the Data .. 20 Techniques for Data Preprocessing .. 21 Labeling the Data .. 23 5. AI with Python Supervised Learning: Classification .. 26 Steps for Building a Classifier in Python .. 26 Building Classifier in Python .. 29 Logistic Regression.

4 34 Decision Tree Classifier .. 37 Random Forest Classifier .. 39 Performance of a classifier .. 40 Class Imbalance Problem .. 42 Ensemble Techniques .. 43 6. AI with Python Supervised Learning: Regression .. 44 Building Regressors in Python .. 44 7. AI with Python Logic Programming .. 49 How to Solve Problems with Logic 49 Installing Useful Packages .. 50 Examples of Logic Programming .. 50 Checking for Prime Numbers .. 51 Solving Puzzles .. 52 8. AI with Python Unsupervised Learning: Clustering .. 55 What is Clustering? .. 55 Algorithms for Clustering the Data .. 55 Measuring the Clustering Performance .. 61 Calculating Silhouette Score .. 61 Finding Nearest Neighbors .. 63 K-Nearest Neighbors Classifier .. 65 AI with Python iv 9. AI with Python Natural Language Processing .. 69 Components of NLP .. 69 Difficulties in NLU .. 69 NLP Terminology .. 70 Steps in NLP .. 70 10. AI with Python NLTK package .. 72 Importing NLTK .. 72 Downloading NLTK s Data.

5 72 Installing Other Necessary Packages .. 73 Concept of Tokenization, Stemming, and Lemmatization .. 73 Chunking: Dividing Data into Chunks .. 75 Types of chunking .. 76 Bag of Word (BoW) Model .. 77 Concept of the Statistics .. 78 Building a Bag of Words Model in NLTK .. 79 Solving Problems .. 79 Topic Modeling: Identifying Patterns in Text Data .. 84 Algorithms for Topic Modeling .. 84 11. AI with Python Analyzing Time Series Data .. 86 Introduction .. 86 Installing Useful Packages .. 86 Pandas: Handling, Slicing and Extracting Statistic from Time Series Data .. 87 Extracting Statistic from Time Series Data .. 91 Analyzing Sequential Data by Hidden Markov Model (HMM).. 95 Example: Analysis of Stock Market 96 12. AI with Python Speech Recognition .. 99 Building a Speech Recognizer .. 99 Visualizing Audio Signals - Reading from a File and Working on it .. 100 AI with Python v Characterizing the Audio Signal: Transforming to Frequency Domain .. 102 Generating Monotone Audio Signal.

6 104 Feature Extraction from Speech .. 106 Recognition of Spoken Words .. 108 13. AI with Python Heuristic Search .. 111 Concept of Heuristic Search in AI .. 111 Difference between Uninformed and Informed Search .. 111 Real World Problem Solved by Constraint Satisfaction .. 112 14. AI with Python Gaming .. 115 Search Algorithms .. 115 Combinational Search .. 115 Minimax Algorithm .. 115 Alpha-Beta Pruning .. 116 Negamax Algorithm .. 116 Building Bots to Play Games .. 116 A Bot to Play Last Coin Standing .. 116 A Bot to Play Tic Tac Toe .. 119 15. AI with Python Neural Networks .. 122 What is Artificial Neural Networks (ANN) .. 122 Installing Useful Packages .. 122 Building Neural Networks .. 122 Perceptron based Classifier .. 123 Single - Layer Neural Networks .. 124 Multi-Layer Neural Networks .. 127 16. AI with Python Reinforcement Learning .. 131 Basics of Reinforcement Learning .. 131 Building Blocks: Environment and Agent .. 131 Constructing an Environment with Python .

7 133 AI with Python vi Constructing a learning agent with Python .. 134 17. AI with Python Genetic Algorithms .. 135 What are Genetic Algorithms? .. 135 How to Use GA for Optimization Problems? .. 135 Installing Necessary Packages .. 136 Implementing Solutions using Genetic Algorithms .. 136 18. AI with Python Computer Vision .. 142 Computer Vision .. 142 Computer Vision Vs Image Processing .. 142 Installing Useful Packages .. 143 Reading, Writing and Displaying an Image .. 144 Color Space Conversion .. 145 Edge Detection .. 147 Face Detection .. 148 Eye Detection .. 149 19. AI with Python Deep Learning .. 151 Machine Learning v/s Deep Learning .. 151 Convolutional Neural Network (CNN) .. 151 Installing Useful Python Packages .. 152 Building Linear Regressor using ANN .. 153 Image Classifier: An Application of Deep Learning .. 154 AI with Python 1 Since the invention of computers or machines, their capability to perform various tasks has experienced an exponential growth.

8 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. A branch of Computer Science named Artificial intelligence pursues creating the computers or machines as intelligent as human beings. Basic Concept of Artificial intelligence (AI) According to the father of Artificial intelligence , John McCarthy, it is The science and engineering of making intelligent machines, especially intelligent computer programs . Artificial intelligence is a way of making a computer, a computer-controlled robot, or a software think intelligently, in the similar manner the intelligent humans think. AI is accomplished by studying how human brain thinks and how humans learn, decide, and work while trying to solve a problem, and then using the outcomes of this study as a basis of developing intelligent software and systems. 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?

9 Thus, the development of AI started with the intention of creating similar intelligence in machines that we find and regard high in humans. The Necessity of Learning AI As we know that AI pursues creating the machines as intelligent as human beings. There are numerous reasons for us to study AI. The reasons are as follows: AI can learn through data In our daily life, we deal with huge amount of data and human brain cannot keep track of so much data. That is why we need to automate the things. For doing automation, we need to study AI because it can learn from data and can do the repetitive tasks with accuracy and without tiredness. AI can teach itself It is very necessary that a system should teach itself because the data itself keeps changing and the knowledge which is derived from such data must be updated constantly. We can use AI to fulfill this purpose because an AI enabled system can teach itself. AI can respond in real time Artificial intelligence with the help of neural networks can analyze the data more deeply.

10 Due to this capability, AI can think and respond to the situations which are based on the conditions in real time. 1. AI with Python Primer Concepts AI with Python 2 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. AI can organize data to get most out of it The data is an intellectual property for the systems which are using self-learning algorithms. We need AI to index and organize the data in a way that it always gives the best results. 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.