SlideShare a Scribd company logo
1 of 8
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
NLP Text Classification
In this paper author implemented naïve bayes algorithm to predict the text classification.
For feature extraction we imported Count Vectorizer, Tf-idf Transformer. We can use linear
model for SGD classification and for model selection we imported Grid serachCv.
Naïve Bayes Classifier Algorithm
It wouldbe difficultandpracticallyimpossible toclassifyawebpage,a document,anemail orany
otherlengthytextnotesmanually.This iswhere Naïve BayesClassifiermachine learningalgorithm
comesto the rescue.A classifierisafunctionthatallocatesa population’s elementvalue fromone of
the available categories.Forinstance,SpamFilteringisa popularapplicationof Naïve Bayes
algorithm.Spamfilterhere,isaclassifierthatassignsalabel “Spam”or “Not Spam” to all the emails.
Naïve BayesClassifierisamongstthe mostpopularlearningmethodgroupedbysimilaritiesthat
workson the popularBayesTheorem of Probability- tobuildmachine learningmodelsparticularly
for disease predictionanddocumentclassification.Itisa simple classification of wordsbasedon
BayesProbabilityTheoremforsubjective analysisof content.
Stochastic Gradient Descent (SGD):
It isa simple yetveryefficientapproachtodiscriminativelearningof linearclassifiersunderconvex
lossfunctionssuchas (linear) SupportVectorMachinesand LogisticRegression.EventhoughSGD
has beenaroundinthe machine learningcommunityforalongtime,ithas receivedaconsiderable
amountof attentionjustrecentlyinthe contextof large-scalelearning.
SGD has beensuccessfullyappliedtolarge-scale andsparse machine learningproblemsoften
encounteredintextclassificationandnatural language processing.Giventhatthe datais sparse,the
classifiersinthismodule easilyscale toproblemswithmore than10^5 trainingexamplesandmore
than 10^5 features.
The advantagesof StochasticGradientDescentare:
 Efficiency.
 Ease of implementation(lotsof opportunitiesforcode tuning).
The disadvantagesof StochasticGradientDescentinclude:
 SGD requiresanumberof hyperparameterssuchas the regularizationparameterandthe
numberof iterations.
 SGD is sensitivetofeature scaling.
