SlideShare une entreprise Scribd logo
1  sur  24
Tweet Classification
Mentor: Romil Bansal
GROUP NO-37
Manish Jindal(201305578)
Trilok Sharma(201206527)
Yash Shah (201101127)
Guided by : Dr. Vasudeva Varma
Problem Statement : To automatically classify Tweets
from Twitter into various genres based on predefined
Wikipedia Categories.
Motivation:
o Twitter is a major social networking service with over 200
million tweets made every day.
o Twitter provides a list of Trending Topics in real time, but it
is often hard to understand what these trending topics are
about.
o It is important and necessary to classify these topics into
general categories with high accuracy for better
information retrieval.
Data
Dataset :
o Input Data is the static / real-time data consisting of the
user tweets.
o Training dataset :
Fetched from twitter with twitter4j api.
Final Deliverable:
o It will return list of all categories to which the input tweet
belongs.
o It will also give the accuracy of the algorithm used for
classifying tweets.
Categories
We took following categories into consideration for
classifying twitter data.
1)Business 5)Law 9)Politics
2)Education 6)Lifestyle 10)Sports
3)Entertainment 7)Nature 11)Technology
4)Health 8)Places
Concepts used for better performance
 Outliers removal
 To remove low frequent and high frequent words using
Bag of words approach .
 Stop words removal
 To remove most common words, such as the, is, at,
which, and on.
 Keyword Stemming
 To reduce inflected words to their stem, base or root
form using porter stemming
 Cleaning crawl data
Other Concepts used ..
 Spelling Correction
 To correct spellings using Edit distance method.
 Named Entity Recognition:
 For ranking result category and finding most
appropriate.
 Synonym form
 If feature(word) of test query not found as one of
dimension in feature space than replace that word with
its synonym. Done using WordNet.
Tweets Classification Algorithms
We used 3 algorithms for classification
1) Naïve based
2) SVM based Supervised
3) Rule based
Crawl
tweeter data
Tweets Cleaning,
Stop word removal
Create Index file
Of feature vector
Extract Features
(Unique wordlist)
Create feature
vector for each
tweet
Edit Distance,
WordNet
(synonyms)
Test
Query/
Tweet
Create Index file
Of feature vectors
Create
/ Apply
Model files
Output
Category
Training
Testing
Remove Outliers
Tweets Cleaning,
Stop word removal
Create feature
vector for test tweet
Apply Named
Entity
Recognition
Rank result
category
Main idea for Supervised Learning
 Assumption: training set consists of instances of
different classes described cj as conjunctions of
attributes values
 Task: Classify a new instance d based on a tuple of
attribute values into one of the classes cj C
 Key idea: assign the most probable class using
supervised learning algorithm.
Method 1 : Bayes Classifier
 Bayes rule states :
 We used “WEKA” library for machine learning in Bayes
Classifier for our project.
Normalization
Constant
Likelihood Prior
Method 2 : SVM Classifier
(Support Vector Machine)
 Given a new point x, we can score its projection
onto the hyperplane normal:
 I.e., compute score: wTx + b = Σαiyixi
Tx + b
 Decide class based on whether < or > 0
 Can set confidence threshold t.
11
-1
0
1
Score > t: yes
Score < -t: no
Else: don’t
know
12
Multi-class SVM
13
Multi-class SVM Approaches
 1-against-all
Each of the SVMs separates a single class from all
remaining classes (Cortes and Vapnik, 1995)
 1-against-1
Pair-wise. k(k-1)/2, k Y SVMs are trained. Each SVM
separates a pair of classes (Fridman, 1996)
Advantages of SVM
 High dimensional input space
 Few irrelevant features (dense concept)
 Sparse document vectors (sparse instances)
 Text categorization problems are linearly separable
 For linearly inseparable data we can use kernels to map
data into high dimensional space, so that it becomes
linearly separable with hyperplane.
Method 3 : Rule Based
 We defined set of rule to classify a tweet based on term
frequency.
 a. Extract the features of a tweet.
 b. Count term frequency of each feature , the feature
having maximum term frequency from all categories
mentioned above will be our first classification.
 c. As it cannot be right all time so now we maintain
