YouTube Link: https://youtu.be/7O60HOZRLng
* Machine Learning Engineer Masters Program: https://www.edureka.co/masters-program/machine-learning-engineer-training *
This Edureka PPT on "Artificial Intelligence With Python" will provide you with a comprehensive and detailed knowledge of Artificial Intelligence concepts with hands-on examples.
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in
How to use Artificial Intelligence with Python? Edureka
1.
2. WHY PYTHON FOR AI?
FEATURES OF PYTHON
INTRODUCTION TO ARTIFICIAL INTELLIGENCE
INTRODUCTION TO MACHINE LEARNING
www.edureka.co
PYTHON PACKAGES FOR AI
MACHINE LEARNING ALGORITHMS
INTRODUCTION TO DEEP LEARNING
NATURAL LANGUAGE PROCESSING (NLP)
TEXT MINING
5. Python is an open-source, object-oriented programming language mainly used for Data Science.
StackOverflow calls it as the fastest growing
programming language.
www.edureka.co
7. Tensorflow library was developed by Google in collaboration with Brain Team. It is popularly used in
writing Machine Learning algorithms.
Tensorflow
Features of Tensorflow
• Responsive construct
• Flexible
• Easily trainable
• Parallel neural network training
www.edureka.co
8. Scikit-learn is a Python library associated with NumPy and SciPy. It is considered as one of the best
libraries for working with complex data.
Scikit-learn
Features of Scikit-learn
• Cross validation
• Unsupervised learning algorithms
• Feature extraction
www.edureka.co
9. Numpy is a python library mainly used for computing scientific/mathematical data.
NumPy
Features of NumPy
• Supports multi-dimensional arrays
• Numerical analysis
• Intuitive
www.edureka.co
10. Theano is a Python library that allows you to define, optimize, and evaluate mathematical
expressions involving multi-dimensional arrays efficiently.
Theano
Features of Theano
• Tight integration with NumPy
• Transparent use of a GPU
• Extensive unit-testing and self-verification
www.edureka.co
11. Keras simplifies the implementation of neural networks. It also provides some of the best utilities for
compiling models, processing data-sets, visualization of graphs, and much more.
Keras
Features of Keras
• Runs smoothly on both CPU & GPU
• Supports all types of Neural Networks
• Completely Python based
www.edureka.co
12. The Natural Language Toolkit (NLTK) is an open source Python library for Natural Language
Processing, text analysis and text mining.
NLTK
Features of NLTK
• Study natural language text
• Text analysis
• Sentimental analysis
www.edureka.co
15. “The science and engineering of making intelligent machines”
John McCarthy first coined the term Artificial
Intelligence in the year 1956.
www.edureka.co
16. The theory and development of computer systems able to perform tasks normally requiring human intelligence, such as visual
perception, speech recognition, decision-making and translation between languages.
Machine Learning
Deep Learning
NLP
Computer Vision
Knowledge Base
Expert System
www.edureka.co
17. Artificial Narrow Intelligence Artificial General Intelligence Artificial Super Intelligence
The theory and development of computer systems able to perform tasks normally requiring human intelligence, such as visual
perception, speech recognition, decision-making and translation between languages.
www.edureka.co
19. Artificial Intelligence
Machine Learning
Deep Learning
ARTIFICIAL INTELLIGENCE
A technique which enables machines
to mimic human behaviour
MACHINE LEARNING
Subset of AI technique which use
statistical methods to enable machines
to improve with experience
DEEP LEARNING
Subset of ML which make the
computation of multi-layer neural
network feasible
www.edureka.co
20. Artificial Intelligence
Machine Learning
Deep Learning
ARTIFICIAL INTELLIGENCE
A technique which enables machines
to mimic human behaviour
MACHINE LEARNING
Subset of AI technique which use
statistical methods to enable machines
to improve with experience
DEEP LEARNING
Subset of ML which make the
computation of multi-layer neural
network feasible
www.edureka.co
21. Artificial Intelligence
Machine Learning
Deep Learning
ARTIFICIAL INTELLIGENCE
A technique which enables machines
to mimic human behaviour
MACHINE LEARNING
Subset of AI technique which use
statistical methods to enable machines
to improve with experience
DEEP LEARNING
Subset of ML which make the
computation of multi-layer neural
network feasible
www.edureka.co
23. Machine learning is a subset of Artificial Intelligence (AI) which provides machines the ability to
learn automatically & improve from experience without being explicitly programmed.
What Is Machine Learning?
Data Training the Machine Building a Model Predicting Outcome
www.edureka.co
25. The Machine Learning process involves building a Predictive model that can be used to
find a solution for a Problem Statement.
MACHINE LEARNING PROCESS
DefineObjective
DataGathering
PreparingData
DataExplorationBuildingaModel
ModelEvaluation
Predictions
www.edureka.co
26. To predict the possibility of rain by studying the weather conditions.
Step 1: Define the objective of the Problem
• Whatarewetryingtopredict?
• Whatarethetargetfeatures?
• Whatistheinputdata?
• What kind of problem are we facing? Binary classification?
Clustering?
WeatherForecastusing
MachineLearning
www.edureka.co
27. Data such as weather conditions, humidity level, temperature, pressure, etc are either
collected manually or scarped from the web.
Step 2: Data Gathering
www.edureka.co
28. Data Cleaning involves getting rid of inconsistencies in data such as missing values
or redundant variables.
Step 3: Preparing Data
• Transformdataintodesiredformat
• Datacleaning
• Missingvalues
• Corrupteddata
• Removeunnecessarydata
www.edureka.co
29. Data Exploration involves understanding the patterns and trends in the data. At this
stage all the useful insights are drawn and correlations between the variables are
understood.
Step 4: Exploratory Data Analysis
www.edureka.co
30. At this stage a Predictive Model is built by using Machine Learning Algorithms such as
Linear Regression, Decision Trees, etc.
Step 5: Building a Machine Learning Model
• MachineLearningmodelisbuiltbyusingthetrainingdataset
• The model is the Machine Learning algorithm that predicts the
outputbyusingthedatafedtoit
TrainingData
MachineLearning
Model
www.edureka.co
31. The efficiency of the model is evaluated and any further improvement in the model are
implemented.
Step 6: Model Evaluation & Optimization
• Machine Learning model is evaluated by using the testing data
set
• Theaccuracyofthemodeliscalculated
• Further improvement in the model are done by using techniques
likeParametertuning
MachineLearningModel
www.edureka.co
32. The final outcome is predicted after performing parameter tuning and improving the
accuracy of the model.
Step 7: Predictions
www.edureka.co
34. Supervised learning is a technique in which we teach or train the machine
using data which is well labelled.
Supervised Learning
Tom
Tom
Tom
Jerry
Jerry Jerry
Labelled Data
Class ‘Jerry’
Class ‘Tom’
Labelled Output
Known Input
Training phase
www.edureka.co
35. Unsupervised learning is the training of machine using information that is unlabeled and
allowing the algorithm to act on that information without guidance.
Unsupervised Learning
Unlabelled Data
Understand patterns & discover outputUnknown Input
Unlabelled Output
Clusters formed based on
feature similarity
www.edureka.co
36. Reinforcement Learning is a part of Machine learning where an agent is put in an
environment and he learns to behave in this environment by performing certain actions
and observing the rewards which it gets from those actions.
Reinforcement Learning
Tom or
jerry? Agent
Environment
state
reward action
www.edureka.co
39. Regression vs Classification vs Clustering
Regression Classification Clustering
• Output is a continuous
quantity
• Output is a categorical
quantity
• Assigns data points into
clusters
• Supervised Learning • Supervised Learning • Unsupervised Learning
• Main aim is to forecast or
predict
• Main aim is to compute the
category of the data
• Main aim is to group similar
items clusters
• Eg: Predict stock market price • Eg: Classify emails as spam or
non-spam
• Eg: Find all transactions which
are fraudulent in nature
• Algorithm: Linear Regression • Algorithm: Logistic Regression • Algorithm: K-means
www.edureka.co
44. One of the big challenges with traditional Machine Learning models is a process called feature extraction. For
complex problems such as object recognition or handwriting recognition, this is a huge challenge.
Deep Learning
www.edureka.co
46. Deep Learning models are capable to focus on the right features by themselves, requiring little
guidance from the programmer. These models also partially solve the dimensionality problem.
Why Deep Learning?
The idea behind Deep Learning is to build learning algorithms that mimic the brain.
www.edureka.co
48. Deep Learning is a collection of statistical machine learning techniques used to learn feature hierarchies based
on the concept of artificial neural networks.
www.edureka.co
49. "What we enjoy from more modern, advanced machine learning is its ability to consume a lot more data, handle layers
and layers of abstraction and be able to 'see' things that a simpler technology would not be able to see, even human
beings might not be able to see," - Wang.
• PayPal uses Deep Learning models to identify fraudulent
activities
• Over four billion transactions are processed
• Deep learning algorithms implement pattern detection to
predict whether a particular transaction is fraudulent or not.
www.edureka.co
50. An Artificial Neuron or a Perceptron is a linear model used for binary classification. It models a neuron which
has a set of inputs, each of which is given a specific weight. The neuron computes some function on these
weighted inputs and gives the output.
Perceptron or Artificial Neuron
www.edureka.co
51. A Multilayer Perceptron with backpropagation can be used to solve this problem.
Dealing with non-linearly separable data:
www.edureka.co
52. A Multi-layer Perceptron has the same structure of a single layer perceptron but with one or more hidden
layers and is thus considered a deep neural network.
www.edureka.co
53. • The weights between the units are the primary means of long-term information storage in neural networks
• Updating the weights is the primary way the neural network learns new information
A set of inputs are passed to the first hidden layer, the activations from that layer are passed to the next layer
and so on, until you reach the output layer.
www.edureka.co
54. The Backpropagation algorithm is a supervised learning method for Multilayer Perceptron.
Maximum weight is assigned to the most important lead/input.
www.edureka.co
64. Text Mining is
the process of deriving high quality
information from the text .
The overall goal is, to turn text into
data for analysis, via application of
Natural Language Processing (NLP)
www.edureka.co
71. The process of splitting the whole data (corpus) into smaller chunks
is known as tokenization
01 Break a complex sentence into words
02 Understand the importance of each of the words with respect to the
sentence
03 Produce a structural description on an input sentence
www.edureka.co
72. 01 Break a complex sentence into words
02 Understand the importance of each of the words with respect to the
sentence
03 Produce a structural description on an input sentence
Tokens are simple
www.edureka.co
73. 01 Break a complex sentence into words
02 Understand the importance of each of the words with respect to the
sentence
03 Produce a structural description on an input sentence
Tokens are simple
www.edureka.co
74. Normalize words into its base form or root form
Detected Detection DetectingDetections
Detect
Stemming
www.edureka.co
75. • Groups together different inflected forms of a
word, called Lemma
• Somehow similar to Stemming, as it maps
several words into one common root
• Output of Lemmatisation is a proper word
• For example, a Lemmatiser should
map gone, going and went into go
www.edureka.co