Logistic Regression:
The name of thisalgorithmcouldbe a little confusinginthe sense thatLogisticRegressionmachine
learningalgorithmisforclassificationtasksandnotregressionproblems.The name ‘Regression’
here implies thatalinearmodel isfitintothe feature space.
Thisalgorithmappliesalogisticfunctiontoa linearcombinationof featurestopredictthe outcome
of a categorical dependentvariable basedonpredictorvariables.
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
The odds or probabilitiesthatdescribethe outcome of asingle trial are modeledasafunctionof
explanatoryvariables.Logisticregressionalgorithmshelpsestimatethe probabilityof fallingintoa
specificlevel of the categorical dependentvariable basedonthe givenpredictorvariables.
Justsuppose thatyou wantto predictif there will be asnowfall tomorrow inNew York.Here the
outcome of the predictionisnota continuousnumberbecause there will eitherbe snowfallorno
snowfall andhence linearregressioncannotbe applied.Here the outcome variableisone of the
several categoriesandusinglogisticregressionhelps.
Basedon the nature of categorical response,logisticregressionisclassifiedinto3types –
Binary LogisticRegression – The most commonlyusedlogisticregressionwhenthe categorical
response has2 possible outcomesi.e.eitheryesornot.Example –Predictingwhetherastudentwill
pass or fail anexam,predictingwhetherastudentwill have low orhighbloodpressure,predicting
whetheratumor iscancerousor not.
Multi-nominal LogisticRegression - Categorical response has3 or more possible outcomeswithno
ordering.Example-Predictingwhatkindof searchengine (Yahoo,Bing,Google,andMSN) isusedby
majorityof US citizens.
Ordinal Logistic Regression - Categorical response has3or more possible outcomeswithnatural
ordering.Example-Howacustomerrates the service andqualityof foodata restaurantbasedona
scale of 1 to 10.
Let usconsidera simple example where acake manufacturerwantstofindout if bakinga cake at
160°C, 180°C and200°C will produce a‘hard’or ‘soft’varietyof cake ( assumingthe factthat the
bakerysellsboththe varietiesof cake withdifferentnamesandprices).
Logisticregressionisaperfectfitinthisscenarioinsteadof otherstatistical techniques.Forexample,
if the manufacturesproduces2 cake batcheswhereinthe firstbatchcontains20 cakes (of which7
were hardand 13 were soft) andthe secondbatchof cake producedconsistedof 80 cakes(of which
41 were hard and39 were softcakes).Here inthiscase if linearregressionalgorithmisuseditwill
give equal importance boththe batchesof cakesregardlessof the numberof cakesineachbatch.
Applyingalogisticregressionalgorithmwill considerthisfactorandgive the secondbatchof cakes
more weightage thanthe firstbatch.
Support vector machine:
Machine learninginvolvespredictingandclassifyingdataandto do sowe employvariousmachine
learningalgorithmsaccording tothe dataset.SVMor SupportVectorMachine is a linearmodel for
classificationandregressionproblems.Itcansolve linearandnon-linearproblemsandworkwell for
manypractical problems.The ideaof SVMissimple:The algorithmcreatesaline ora hyperplane
whichseparatesthe dataintoclasses.Inmachine learning,the radial basisfunctionkernel,orRBF
kernel,isapopularkernel functionusedinvariouskernelizedlearningalgorithms.Inparticular,itis
commonlyusedinsupportvectormachine classification.Asasimple example,foraclassification
task withonlytwofeatures(like the image above),youcanthinkof a hyperplane asa line that
linearlyseparatesandclassifiesasetof data.
Intuitively,the furtherfromthe hyperplane ourdatapointslie,the more confidentwe are thatthey
have beencorrectlyclassified.We therefore wantourdatapointstobe as far awayfrom the hyper
plane as possible,while still beingonthe correctside of it. So whennew testingdataisadded,
whateverside of the hyperplane itlandswill decide the classthatwe assigntoit.
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
How dowe findthe righthyperplane?
Or, in otherwords,howdowe bestsegregate the twoclasseswithinthe data?
The distance betweenthe hyperplane andthe nearest datapointfromeithersetisknownasthe
margin.The goal isto choose a hyperplane withthe greatestpossible marginbetweenthe hyper
plane andany pointwithinthe trainingset,givingagreaterchance of new data beingclassified
correctly.Both algorithmsgenerate modelfromtraindatasetandnew data will be appliedontrain
model topredictitclass.SVMalgorithmisgivingbetterpredictionaccuracycompare to ANN
algorithm.
PythonPackagesandLibrariesused:Numpy,pandas, tkinter, NLP
PyVISA 1.10.1 1.10.1
PyVISA-py 0.3.1 0.3.1
cycler 0.10.0 0.10.0
imutils 0.5.3 0.5.3
joblib 0.14.1 0.14.1
kiwisolver 1.1.0 1.1.0
matplotlib 3.1.2 3.1.2
nltk 3.4.5 3.4.5
numpy 1.18.1 1.18.1
opencv-python 4.1.2.30 4.1.2.30
pandas 0.25.3 0.25.3
pip 19.0.3 20.0.1
pylab 0.0.2 0.0.2
pyparsing 2.4.6 2.4.6
python-dateutil 2.8.1 2.8.1
pytz 2019.3 2019.3
pyusb 1.0.2 1.0.2
scikit-learn 0.22.1 0.22.1
scipy 1.4.1 1.4.1
seaborn 0.9.0 0.9.0
setuptools 40.8.0 45.1.0
six 1.14.0 1.14.0
sklearn 0.0 0.0
style 1.1.6 1.1.6
styled 0.2.0.post1 0.2.0.post1
Screen shots
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
When we run the code it displays below window
Now click on ‘Download and categories ’ to display dataset
Nowclickon ‘preprocessdataset’topreprocessthe data
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Nowclickon ’count vectorizer’tofitcountVectorizer.
Now click on ‘TF_IDF’ to fit TF-IDF transformation
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Now click on ‘MultinominalNB’ for fitting the MultinominalNB
Now click on ‘SGD Classifier’ for fitting
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com
Now click on ‘Tuned Naïve_Bayes’ tuning for Naïve_Bayes
Now click on ‘Tuned SGD’ tuning for SGD
Venkat Java Projects
Mobile:+91 9966499110
Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com

