SlideShare a Scribd company logo
Understanding
The ML algorithms
Supervised Vs Unsupervised Learning
• Supervised Learning:
Learns by known examples.
• Unsupervised Learning
Tries to find hidden structure in an unlabeled data
• Reinforcement Learning
Learns by interacting with the current responses.
Supervised Learning Unsupervised Learning Reinforcement Learning
Regression K-Means Clustering Genetic Algorithm
K-nearest Neighbors PCA EclatN
SVM Associated Rules AprioriN
Decision Trees Neural Networks
Random Forest
Neural Networks
Rupak Roy
Machine Learning by types
Unsupervised Learning:
• Dimension Reduction: PCA, LSA, SVD, LDA, T-SNE
• Pattern Search: Euclat, Apriori
• Clustering: K-means, Agglomerative, DBSCAN, Fuzzy C-means
Supervised Learning:
• Classification: K-NN, Naïve Bayes, SVM, Decision Trees, Logistic
Regression.
• Regression: Linear Regression, Polynomial Regression, Lasso
Regression.
Rupak Roy
Machine Learning by types
Reinforcement Learning
Genetic algorithm, ASC, SARSA, Q-learning, Deep Q-network(DQN)
Ensemble Methods
• Boosting: AdaBoost, catBoost, LightGBM, XGBoost
• Bagging: Random Forest
• Stacking
Neural Nets and Deep Leaning
• Convolutional Neural Networks(CNN): DCNN
• Recurrent Neural Networks(RNN): LSM, LSTM, GRU
• Generative Adversarial Networks(GAN)
• Autoencoders: Seq2seq
• Perceptron, Multi Layer Perceptron(MLP)
Rupak Roy
Algorithm Map
Here‟s a handy map of algorithm
Classification
It is technique where the algorithm splits the
data into homogeneous group
Examples:
1) From an album of tagged photos, recognize some one in a picture.
2) Analyze bank data of weird, looking transactions & flag those for
fraud even spam filtering
3) Given someone music choice and a bunch of features of that
music.
4) Cluster university student into types based on learning styles.
5) Recognition of handwritten characters as well as language
Popular algorithms: Naive Bayes, Decision Tree, Logistic Regression, K-
Nearest Neighbors, Support Vector Machine
Rupak Roy
Naive Bayes Rule
In spam filtering the Naive Bayes algorithm was widely used. The
algorithm takes the count of “a particular word" mention in the spam list
with a normal mail, then it multiplies both probabilities using the Bayes
equation.
Good word list
Spam list
Later, spammers figure it out how to trick spam filters by adding lots of
"good" words at the end of the email and this method is
called Bayesian poisoning.
Rupak Roy
Great -235
Opportunities -3
Speak -44
Meeting -246
Collaborative-3
Sales-77
Scope - 98
100% - 642
Fast -78
Hurry - 40
“hello”
P(B|A) P(A)
P(A|B) = = Not Spam
P(B)
Naive Bayes Rule
It ignore few things:
words, word order, length. It just looks for frequency to do the
classification
Naïve Bayes strength & weakness
Advantage:
Being a supervised classification algorithm it is easy to implement
Weakness:
It breaks in funny ways. Previously when people did Google search for
Chicago bulls. It gave animals rather than city.
Because phrases that comprises multiple words with distinct different
meanings. Don‟t work with Naïve Bayes. And requires categorical
variable as target.
Assumptions: Bag of words position doesn‟t matter.
Conditional independence. Eg. „Great‟ occurring not dependent or
word „fabulous‟ in the same document.
Rupak Roy
Naive Bayes Rule
Prior probability of Green = no.of green objects/total no. of objects
Prior probability of Red = No. of Red objects/ total number of objects
Green 40/60=4/6
Red 20/60=2/6
Prior probability is computed without any knowledge about the point
likelihood computed after knowing what the data point is.
What is the likelihood of Red point= no. of red points/ total no. of points in
the neighborhood
What is the likelihood of green point = no. of green points/ total no. of points
in the neighborhood
Posterior probability of ‘x’ being Green = prior probability of green X
likelihood of „x‟ given Green = 4/6 X1/40=1/60 = 0.016
Posterior probability of ‘x’ being Red = prior probability of Red X likelihood of
„x‟ given Red = 2/6 X 3/20 =1/20 = 0.05
Prior Probability X test evidence = posterior probability
Naive Bayes Rule
Finally we classify „x‟ as Red since it class membership achieves the
largest posterior probability.
Formula to remember
In Naïve Bayes we simply take the maximum & convert them into Yes &
No, Classification.
Rupak Roy
Naive Bayes Rule
Marty
Love
.1
Deal
.8
Life
.1
Rupak Roy
Alica
Love
.5
Deal
.2
Life
.3
Assume,
Prior Probability
P(Alica)=0.5
P(Marty)=0.5
Love Life: So what is the probability of who wrote this mail:
Marty: .1.1 * .5
Alica: .5 .3 * .5(Its Alica) easy by seeing
Life Deal: Marty: .1 .8 .5(prior prob.) = 0.04
Alica: .2 .3 .5(prior prob.) = 0.03. So its Marty.
We can also do the same like
Posterior P(Marty|”Life Deal”)=0.04/(0.04+0.03)=4/7=57
P(Alica|”Life Deal”)=0.03/0.07=3/7=48
(0.04+0.03 i.e. 0.07 way to scale/normalize to 1)
Support Vector Machine
The most popular method of classical classification.
It tries to draw two lines between data points with the largest margin
between them.
Which is the line that best separates the data?
And why this line is the
best line that separates
the data?
What this does it maximizes the distance to the
nearest points and is named as MARGIN.
Margin is the distance between the line and the
nearest point between two classes.
Rupak Roy
Support Vector Machine
Which line here is the best line?
This(blue) line maximizes the distance between the
data points while sacrificing a class which in turn
called as Class Error. So the 2nd(green) is the best
line that maximizes the distance between 2 classes
Support Vector Machine first classifies classes
correctly then maximizes the margin.
How can we solve this?
SVM‟s are good to find the
decision boundaries that max
the distance between classes
and at the same tolerates
the individual outliers.
Outlier
Support Vector Machine (SVM)
Non-Linear Data
Yes SVM will work!
SVM‟s will use Feature X and Y and will convert it
to a label (either Blue or Red)
Now we will have 3 dimensional space where we can separate
the classes linearly.
We will find we will have small amount of Z in X axis and small with blue class.
Z measures the distance from the origin.
So is this linearly separable? Yes!
This blue line in actual represents the circle.
x
Y
𝑧 = 𝑥2
+ 𝑦2
𝑦
𝑥
SVM
Labels
𝑥
𝑧
Decision Tree Classifier
Give a Loan?
Decision trees can separate Non-Linear
To Linear decision surface
DT splits based on node purity..
Entropy – controls how a DT decides where to split the data.
Entropy is a measure of how disorganized a system is.
Common problem: Over-fitting. Solution to this ensemble methods
Credit
History
Good
Debt<1000
No
Time
Bad
Time >18
P=.3
Rupak Roy
Bias-Variance Dilemma
A high biased machine learning algorithm is one that practically ignores
the data. For example train the car (biased) it does the same &
doesn‟t do any thing differently (bad for machine learning).
Again in unbaised car it will result very poor since it doesn‟t have the
biased to generalize to new stuffs.
So in reality we want something in between and we will call it as
Bias-Variance Trade off where the algorithm uses Bias model to
generalize but still very open to listen to new data(un-biased).
Rupak Roy
Clustering
K-nn K nearest neighbor or Memory based reasoning is a powerful data
mining technique that can be used to solve a wide variety of data
mining techniques. It is a classification technique that groups together
observations that are close to each other using distance function to
measure similarity between observation.
Rupak Roy
Feature Scaling
Feature scaling is a method used to normalize the range of
independent variables or features of data. In data processing, it is also
known as data normalization and is generally performed during the
data preprocessing step
Which algorithm would be affected by Feature Scaling?
* Decision Tree: No because there is no trade off.
* SVM: Yes with RB F kernel
* K-means clustering: Yes
* Linear Regression: No because variables are independent to each
other.
Rupak Roy
PCA: Principal component analysis
Principle component is method where can understand the direction in the
data that can project our data on to while loosing a minimal amount of
information. In other words is a dimension-reduction tool that can be used
to reduce a large set of variables to a small set that still contains most of the
information in the large set.
Its like Compression while preserving the information.
When to use PCA
• Latent features (latent features are 'hidden' features to distinguish them
from observed features. An example would be text analysis. 'words'
extracted from the documents are features. Factorize the words we will
get 'topics', where 'topic' is a group of words with semantic relevance. So
these are the variables which cannot be measured directly.)
• To reduce noise for other algorithms enabling them process faster.
• Face recognition- Images which have many pixels, high dimensionality
space, with PCA we can reduce high dimensionality space for svm or
other classification algorithms for faster processing of actual classification
of the picture.
PCA: Principal component analysis
And how do we condense our N features to few so hat we really get
the heart of the information?
Let‟s see how can we do that.
Rupak Roy