count of categories in which tweet falls , category
which is near to tweet will be our next classification.
Example-
 Tweet=sachin is a good player, who eats apple and
banana which is good for health.
 Feature- sachin,player,eats,apple,health,banana
 Stop word-is,a,good,he,was,for,which,and,who
 Classification- Feature-category term-frequency
sachin-sports 2000
player-sports 900
eating-health 500
apple-technology 1000
health-health 800
banana-health 700
 Max term-frequency - sachin
 So our category is - sports
 2nd approximation -
 Max feature is laying in health i.e. 3 times ,
 So our second approximation would be health.
 If both of these are in same category then we have only
one category.
i.e. if here max feature would be laying in sports than we
have only one result that is sports.
Cross-validation (Accuracy)
 Steps for k-fold cross-validation :
Step 1: split data into k subsets of equal size
Step 2 : use each subset in turn for testing, the
remainder for training
 Often the subsets are stratified before the cross-
validation is performed
 The error estimates are averaged to yield an
overall error estimate
Accuracy Results ( 10 folds)
Accuracy of Algorithm in %
Categories Algo. SVM Naïve Rule
Business 86.6 81.44 98.30
Education 85.71 76.07 81.8
Entertainment 86.8 79.1 87.49
Health 95.67 84.62 90.93
Law 81.17 73.38 75.25
Lifestyle 93.27 89.71 82.42
Nature 87.0 78.64 84.24
Places 81.01 75.35 80.73
Politics 81.91 81.88 76.31
Sports 87.11 83.57 81.87
Technology 83.64 82.44 77.05
Unique features
 Worked on latest Crawled tweeter data using tweeter4j api
 Worked on Eleven different Categories.
 Applied three different method of supervised learning to
classify in different categories.
 Achieved high performance speed with accuracy in range of
85 to 95 %
 Done Tweets Cleaning , Stemming , Stop Word removal.
 Used Edit distance for spelling correction.
 Used Named entity recognition for ranking.
 Used WordNet for Query Expansion and Synonyms
finding.
 Validated using CrossFold (10 fold) validation.
Snapshot
Result
Accuracy
Thank You!

Contenu connexe

Tendances

Sentiment Analysis Using Twitter
Sentiment Analysis Using TwitterSentiment Analysis Using Twitter
Sentiment Analysis Using Twitter
piya chauhan
 
Twitter sentiment analysis ppt
Twitter sentiment analysis pptTwitter sentiment analysis ppt
Twitter sentiment analysis ppt
SonuCreation
 
Sentiment analysis of tweets
Sentiment analysis of tweetsSentiment analysis of tweets
Sentiment analysis of tweets
Vasu Jain
 

Tendances (20)

Twitter sentiment analysis project report
Twitter sentiment analysis project reportTwitter sentiment analysis project report
Twitter sentiment analysis project report
 
Sentiment analysis using ml
Sentiment analysis using mlSentiment analysis using ml
Sentiment analysis using ml
 
Sentiment Analysis using Twitter Data
Sentiment Analysis using Twitter DataSentiment Analysis using Twitter Data
Sentiment Analysis using Twitter Data
 
Twitter sentiment analysis
Twitter sentiment analysisTwitter sentiment analysis
Twitter sentiment analysis
 
Sentiment analysis
Sentiment analysisSentiment analysis
Sentiment analysis
 
Project prSentiment Analysis of Twitter Data Using Machine Learning Approach...
Project prSentiment Analysis  of Twitter Data Using Machine Learning Approach...Project prSentiment Analysis  of Twitter Data Using Machine Learning Approach...
Project prSentiment Analysis of Twitter Data Using Machine Learning Approach...
 
Sentiment Analaysis on Twitter
Sentiment Analaysis on TwitterSentiment Analaysis on Twitter
Sentiment Analaysis on Twitter
 
New sentiment analysis of tweets using python by Ravi kumar
New sentiment analysis of tweets using python by Ravi kumarNew sentiment analysis of tweets using python by Ravi kumar
New sentiment analysis of tweets using python by Ravi kumar
 
Practical sentiment analysis
Practical sentiment analysisPractical sentiment analysis
Practical sentiment analysis
 
Predicting Tweet Sentiment
Predicting Tweet SentimentPredicting Tweet Sentiment
Predicting Tweet Sentiment
 