More Related Content

What's hot

expeditions praneeth_june-2021
expeditions praneeth_june-2021expeditions praneeth_june-2021
expeditions praneeth_june-2021Praneeth Vepakomma
 
Multivariate Data Analysis Project Report
Multivariate Data Analysis Project ReportMultivariate Data Analysis Project Report
Multivariate Data Analysis Project ReportUtkarsh Agrawal
 
Seminar On Naive Bayes for Spam Filtering
Seminar On Naive Bayes for Spam Filtering Seminar On Naive Bayes for Spam Filtering
Seminar On Naive Bayes for Spam Filtering Asrarulhaq Maktedar
 
20131019 生物物理若手 Journal Club
20131019 生物物理若手 Journal Club20131019 生物物理若手 Journal Club
20131019 生物物理若手 Journal ClubMed_KU
 
ICDE2014 Session 14 Data Warehousing
ICDE2014 Session 14 Data WarehousingICDE2014 Session 14 Data Warehousing
ICDE2014 Session 14 Data WarehousingTakuma Wakamori
 
Risk-Aware Response Mechanism with Extended D-S theory
Risk-Aware Response Mechanism with Extended D-S theoryRisk-Aware Response Mechanism with Extended D-S theory
Risk-Aware Response Mechanism with Extended D-S theoryEditor IJCATR
 
Large scale classification of chemical reactions from patent data
Large scale classification of chemical reactions from patent dataLarge scale classification of chemical reactions from patent data
Large scale classification of chemical reactions from patent dataGreg Landrum
 
Predicting Tweet Sentiment
Predicting Tweet SentimentPredicting Tweet Sentiment
Predicting Tweet SentimentLucinda Linde
 
The Use of K-mer Minimizers to Identify Bacterium Genomes in High Throughput ...
The Use of K-mer Minimizers to Identify Bacterium Genomes in High Throughput ...The Use of K-mer Minimizers to Identify Bacterium Genomes in High Throughput ...
The Use of K-mer Minimizers to Identify Bacterium Genomes in High Throughput ...Mackenna Galicia
 
Data acquisition for probabilistic nearest neighbor query
Data acquisition for probabilistic nearest neighbor queryData acquisition for probabilistic nearest neighbor query
Data acquisition for probabilistic nearest neighbor queryieeepondy
 

What's hot (11)

expeditions praneeth_june-2021
expeditions praneeth_june-2021expeditions praneeth_june-2021
expeditions praneeth_june-2021
 
Multivariate Data Analysis Project Report
Multivariate Data Analysis Project ReportMultivariate Data Analysis Project Report
Multivariate Data Analysis Project Report
 
Seminar On Naive Bayes for Spam Filtering
Seminar On Naive Bayes for Spam Filtering Seminar On Naive Bayes for Spam Filtering
Seminar On Naive Bayes for Spam Filtering
 
20131019 生物物理若手 Journal Club
20131019 生物物理若手 Journal Club20131019 生物物理若手 Journal Club
20131019 生物物理若手 Journal Club
 
Svm ms
Svm msSvm ms
Svm ms
 
ICDE2014 Session 14 Data Warehousing
ICDE2014 Session 14 Data WarehousingICDE2014 Session 14 Data Warehousing
ICDE2014 Session 14 Data Warehousing
 