More Related Content

What's hot

Understanding random forests
Understanding random forestsUnderstanding random forests
Understanding random forests
Marc Garcia
 
Intro to modelling-supervised learning
Intro to modelling-supervised learningIntro to modelling-supervised learning
Intro to modelling-supervised learning
Justin Sebok
 
Unsupervised Learning Techniques to Diversifying and Pruning Random Forest
Unsupervised Learning Techniques to Diversifying and Pruning Random ForestUnsupervised Learning Techniques to Diversifying and Pruning Random Forest
Unsupervised Learning Techniques to Diversifying and Pruning Random Forest
Mohamed Medhat Gaber
 
From decision trees to random forests
From decision trees to random forestsFrom decision trees to random forests
From decision trees to random forests
Viet-Trung TRAN
 
Machine learning session9(clustering)
Machine learning   session9(clustering)Machine learning   session9(clustering)
Machine learning session9(clustering)
Abhimanyu Dwivedi
 
Decision tree and random forest
Decision tree and random forestDecision tree and random forest
Decision tree and random forest
Lippo Group Digital
 
Machine Learning Unit 3 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 3 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 3 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 3 Semester 3 MSc IT Part 2 Mumbai University
Madhav Mishra
 
Machine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree LearningMachine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree Learningbutest
 