Twitter Sentiment Analysis
Twitter Sentiment AnalysisTwitter Sentiment Analysis
Twitter Sentiment Analysis
 
Sentiment Analysis Using Twitter
Sentiment Analysis Using TwitterSentiment Analysis Using Twitter
Sentiment Analysis Using Twitter
 
Twitter sentiment analysis ppt
Twitter sentiment analysis pptTwitter sentiment analysis ppt
Twitter sentiment analysis ppt
 
Sentiment Analysis in Twitter
Sentiment Analysis in TwitterSentiment Analysis in Twitter
Sentiment Analysis in Twitter
 
How Sentiment Analysis works
How Sentiment Analysis worksHow Sentiment Analysis works
How Sentiment Analysis works
 
Sentiment analysis of tweets
Sentiment analysis of tweetsSentiment analysis of tweets
Sentiment analysis of tweets
 
Approaches to Sentiment Analysis
Approaches to Sentiment AnalysisApproaches to Sentiment Analysis
Approaches to Sentiment Analysis
 
Twitter sentiment analysis
Twitter sentiment analysisTwitter sentiment analysis
Twitter sentiment analysis
 
Amazon Product Sentiment review
Amazon Product Sentiment reviewAmazon Product Sentiment review
Amazon Product Sentiment review
 
Sentiment analysis
Sentiment analysisSentiment analysis
Sentiment analysis
 

Similaire à Tweets Classification using Naive Bayes and SVM

Computational Biology, Part 4 Protein Coding Regions
Computational Biology, Part 4 Protein Coding RegionsComputational Biology, Part 4 Protein Coding Regions
Computational Biology, Part 4 Protein Coding Regions
butest
 
Paper-Allstate-Claim-Severity
Paper-Allstate-Claim-SeverityPaper-Allstate-Claim-Severity
Paper-Allstate-Claim-Severity
Gon-soo Moon
 
Huong dan cu the svm
Huong dan cu the svmHuong dan cu the svm
Huong dan cu the svm
taikhoan262
 
SubTopic Detection of Tweets Related to an Entity
SubTopic Detection of Tweets Related to an EntitySubTopic Detection of Tweets Related to an Entity
SubTopic Detection of Tweets Related to an Entity
Ankita Kumari
 
Observations
ObservationsObservations
Observations
butest
 
IJCSI-10-6-1-288-292
IJCSI-10-6-1-288-292IJCSI-10-6-1-288-292
IJCSI-10-6-1-288-292
HARDIK SINGH
 

Similaire à Tweets Classification using Naive Bayes and SVM (20)

Svm and maximum entropy model for sentiment analysis of tweets
Svm and maximum entropy model for sentiment analysis of tweetsSvm and maximum entropy model for sentiment analysis of tweets
Svm and maximum entropy model for sentiment analysis of tweets
 
A Fuzzy Logic Intelligent Agent for Information Extraction
A Fuzzy Logic Intelligent Agent for Information ExtractionA Fuzzy Logic Intelligent Agent for Information Extraction
A Fuzzy Logic Intelligent Agent for Information Extraction
 
Methodological Study Of Opinion Mining And Sentiment Analysis Techniques
Methodological Study Of Opinion Mining And Sentiment Analysis Techniques  Methodological Study Of Opinion Mining And Sentiment Analysis Techniques
Methodological Study Of Opinion Mining And Sentiment Analysis Techniques
 
Methodological study of opinion mining and sentiment analysis techniques
Methodological study of opinion mining and sentiment analysis techniquesMethodological study of opinion mining and sentiment analysis techniques
Methodological study of opinion mining and sentiment analysis techniques
 
Machine learning and decision trees
Machine learning and decision treesMachine learning and decision trees
Machine learning and decision trees
 
Computational Biology, Part 4 Protein Coding Regions
Computational Biology, Part 4 Protein Coding RegionsComputational Biology, Part 4 Protein Coding Regions
Computational Biology, Part 4 Protein Coding Regions
 
ifip2008albashiri.pdf
ifip2008albashiri.pdfifip2008albashiri.pdf
ifip2008albashiri.pdf
 