Risk-Aware Response Mechanism with Extended D-S theory
Risk-Aware Response Mechanism with Extended D-S theoryRisk-Aware Response Mechanism with Extended D-S theory
Risk-Aware Response Mechanism with Extended D-S theory
 
Large scale classification of chemical reactions from patent data
Large scale classification of chemical reactions from patent dataLarge scale classification of chemical reactions from patent data
Large scale classification of chemical reactions from patent data
 
Predicting Tweet Sentiment
Predicting Tweet SentimentPredicting Tweet Sentiment
Predicting Tweet Sentiment
 
The Use of K-mer Minimizers to Identify Bacterium Genomes in High Throughput ...
The Use of K-mer Minimizers to Identify Bacterium Genomes in High Throughput ...The Use of K-mer Minimizers to Identify Bacterium Genomes in High Throughput ...
The Use of K-mer Minimizers to Identify Bacterium Genomes in High Throughput ...
 
Data acquisition for probabilistic nearest neighbor query
Data acquisition for probabilistic nearest neighbor queryData acquisition for probabilistic nearest neighbor query
Data acquisition for probabilistic nearest neighbor query
 

Similar to Nlp text classification

Feature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performanceFeature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performanceVenkat Projects
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsVenkat Projects
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsVenkat Projects
 
IEEE 2015 Java Projects
IEEE 2015 Java ProjectsIEEE 2015 Java Projects
IEEE 2015 Java ProjectsVijay Karan
 
Comparison of machine learning methods for breast cancer diagnosis
Comparison of machine learning methods for breast cancer diagnosisComparison of machine learning methods for breast cancer diagnosis
Comparison of machine learning methods for breast cancer diagnosisVenkat Projects
 
IEEE Datamining 2016 Title and Abstract
IEEE  Datamining 2016 Title and AbstractIEEE  Datamining 2016 Title and Abstract
IEEE Datamining 2016 Title and Abstracttsysglobalsolutions
 
RESUME SCREENING USING LSTM
RESUME SCREENING USING LSTMRESUME SCREENING USING LSTM
RESUME SCREENING USING LSTMIRJET Journal
 
Performance Comparision of Machine Learning Algorithms
Performance Comparision of Machine Learning AlgorithmsPerformance Comparision of Machine Learning Algorithms
Performance Comparision of Machine Learning AlgorithmsDinusha Dilanka
 
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...Mumbai Academisc
 
Novel Class Detection Using RBF SVM Kernel from Feature Evolving Data Streams
Novel Class Detection Using RBF SVM Kernel from Feature Evolving Data StreamsNovel Class Detection Using RBF SVM Kernel from Feature Evolving Data Streams
Novel Class Detection Using RBF SVM Kernel from Feature Evolving Data Streamsirjes
 
Data mining projects topics for java and dot net
Data mining projects topics for java and dot netData mining projects topics for java and dot net
Data mining projects topics for java and dot netredpel dot com
 
Traffic Classification using a Statistical Approach
Traffic Classification using a Statistical ApproachTraffic Classification using a Statistical Approach
Traffic Classification using a Statistical ApproachDenis Zuev
 
Prediction of quality for different type of winebased on different feature se...
Prediction of quality for different type of winebased on different feature se...Prediction of quality for different type of winebased on different feature se...
Prediction of quality for different type of winebased on different feature se...Venkat Projects
 
Prediction of quality for different type of winebased on different feature se...
Prediction of quality for different type of winebased on different feature se...Prediction of quality for different type of winebased on different feature se...
Prediction of quality for different type of winebased on different feature se...Venkat Projects
 
Online_News_Popularity_Machine_Learning
Online_News_Popularity_Machine_LearningOnline_News_Popularity_Machine_Learning
Online_News_Popularity_Machine_LearningDibyajyoti Bose
 
Rinfret, Jonathan poster(2)
Rinfret, Jonathan poster(2)Rinfret, Jonathan poster(2)
Rinfret, Jonathan poster(2)Jonathan Rinfret
 
DagdelenSiriwardaneY..
DagdelenSiriwardaneY..DagdelenSiriwardaneY..
DagdelenSiriwardaneY..butest
 