Random Forest Classifier in Machine Learning | Palin Analytics
Random Forest Classifier in Machine Learning | Palin AnalyticsRandom Forest Classifier in Machine Learning | Palin Analytics
Random Forest Classifier in Machine Learning | Palin Analytics
Palin analytics
 
Classification Continued
Classification ContinuedClassification Continued
Classification Continued
DataminingTools Inc
 
Decision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning AlgorithmDecision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning Algorithm
Palin analytics
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
Girish Khanzode
 
Random Forest and KNN is fun
Random Forest and KNN is funRandom Forest and KNN is fun
Random Forest and KNN is fun
Zhen Li
 
Covering (Rules-based) Algorithm
Covering (Rules-based) AlgorithmCovering (Rules-based) Algorithm
Covering (Rules-based) Algorithm
ZHAO Sam
 
Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests
Derek Kane
 
Lect9 Decision tree
Lect9 Decision treeLect9 Decision tree
Lect9 Decision tree
hktripathy
 
Gradient Boosted trees
Gradient Boosted treesGradient Boosted trees
Gradient Boosted trees
Nihar Ranjan
 
Decision tree
Decision treeDecision tree
Decision tree
SEMINARGROOT
 
L4. Ensembles of Decision Trees
L4. Ensembles of Decision TreesL4. Ensembles of Decision Trees
L4. Ensembles of Decision Trees
Machine Learning Valencia
 

What's hot (20)

Understanding random forests
Understanding random forestsUnderstanding random forests
Understanding random forests
 
Intro to modelling-supervised learning
Intro to modelling-supervised learningIntro to modelling-supervised learning
Intro to modelling-supervised learning
 
Unsupervised Learning Techniques to Diversifying and Pruning Random Forest
Unsupervised Learning Techniques to Diversifying and Pruning Random ForestUnsupervised Learning Techniques to Diversifying and Pruning Random Forest
Unsupervised Learning Techniques to Diversifying and Pruning Random Forest
 
From decision trees to random forests
From decision trees to random forestsFrom decision trees to random forests
From decision trees to random forests
 
Machine learning session9(clustering)
Machine learning   session9(clustering)Machine learning   session9(clustering)
Machine learning session9(clustering)
 