Paper-Allstate-Claim-Severity
Paper-Allstate-Claim-SeverityPaper-Allstate-Claim-Severity
Paper-Allstate-Claim-Severity
 
A survey of modified support vector machine using particle of swarm optimizat...
A survey of modified support vector machine using particle of swarm optimizat...A survey of modified support vector machine using particle of swarm optimizat...
A survey of modified support vector machine using particle of swarm optimizat...
 
Guide
GuideGuide
Guide
 
Huong dan cu the svm
Huong dan cu the svmHuong dan cu the svm
Huong dan cu the svm
 
Presentation on supervised learning
Presentation on supervised learningPresentation on supervised learning
Presentation on supervised learning
 
SubTopic Detection of Tweets Related to an Entity
SubTopic Detection of Tweets Related to an EntitySubTopic Detection of Tweets Related to an Entity
SubTopic Detection of Tweets Related to an Entity
 
IEEE
IEEEIEEE
IEEE
 
Analytical study of feature extraction techniques in opinion mining
Analytical study of feature extraction techniques in opinion miningAnalytical study of feature extraction techniques in opinion mining
Analytical study of feature extraction techniques in opinion mining
 
ANALYTICAL STUDY OF FEATURE EXTRACTION TECHNIQUES IN OPINION MINING
ANALYTICAL STUDY OF FEATURE EXTRACTION TECHNIQUES IN OPINION MININGANALYTICAL STUDY OF FEATURE EXTRACTION TECHNIQUES IN OPINION MINING
ANALYTICAL STUDY OF FEATURE EXTRACTION TECHNIQUES IN OPINION MINING
 
Radial Basis Function Neural Network (RBFNN), Induction Motor, Vector control...
Radial Basis Function Neural Network (RBFNN), Induction Motor, Vector control...Radial Basis Function Neural Network (RBFNN), Induction Motor, Vector control...
Radial Basis Function Neural Network (RBFNN), Induction Motor, Vector control...
 
Four machine learning methods to predict academic achievement of college stud...
Four machine learning methods to predict academic achievement of college stud...Four machine learning methods to predict academic achievement of college stud...
Four machine learning methods to predict academic achievement of college stud...
 
Observations
ObservationsObservations
Observations
 
IJCSI-10-6-1-288-292
IJCSI-10-6-1-288-292IJCSI-10-6-1-288-292
IJCSI-10-6-1-288-292
 

Dernier

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 

Dernier (20)

Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