IEEE 2015 Java Projects
IEEE 2015 Java ProjectsIEEE 2015 Java Projects
IEEE 2015 Java ProjectsVijay Karan
 
Deep learning architectures
Deep learning architecturesDeep learning architectures
Deep learning architecturesJoe li
 

Similar to Nlp text classification (20)

Feature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performanceFeature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performance
 
AI Algorithms
AI AlgorithmsAI Algorithms
AI Algorithms
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithms
 
Software defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithmsSoftware defect estimation using machine learning algorithms
Software defect estimation using machine learning algorithms
 
IEEE 2015 Java Projects
IEEE 2015 Java ProjectsIEEE 2015 Java Projects
IEEE 2015 Java Projects
 
Comparison of machine learning methods for breast cancer diagnosis
Comparison of machine learning methods for breast cancer diagnosisComparison of machine learning methods for breast cancer diagnosis
Comparison of machine learning methods for breast cancer diagnosis
 
IEEE Datamining 2016 Title and Abstract
IEEE  Datamining 2016 Title and AbstractIEEE  Datamining 2016 Title and Abstract
IEEE Datamining 2016 Title and Abstract
 
RESUME SCREENING USING LSTM
RESUME SCREENING USING LSTMRESUME SCREENING USING LSTM
RESUME SCREENING USING LSTM
 
Performance Comparision of Machine Learning Algorithms
Performance Comparision of Machine Learning AlgorithmsPerformance Comparision of Machine Learning Algorithms
Performance Comparision of Machine Learning Algorithms
 
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
Bra a bidirectional routing abstraction for asymmetric mobile ad hoc networks...
 
Novel Class Detection Using RBF SVM Kernel from Feature Evolving Data Streams
Novel Class Detection Using RBF SVM Kernel from Feature Evolving Data StreamsNovel Class Detection Using RBF SVM Kernel from Feature Evolving Data Streams
Novel Class Detection Using RBF SVM Kernel from Feature Evolving Data Streams
 
Data mining projects topics for java and dot net
Data mining projects topics for java and dot netData mining projects topics for java and dot net
Data mining projects topics for java and dot net
 
Traffic Classification using a Statistical Approach
Traffic Classification using a Statistical ApproachTraffic Classification using a Statistical Approach
Traffic Classification using a Statistical Approach
 
Prediction of quality for different type of winebased on different feature se...
Prediction of quality for different type of winebased on different feature se...Prediction of quality for different type of winebased on different feature se...
Prediction of quality for different type of winebased on different feature se...
 
Prediction of quality for different type of winebased on different feature se...
Prediction of quality for different type of winebased on different feature se...Prediction of quality for different type of winebased on different feature se...
Prediction of quality for different type of winebased on different feature se...
 
Online_News_Popularity_Machine_Learning
Online_News_Popularity_Machine_LearningOnline_News_Popularity_Machine_Learning
Online_News_Popularity_Machine_Learning
 
Rinfret, Jonathan poster(2)
Rinfret, Jonathan poster(2)Rinfret, Jonathan poster(2)
Rinfret, Jonathan poster(2)
 
DagdelenSiriwardaneY..
DagdelenSiriwardaneY..DagdelenSiriwardaneY..
DagdelenSiriwardaneY..
 
IEEE 2015 Java Projects
IEEE 2015 Java ProjectsIEEE 2015 Java Projects
IEEE 2015 Java Projects
 
Deep learning architectures
Deep learning architecturesDeep learning architectures
Deep learning architectures
 

More from Venkat Projects

1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docxVenkat Projects
 
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...Venkat Projects
 
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docxVenkat Projects
 
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docxVenkat Projects
 
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...Venkat Projects
 
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docxImage Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docxVenkat Projects
 
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...Venkat Projects
 
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...Venkat Projects
 
Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...Venkat Projects
 
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...Venkat Projects
 
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docxVenkat Projects
 