Decision tree and random forest
Decision tree and random forestDecision tree and random forest
Decision tree and random forest
 
Machine Learning Unit 3 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 3 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 3 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 3 Semester 3 MSc IT Part 2 Mumbai University
 
Machine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree LearningMachine Learning 3 - Decision Tree Learning
Machine Learning 3 - Decision Tree Learning
 
Random Forest Classifier in Machine Learning | Palin Analytics
Random Forest Classifier in Machine Learning | Palin AnalyticsRandom Forest Classifier in Machine Learning | Palin Analytics
Random Forest Classifier in Machine Learning | Palin Analytics
 
Classification Continued
Classification ContinuedClassification Continued
Classification Continued
 
Decision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning AlgorithmDecision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning Algorithm
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Random forest
Random forestRandom forest
Random forest
 
Random Forest and KNN is fun
Random Forest and KNN is funRandom Forest and KNN is fun
Random Forest and KNN is fun
 
Covering (Rules-based) Algorithm
Covering (Rules-based) AlgorithmCovering (Rules-based) Algorithm
Covering (Rules-based) Algorithm
 
Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests
 
Lect9 Decision tree
Lect9 Decision treeLect9 Decision tree
Lect9 Decision tree
 
Gradient Boosted trees
Gradient Boosted treesGradient Boosted trees
Gradient Boosted trees
 
Decision tree
Decision treeDecision tree
Decision tree
 
L4. Ensembles of Decision Trees
L4. Ensembles of Decision TreesL4. Ensembles of Decision Trees
L4. Ensembles of Decision Trees
 

Similar to Understanding the Machine Learning Algorithms

NLP - Sentiment Analysis
NLP - Sentiment AnalysisNLP - Sentiment Analysis
NLP - Sentiment Analysis
Rupak Roy
 
UNIT2_NaiveBayes algorithms used in machine learning
UNIT2_NaiveBayes algorithms used in machine learningUNIT2_NaiveBayes algorithms used in machine learning
UNIT2_NaiveBayes algorithms used in machine learning
michaelaaron25322
 
Machine learning naive bayes and svm.pdf
Machine learning naive bayes and svm.pdfMachine learning naive bayes and svm.pdf
Machine learning naive bayes and svm.pdf
SubhamKumar3239
 
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learning
AmAn Singh
 
Data mining knowledge representation Notes
Data mining knowledge representation NotesData mining knowledge representation Notes
Data mining knowledge representation Notes
RevathiSundar4
 
Supervised Learning.pptx
Supervised Learning.pptxSupervised Learning.pptx
Telecom Fraudsters Prediction
Telecom Fraudsters Prediction Telecom Fraudsters Prediction
Telecom Fraudsters Prediction
Ashish Ranjan
 
MLEARN 210 B Autumn 2018: Lecture 1
MLEARN 210 B Autumn 2018: Lecture 1MLEARN 210 B Autumn 2018: Lecture 1
MLEARN 210 B Autumn 2018: Lecture 1
heinestien
 
Introduction to Datamining Concept and Techniques
Introduction to Datamining Concept and TechniquesIntroduction to Datamining Concept and Techniques
Introduction to Datamining Concept and Techniques
Sơn Còm Nhom
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
Jason Rodrigues
 
KNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptx
KNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptxKNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptx
KNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptx
Nishant83346
 
Explore ml day 2
Explore ml day 2Explore ml day 2
Explore ml day 2
preetikumara
 
How Does Math Matter in Data Science
How Does Math Matter in Data ScienceHow Does Math Matter in Data Science
How Does Math Matter in Data Science
Mutia Ulfi
 
Explainable AI
Explainable AIExplainable AI
Explainable AI
Arithmer Inc.
 
Naive.pdf
Naive.pdfNaive.pdf
Naive.pdf
MahimMajee
 
Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
sonangrai
 
SVM - Functional Verification
SVM - Functional VerificationSVM - Functional Verification
SVM - Functional Verification
Sai Kiran Kadam
 
General lect
General lectGeneral lect
General lect
rameshbabu3085
 

Similar to Understanding the Machine Learning Algorithms (20)

NLP - Sentiment Analysis
NLP - Sentiment AnalysisNLP - Sentiment Analysis
NLP - Sentiment Analysis
 