Tweets Classification using Naive Bayes and SVM

  • 1. Tweet Classification Mentor: Romil Bansal GROUP NO-37 Manish Jindal(201305578) Trilok Sharma(201206527) Yash Shah (201101127) Guided by : Dr. Vasudeva Varma
  • 2. Problem Statement : To automatically classify Tweets from Twitter into various genres based on predefined Wikipedia Categories. Motivation: o Twitter is a major social networking service with over 200 million tweets made every day. o Twitter provides a list of Trending Topics in real time, but it is often hard to understand what these trending topics are about. o It is important and necessary to classify these topics into general categories with high accuracy for better information retrieval.
  • 3. Data Dataset : o Input Data is the static / real-time data consisting of the user tweets. o Training dataset : Fetched from twitter with twitter4j api. Final Deliverable: o It will return list of all categories to which the input tweet belongs. o It will also give the accuracy of the algorithm used for classifying tweets.
  • 4. Categories We took following categories into consideration for classifying twitter data. 1)Business 5)Law 9)Politics 2)Education 6)Lifestyle 10)Sports 3)Entertainment 7)Nature 11)Technology 4)Health 8)Places
  • 5. Concepts used for better performance  Outliers removal  To remove low frequent and high frequent words using Bag of words approach .  Stop words removal  To remove most common words, such as the, is, at, which, and on.  Keyword Stemming  To reduce inflected words to their stem, base or root form using porter stemming  Cleaning crawl data
  • 6. Other Concepts used ..  Spelling Correction  To correct spellings using Edit distance method.  Named Entity Recognition:  For ranking result category and finding most appropriate.  Synonym form  If feature(word) of test query not found as one of dimension in feature space than replace that word with its synonym. Done using WordNet.
  • 7. Tweets Classification Algorithms We used 3 algorithms for classification 1) Naïve based 2) SVM based Supervised 3) Rule based
  • 8. Crawl tweeter data Tweets Cleaning, Stop word removal Create Index file Of feature vector Extract Features (Unique wordlist) Create feature vector for each tweet Edit Distance, WordNet (synonyms) Test Query/ Tweet Create Index file Of feature vectors Create / Apply Model files Output Category Training Testing Remove Outliers Tweets Cleaning, Stop word removal Create feature vector for test tweet Apply Named Entity Recognition Rank result category
  • 9. Main idea for Supervised Learning  Assumption: training set consists of instances of different classes described cj as conjunctions of attributes values  Task: Classify a new instance d based on a tuple of attribute values into one of the classes cj C  Key idea: assign the most probable class using supervised learning algorithm.
  • 10. Method 1 : Bayes Classifier  Bayes rule states :  We used “WEKA” library for machine learning in Bayes Classifier for our project. Normalization Constant Likelihood Prior
  • 11. Method 2 : SVM Classifier (Support Vector Machine)  Given a new point x, we can score its projection onto the hyperplane normal:  I.e., compute score: wTx + b = Σαiyixi Tx + b  Decide class based on whether < or > 0  Can set confidence threshold t. 11 -1 0 1 Score > t: yes Score < -t: no Else: don’t know
  • 13. 13 Multi-class SVM Approaches  1-against-all Each of the SVMs separates a single class from all remaining classes (Cortes and Vapnik, 1995)  1-against-1 Pair-wise. k(k-1)/2, k Y SVMs are trained. Each SVM separates a pair of classes (Fridman, 1996)
  • 14. Advantages of SVM  High dimensional input space  Few irrelevant features (dense concept)  Sparse document vectors (sparse instances)  Text categorization problems are linearly separable  For linearly inseparable data we can use kernels to map data into high dimensional space, so that it becomes linearly separable with hyperplane.
  • 15. Method 3 : Rule Based  We defined set of rule to classify a tweet based on term frequency.  a. Extract the features of a tweet.  b. Count term frequency of each feature , the feature having maximum term frequency from all categories mentioned above will be our first classification.  c. As it cannot be right all time so now we maintain count of categories in which tweet falls , category which is near to tweet will be our next classification.
  • 16. Example-  Tweet=sachin is a good player, who eats apple and banana which is good for health.  Feature- sachin,player,eats,apple,health,banana  Stop word-is,a,good,he,was,for,which,and,who  Classification- Feature-category term-frequency sachin-sports 2000 player-sports 900 eating-health 500 apple-technology 1000 health-health 800 banana-health 700
  • 17.  Max term-frequency - sachin  So our category is - sports  2nd approximation -  Max feature is laying in health i.e. 3 times ,  So our second approximation would be health.  If both of these are in same category then we have only one category. i.e. if here max feature would be laying in sports than we have only one result that is sports.
  • 18. Cross-validation (Accuracy)  Steps for k-fold cross-validation : Step 1: split data into k subsets of equal size Step 2 : use each subset in turn for testing, the remainder for training  Often the subsets are stratified before the cross- validation is performed  The error estimates are averaged to yield an overall error estimate
  • 19. Accuracy Results ( 10 folds) Accuracy of Algorithm in % Categories Algo. SVM Naïve Rule Business 86.6 81.44 98.30 Education 85.71 76.07 81.8 Entertainment 86.8 79.1 87.49 Health 95.67 84.62 90.93 Law 81.17 73.38 75.25 Lifestyle 93.27 89.71 82.42 Nature 87.0 78.64 84.24 Places 81.01 75.35 80.73 Politics 81.91 81.88 76.31 Sports 87.11 83.57 81.87 Technology 83.64 82.44 77.05
  • 20. Unique features  Worked on latest Crawled tweeter data using tweeter4j api  Worked on Eleven different Categories.  Applied three different method of supervised learning to classify in different categories.  Achieved high performance speed with accuracy in range of 85 to 95 %  Done Tweets Cleaning , Stemming , Stop Word removal.  Used Edit distance for spelling correction.  Used Named entity recognition for ranking.  Used WordNet for Query Expansion and Synonyms finding.  Validated using CrossFold (10 fold) validation.