2022 PYTHON MAJOR PROJECTS LIST.docx
2022 PYTHON MAJOR  PROJECTS LIST.docx2022 PYTHON MAJOR  PROJECTS LIST.docx
2022 PYTHON MAJOR PROJECTS LIST.docxVenkat Projects
 
2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docx2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docxVenkat Projects
 
2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docx2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docxVenkat Projects
 
2021 python projects list
2021 python projects list2021 python projects list
2021 python projects listVenkat Projects
 
10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learni10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learniVenkat Projects
 
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...Venkat Projects
 
6.iris recognition using machine learning technique
6.iris recognition using machine learning technique6.iris recognition using machine learning technique
6.iris recognition using machine learning techniqueVenkat Projects
 
5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal cluster5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal clusterVenkat Projects
 

More from Venkat Projects (20)

1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
 
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
12.BLOCKCHAIN BASED MILK DELIVERY PLATFORM FOR STALLHOLDER DAIRY FARMERS IN K...
 
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
10.ATTENDANCE CAPTURE SYSTEM USING FACE RECOGNITION.docx
 
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
9.IMPLEMENTATION OF BLOCKCHAIN IN FINANCIAL SECTOR TO IMPROVE SCALABILITY.docx
 
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
8.Geo Tracking Of Waste And Triggering Alerts And Mapping Areas With High Was...
 
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docxImage Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
Image Forgery Detection Based on Fusion of Lightweight Deep Learning Models.docx
 
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
6.A FOREST FIRE IDENTIFICATION METHOD FOR UNMANNED AERIAL VEHICLE MONITORING ...
 
WATERMARKING IMAGES
WATERMARKING IMAGESWATERMARKING IMAGES
WATERMARKING IMAGES
 
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
4.LOCAL DYNAMIC NEIGHBORHOOD BASED OUTLIER DETECTION APPROACH AND ITS FRAMEWO...
 
Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...Application and evaluation of a K-Medoidsbased shape clustering method for an...
Application and evaluation of a K-Medoidsbased shape clustering method for an...
 
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
OPTIMISED STACKED ENSEMBLE TECHNIQUES IN THE PREDICTION OF CERVICAL CANCER US...
 
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
1.AUTOMATIC DETECTION OF DIABETIC RETINOPATHY USING CNN.docx
 
2022 PYTHON MAJOR PROJECTS LIST.docx
2022 PYTHON MAJOR  PROJECTS LIST.docx2022 PYTHON MAJOR  PROJECTS LIST.docx
2022 PYTHON MAJOR PROJECTS LIST.docx
 
2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docx2022 PYTHON PROJECTS LIST.docx
2022 PYTHON PROJECTS LIST.docx
 
2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docx2021 PYTHON PROJECTS LIST.docx
2021 PYTHON PROJECTS LIST.docx
 
2021 python projects list
2021 python projects list2021 python projects list
2021 python projects list
 
10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learni10.sentiment analysis of customer product reviews using machine learni
10.sentiment analysis of customer product reviews using machine learni
 
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...9.data analysis for understanding the impact of covid–19 vaccinations on the ...
9.data analysis for understanding the impact of covid–19 vaccinations on the ...
 
6.iris recognition using machine learning technique
6.iris recognition using machine learning technique6.iris recognition using machine learning technique
6.iris recognition using machine learning technique
 
5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal cluster5.local community detection algorithm based on minimal cluster
5.local community detection algorithm based on minimal cluster
 

Recently uploaded

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