UNIT2_NaiveBayes algorithms used in machine learning
UNIT2_NaiveBayes algorithms used in machine learningUNIT2_NaiveBayes algorithms used in machine learning
UNIT2_NaiveBayes algorithms used in machine learning
 
Machine learning naive bayes and svm.pdf
Machine learning naive bayes and svm.pdfMachine learning naive bayes and svm.pdf
Machine learning naive bayes and svm.pdf
 
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learning
 
Data mining knowledge representation Notes
Data mining knowledge representation NotesData mining knowledge representation Notes
Data mining knowledge representation Notes
 
Naive bayes classifier
Naive bayes classifierNaive bayes classifier
Naive bayes classifier
 
Supervised Learning.pptx
Supervised Learning.pptxSupervised Learning.pptx
Supervised Learning.pptx
 
Telecom Fraudsters Prediction
Telecom Fraudsters Prediction Telecom Fraudsters Prediction
Telecom Fraudsters Prediction
 
Ba group3
Ba group3Ba group3
Ba group3
 
MLEARN 210 B Autumn 2018: Lecture 1
MLEARN 210 B Autumn 2018: Lecture 1MLEARN 210 B Autumn 2018: Lecture 1
MLEARN 210 B Autumn 2018: Lecture 1
 
Introduction to Datamining Concept and Techniques
Introduction to Datamining Concept and TechniquesIntroduction to Datamining Concept and Techniques
Introduction to Datamining Concept and Techniques
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
KNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptx
KNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptxKNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptx
KNN CLASSIFIER, INTRODUCTION TO K-NEAREST NEIGHBOR ALGORITHM.pptx
 
Explore ml day 2
Explore ml day 2Explore ml day 2
Explore ml day 2
 
How Does Math Matter in Data Science
How Does Math Matter in Data ScienceHow Does Math Matter in Data Science
How Does Math Matter in Data Science
 
Explainable AI
Explainable AIExplainable AI
Explainable AI
 
Naive.pdf
Naive.pdfNaive.pdf
Naive.pdf
 
Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
 
SVM - Functional Verification
SVM - Functional VerificationSVM - Functional Verification
SVM - Functional Verification
 
General lect
General lectGeneral lect
General lect
 

More from Rupak Roy

Hierarchical Clustering - Text Mining/NLP
Hierarchical Clustering - Text Mining/NLPHierarchical Clustering - Text Mining/NLP
Hierarchical Clustering - Text Mining/NLP
Rupak Roy
 
Clustering K means and Hierarchical - NLP
Clustering K means and Hierarchical - NLPClustering K means and Hierarchical - NLP
Clustering K means and Hierarchical - NLP
Rupak Roy
 
Network Analysis - NLP
Network Analysis  - NLPNetwork Analysis  - NLP
Network Analysis - NLP
Rupak Roy
 
Topic Modeling - NLP
Topic Modeling - NLPTopic Modeling - NLP
Topic Modeling - NLP
Rupak Roy
 
Sentiment Analysis Practical Steps
Sentiment Analysis Practical StepsSentiment Analysis Practical Steps
Sentiment Analysis Practical Steps
Rupak Roy
 
Text Mining using Regular Expressions
Text Mining using Regular ExpressionsText Mining using Regular Expressions
Text Mining using Regular Expressions
Rupak Roy
 
Introduction to Text Mining
Introduction to Text Mining Introduction to Text Mining
Introduction to Text Mining
Rupak Roy
 
Apache Hbase Architecture
Apache Hbase ArchitectureApache Hbase Architecture
Apache Hbase Architecture
Rupak Roy
 
Introduction to Hbase
Introduction to Hbase Introduction to Hbase
Introduction to Hbase
Rupak Roy
 
Apache Hive Table Partition and HQL
Apache Hive Table Partition and HQLApache Hive Table Partition and HQL
Apache Hive Table Partition and HQL
Rupak Roy
 
Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export
Rupak Roy
 
Introductive to Hive
Introductive to Hive Introductive to Hive
Introductive to Hive
Rupak Roy
 
Scoop Job, import and export to RDBMS
Scoop Job, import and export to RDBMSScoop Job, import and export to RDBMS
Scoop Job, import and export to RDBMS
Rupak Roy
 
Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode
Rupak Roy
 
Introduction to scoop and its functions
Introduction to scoop and its functionsIntroduction to scoop and its functions
Introduction to scoop and its functions
Rupak Roy
 
Introduction to Flume
Introduction to FlumeIntroduction to Flume
Introduction to Flume
Rupak Roy
 
Apache Pig Relational Operators - II
Apache Pig Relational Operators - II Apache Pig Relational Operators - II
Apache Pig Relational Operators - II
Rupak Roy
 
Passing Parameters using File and Command Line
Passing Parameters using File and Command LinePassing Parameters using File and Command Line
Passing Parameters using File and Command Line
Rupak Roy
 
Apache PIG Relational Operations
Apache PIG Relational Operations Apache PIG Relational Operations
Apache PIG Relational Operations
Rupak Roy
 
Apache PIG casting, reference
Apache PIG casting, referenceApache PIG casting, reference
Apache PIG casting, reference
Rupak Roy
 

More from Rupak Roy (20)

Hierarchical Clustering - Text Mining/NLP
Hierarchical Clustering - Text Mining/NLPHierarchical Clustering - Text Mining/NLP
Hierarchical Clustering - Text Mining/NLP
 
Clustering K means and Hierarchical - NLP
Clustering K means and Hierarchical - NLPClustering K means and Hierarchical - NLP
Clustering K means and Hierarchical - NLP
 
Network Analysis - NLP
Network Analysis  - NLPNetwork Analysis  - NLP
Network Analysis - NLP
 
Topic Modeling - NLP
Topic Modeling - NLPTopic Modeling - NLP
Topic Modeling - NLP
 
Sentiment Analysis Practical Steps
Sentiment Analysis Practical StepsSentiment Analysis Practical Steps
Sentiment Analysis Practical Steps
 
Text Mining using Regular Expressions
Text Mining using Regular ExpressionsText Mining using Regular Expressions
Text Mining using Regular Expressions
 
Introduction to Text Mining
Introduction to Text Mining Introduction to Text Mining
Introduction to Text Mining
 
Apache Hbase Architecture
Apache Hbase ArchitectureApache Hbase Architecture
Apache Hbase Architecture
 
Introduction to Hbase
Introduction to Hbase Introduction to Hbase
Introduction to Hbase
 
Apache Hive Table Partition and HQL
Apache Hive Table Partition and HQLApache Hive Table Partition and HQL
Apache Hive Table Partition and HQL
 
Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export Installing Apache Hive, internal and external table, import-export
Installing Apache Hive, internal and external table, import-export
 
Introductive to Hive
Introductive to Hive Introductive to Hive
Introductive to Hive
 
Scoop Job, import and export to RDBMS
Scoop Job, import and export to RDBMSScoop Job, import and export to RDBMS
Scoop Job, import and export to RDBMS
 
Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode Apache Scoop - Import with Append mode and Last Modified mode
Apache Scoop - Import with Append mode and Last Modified mode
 
Introduction to scoop and its functions
Introduction to scoop and its functionsIntroduction to scoop and its functions
Introduction to scoop and its functions
 
Introduction to Flume
Introduction to FlumeIntroduction to Flume
Introduction to Flume
 
Apache Pig Relational Operators - II
Apache Pig Relational Operators - II Apache Pig Relational Operators - II
Apache Pig Relational Operators - II
 
Passing Parameters using File and Command Line
Passing Parameters using File and Command LinePassing Parameters using File and Command Line
Passing Parameters using File and Command Line
 
Apache PIG Relational Operations
Apache PIG Relational Operations Apache PIG Relational Operations
Apache PIG Relational Operations
 
Apache PIG casting, reference
Apache PIG casting, referenceApache PIG casting, reference
Apache PIG casting, reference
 

Recently uploaded

1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 

Recently uploaded (20)

1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 