Nlp text classification

  • 1. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com NLP Text Classification In this paper author implemented naïve bayes algorithm to predict the text classification. For feature extraction we imported Count Vectorizer, Tf-idf Transformer. We can use linear model for SGD classification and for model selection we imported Grid serachCv. Naïve Bayes Classifier Algorithm It wouldbe difficultandpracticallyimpossible toclassifyawebpage,a document,anemail orany otherlengthytextnotesmanually.This iswhere Naïve BayesClassifiermachine learningalgorithm comesto the rescue.A classifierisafunctionthatallocatesa population’s elementvalue fromone of the available categories.Forinstance,SpamFilteringisa popularapplicationof Naïve Bayes algorithm.Spamfilterhere,isaclassifierthatassignsalabel “Spam”or “Not Spam” to all the emails. Naïve BayesClassifierisamongstthe mostpopularlearningmethodgroupedbysimilaritiesthat workson the popularBayesTheorem of Probability- tobuildmachine learningmodelsparticularly for disease predictionanddocumentclassification.Itisa simple classification of wordsbasedon BayesProbabilityTheoremforsubjective analysisof content. Stochastic Gradient Descent (SGD): It isa simple yetveryefficientapproachtodiscriminativelearningof linearclassifiersunderconvex lossfunctionssuchas (linear) SupportVectorMachinesand LogisticRegression.EventhoughSGD has beenaroundinthe machine learningcommunityforalongtime,ithas receivedaconsiderable amountof attentionjustrecentlyinthe contextof large-scalelearning. SGD has beensuccessfullyappliedtolarge-scale andsparse machine learningproblemsoften encounteredintextclassificationandnatural language processing.Giventhatthe datais sparse,the classifiersinthismodule easilyscale toproblemswithmore than10^5 trainingexamplesandmore than 10^5 features. The advantagesof StochasticGradientDescentare:  Efficiency.  Ease of implementation(lotsof opportunitiesforcode tuning). The disadvantagesof StochasticGradientDescentinclude:  SGD requiresanumberof hyperparameterssuchas the regularizationparameterandthe numberof iterations.  SGD is sensitivetofeature scaling. Logistic Regression: The name of thisalgorithmcouldbe a little confusinginthe sense thatLogisticRegressionmachine learningalgorithmisforclassificationtasksandnotregressionproblems.The name ‘Regression’ here implies thatalinearmodel isfitintothe feature space. Thisalgorithmappliesalogisticfunctiontoa linearcombinationof featurestopredictthe outcome of a categorical dependentvariable basedonpredictorvariables.
  • 2. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com The odds or probabilitiesthatdescribethe outcome of asingle trial are modeledasafunctionof explanatoryvariables.Logisticregressionalgorithmshelpsestimatethe probabilityof fallingintoa specificlevel of the categorical dependentvariable basedonthe givenpredictorvariables. Justsuppose thatyou wantto predictif there will be asnowfall tomorrow inNew York.Here the outcome of the predictionisnota continuousnumberbecause there will eitherbe snowfallorno snowfall andhence linearregressioncannotbe applied.Here the outcome variableisone of the several categoriesandusinglogisticregressionhelps. Basedon the nature of categorical response,logisticregressionisclassifiedinto3types – Binary LogisticRegression – The most commonlyusedlogisticregressionwhenthe categorical response has2 possible outcomesi.e.eitheryesornot.Example –Predictingwhetherastudentwill pass or fail anexam,predictingwhetherastudentwill have low orhighbloodpressure,predicting whetheratumor iscancerousor not. Multi-nominal LogisticRegression - Categorical response has3 or more possible outcomeswithno ordering.Example-Predictingwhatkindof searchengine (Yahoo,Bing,Google,andMSN) isusedby majorityof US citizens. Ordinal Logistic Regression - Categorical response has3or more possible outcomeswithnatural ordering.Example-Howacustomerrates the service andqualityof foodata restaurantbasedona scale of 1 to 10. Let usconsidera simple example where acake manufacturerwantstofindout if bakinga cake at 160°C, 180°C and200°C will produce a‘hard’or ‘soft’varietyof cake ( assumingthe factthat the bakerysellsboththe varietiesof cake withdifferentnamesandprices). Logisticregressionisaperfectfitinthisscenarioinsteadof otherstatistical techniques.Forexample, if the manufacturesproduces2 cake batcheswhereinthe firstbatchcontains20 cakes (of which7 were hardand 13 were soft) andthe secondbatchof cake producedconsistedof 80 cakes(of which 41 were hard and39 were softcakes).Here inthiscase if linearregressionalgorithmisuseditwill give equal importance boththe batchesof cakesregardlessof the numberof cakesineachbatch. Applyingalogisticregressionalgorithmwill considerthisfactorandgive the secondbatchof cakes more weightage thanthe firstbatch. Support vector machine: Machine learninginvolvespredictingandclassifyingdataandto do sowe employvariousmachine learningalgorithmsaccording tothe dataset.SVMor SupportVectorMachine is a linearmodel for classificationandregressionproblems.Itcansolve linearandnon-linearproblemsandworkwell for manypractical problems.The ideaof SVMissimple:The algorithmcreatesaline ora hyperplane whichseparatesthe dataintoclasses.Inmachine learning,the radial basisfunctionkernel,orRBF kernel,isapopularkernel functionusedinvariouskernelizedlearningalgorithms.Inparticular,itis commonlyusedinsupportvectormachine classification.Asasimple example,foraclassification task withonlytwofeatures(like the image above),youcanthinkof a hyperplane asa line that linearlyseparatesandclassifiesasetof data. Intuitively,the furtherfromthe hyperplane ourdatapointslie,the more confidentwe are thatthey have beencorrectlyclassified.We therefore wantourdatapointstobe as far awayfrom the hyper plane as possible,while still beingonthe correctside of it. So whennew testingdataisadded, whateverside of the hyperplane itlandswill decide the classthatwe assigntoit.
  • 3. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com How dowe findthe righthyperplane? Or, in otherwords,howdowe bestsegregate the twoclasseswithinthe data? The distance betweenthe hyperplane andthe nearest datapointfromeithersetisknownasthe margin.The goal isto choose a hyperplane withthe greatestpossible marginbetweenthe hyper plane andany pointwithinthe trainingset,givingagreaterchance of new data beingclassified correctly.Both algorithmsgenerate modelfromtraindatasetandnew data will be appliedontrain model topredictitclass.SVMalgorithmisgivingbetterpredictionaccuracycompare to ANN algorithm. PythonPackagesandLibrariesused:Numpy,pandas, tkinter, NLP PyVISA 1.10.1 1.10.1 PyVISA-py 0.3.1 0.3.1 cycler 0.10.0 0.10.0 imutils 0.5.3 0.5.3 joblib 0.14.1 0.14.1 kiwisolver 1.1.0 1.1.0 matplotlib 3.1.2 3.1.2 nltk 3.4.5 3.4.5 numpy 1.18.1 1.18.1 opencv-python 4.1.2.30 4.1.2.30 pandas 0.25.3 0.25.3 pip 19.0.3 20.0.1 pylab 0.0.2 0.0.2 pyparsing 2.4.6 2.4.6 python-dateutil 2.8.1 2.8.1 pytz 2019.3 2019.3 pyusb 1.0.2 1.0.2 scikit-learn 0.22.1 0.22.1 scipy 1.4.1 1.4.1 seaborn 0.9.0 0.9.0 setuptools 40.8.0 45.1.0 six 1.14.0 1.14.0 sklearn 0.0 0.0 style 1.1.6 1.1.6 styled 0.2.0.post1 0.2.0.post1 Screen shots
  • 4. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com When we run the code it displays below window Now click on ‘Download and categories ’ to display dataset Nowclickon ‘preprocessdataset’topreprocessthe data
  • 5. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com Nowclickon ’count vectorizer’tofitcountVectorizer. Now click on ‘TF_IDF’ to fit TF-IDF transformation
  • 6. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com Now click on ‘MultinominalNB’ for fitting the MultinominalNB Now click on ‘SGD Classifier’ for fitting
  • 7. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com Now click on ‘Tuned Naïve_Bayes’ tuning for Naïve_Bayes Now click on ‘Tuned SGD’ tuning for SGD
  • 8. Venkat Java Projects Mobile:+91 9966499110 Visit:www.venkatjavaprojects.com Email:venkatjavaprojects@gmail.com