Understanding the Machine Learning Algorithms

  • 2. Supervised Vs Unsupervised Learning • Supervised Learning: Learns by known examples. • Unsupervised Learning Tries to find hidden structure in an unlabeled data • Reinforcement Learning Learns by interacting with the current responses. Supervised Learning Unsupervised Learning Reinforcement Learning Regression K-Means Clustering Genetic Algorithm K-nearest Neighbors PCA EclatN SVM Associated Rules AprioriN Decision Trees Neural Networks Random Forest Neural Networks Rupak Roy
  • 3. Machine Learning by types Unsupervised Learning: • Dimension Reduction: PCA, LSA, SVD, LDA, T-SNE • Pattern Search: Euclat, Apriori • Clustering: K-means, Agglomerative, DBSCAN, Fuzzy C-means Supervised Learning: • Classification: K-NN, Naïve Bayes, SVM, Decision Trees, Logistic Regression. • Regression: Linear Regression, Polynomial Regression, Lasso Regression. Rupak Roy
  • 4. Machine Learning by types Reinforcement Learning Genetic algorithm, ASC, SARSA, Q-learning, Deep Q-network(DQN) Ensemble Methods • Boosting: AdaBoost, catBoost, LightGBM, XGBoost • Bagging: Random Forest • Stacking Neural Nets and Deep Leaning • Convolutional Neural Networks(CNN): DCNN • Recurrent Neural Networks(RNN): LSM, LSTM, GRU • Generative Adversarial Networks(GAN) • Autoencoders: Seq2seq • Perceptron, Multi Layer Perceptron(MLP) Rupak Roy
  • 5. Algorithm Map Here‟s a handy map of algorithm
  • 6. Classification It is technique where the algorithm splits the data into homogeneous group Examples: 1) From an album of tagged photos, recognize some one in a picture. 2) Analyze bank data of weird, looking transactions & flag those for fraud even spam filtering 3) Given someone music choice and a bunch of features of that music. 4) Cluster university student into types based on learning styles. 5) Recognition of handwritten characters as well as language Popular algorithms: Naive Bayes, Decision Tree, Logistic Regression, K- Nearest Neighbors, Support Vector Machine Rupak Roy
  • 7. Naive Bayes Rule In spam filtering the Naive Bayes algorithm was widely used. The algorithm takes the count of “a particular word" mention in the spam list with a normal mail, then it multiplies both probabilities using the Bayes equation. Good word list Spam list Later, spammers figure it out how to trick spam filters by adding lots of "good" words at the end of the email and this method is called Bayesian poisoning. Rupak Roy Great -235 Opportunities -3 Speak -44 Meeting -246 Collaborative-3 Sales-77 Scope - 98 100% - 642 Fast -78 Hurry - 40 “hello” P(B|A) P(A) P(A|B) = = Not Spam P(B)
  • 8. Naive Bayes Rule It ignore few things: words, word order, length. It just looks for frequency to do the classification Naïve Bayes strength & weakness Advantage: Being a supervised classification algorithm it is easy to implement Weakness: It breaks in funny ways. Previously when people did Google search for Chicago bulls. It gave animals rather than city. Because phrases that comprises multiple words with distinct different meanings. Don‟t work with Naïve Bayes. And requires categorical variable as target. Assumptions: Bag of words position doesn‟t matter. Conditional independence. Eg. „Great‟ occurring not dependent or word „fabulous‟ in the same document. Rupak Roy
  • 9. Naive Bayes Rule Prior probability of Green = no.of green objects/total no. of objects Prior probability of Red = No. of Red objects/ total number of objects Green 40/60=4/6 Red 20/60=2/6 Prior probability is computed without any knowledge about the point likelihood computed after knowing what the data point is. What is the likelihood of Red point= no. of red points/ total no. of points in the neighborhood What is the likelihood of green point = no. of green points/ total no. of points in the neighborhood Posterior probability of ‘x’ being Green = prior probability of green X likelihood of „x‟ given Green = 4/6 X1/40=1/60 = 0.016 Posterior probability of ‘x’ being Red = prior probability of Red X likelihood of „x‟ given Red = 2/6 X 3/20 =1/20 = 0.05 Prior Probability X test evidence = posterior probability
  • 10. Naive Bayes Rule Finally we classify „x‟ as Red since it class membership achieves the largest posterior probability. Formula to remember In Naïve Bayes we simply take the maximum & convert them into Yes & No, Classification. Rupak Roy
  • 11. Naive Bayes Rule Marty Love .1 Deal .8 Life .1 Rupak Roy Alica Love .5 Deal .2 Life .3 Assume, Prior Probability P(Alica)=0.5 P(Marty)=0.5 Love Life: So what is the probability of who wrote this mail: Marty: .1.1 * .5 Alica: .5 .3 * .5(Its Alica) easy by seeing Life Deal: Marty: .1 .8 .5(prior prob.) = 0.04 Alica: .2 .3 .5(prior prob.) = 0.03. So its Marty. We can also do the same like Posterior P(Marty|”Life Deal”)=0.04/(0.04+0.03)=4/7=57 P(Alica|”Life Deal”)=0.03/0.07=3/7=48 (0.04+0.03 i.e. 0.07 way to scale/normalize to 1)
  • 12. Support Vector Machine The most popular method of classical classification. It tries to draw two lines between data points with the largest margin between them. Which is the line that best separates the data? And why this line is the best line that separates the data? What this does it maximizes the distance to the nearest points and is named as MARGIN. Margin is the distance between the line and the nearest point between two classes. Rupak Roy
  • 13. Support Vector Machine Which line here is the best line? This(blue) line maximizes the distance between the data points while sacrificing a class which in turn called as Class Error. So the 2nd(green) is the best line that maximizes the distance between 2 classes Support Vector Machine first classifies classes correctly then maximizes the margin. How can we solve this? SVM‟s are good to find the decision boundaries that max the distance between classes and at the same tolerates the individual outliers. Outlier
  • 14. Support Vector Machine (SVM) Non-Linear Data Yes SVM will work! SVM‟s will use Feature X and Y and will convert it to a label (either Blue or Red) Now we will have 3 dimensional space where we can separate the classes linearly. We will find we will have small amount of Z in X axis and small with blue class. Z measures the distance from the origin. So is this linearly separable? Yes! This blue line in actual represents the circle. x Y 𝑧 = 𝑥2 + 𝑦2 𝑦 𝑥 SVM Labels 𝑥 𝑧
  • 15. Decision Tree Classifier Give a Loan? Decision trees can separate Non-Linear To Linear decision surface DT splits based on node purity.. Entropy – controls how a DT decides where to split the data. Entropy is a measure of how disorganized a system is. Common problem: Over-fitting. Solution to this ensemble methods Credit History Good Debt<1000 No Time Bad Time >18 P=.3 Rupak Roy
  • 16. Bias-Variance Dilemma A high biased machine learning algorithm is one that practically ignores the data. For example train the car (biased) it does the same & doesn‟t do any thing differently (bad for machine learning). Again in unbaised car it will result very poor since it doesn‟t have the biased to generalize to new stuffs. So in reality we want something in between and we will call it as Bias-Variance Trade off where the algorithm uses Bias model to generalize but still very open to listen to new data(un-biased). Rupak Roy
  • 17. Clustering K-nn K nearest neighbor or Memory based reasoning is a powerful data mining technique that can be used to solve a wide variety of data mining techniques. It is a classification technique that groups together observations that are close to each other using distance function to measure similarity between observation. Rupak Roy
  • 18. Feature Scaling Feature scaling is a method used to normalize the range of independent variables or features of data. In data processing, it is also known as data normalization and is generally performed during the data preprocessing step Which algorithm would be affected by Feature Scaling? * Decision Tree: No because there is no trade off. * SVM: Yes with RB F kernel * K-means clustering: Yes * Linear Regression: No because variables are independent to each other. Rupak Roy
  • 19. PCA: Principal component analysis Principle component is method where can understand the direction in the data that can project our data on to while loosing a minimal amount of information. In other words is a dimension-reduction tool that can be used to reduce a large set of variables to a small set that still contains most of the information in the large set. Its like Compression while preserving the information. When to use PCA • Latent features (latent features are 'hidden' features to distinguish them from observed features. An example would be text analysis. 'words' extracted from the documents are features. Factorize the words we will get 'topics', where 'topic' is a group of words with semantic relevance. So these are the variables which cannot be measured directly.) • To reduce noise for other algorithms enabling them process faster. • Face recognition- Images which have many pixels, high dimensionality space, with PCA we can reduce high dimensionality space for svm or other classification algorithms for faster processing of actual classification of the picture.
  • 20. PCA: Principal component analysis And how do we condense our N features to few so hat we really get the heart of the information? Let‟s see how can we do that. Rupak Roy