Наивен Бейс

Определение

байесов метод

Theбайесов методisbasedontheBayesianprincipleandusestheknowledgeofprobabilityandstatisticstoclassifythesampledataset.Duetoitssolidmathematicalfoundation,themisjudgmentrateofBayesianclassificationalgorithmisverylow.Thecharacteristicofбайесов методistocombinethepriorprobabilityandposteriorprobability,whichavoidsthesubjectivebiasofusingonlythepriorprobability,andalsoavoidstheover-fittingphenomenonofusingthesampleinformationalone.TheBayesianclassificationalgorithmshowsahigheraccuracyratewhenthedatasetislarge,andthealgorithmitselfisrelativelysimple.

Наивен байесов алгоритъм

Наивен байесов алгоритъмisoneofthemostwidelyusedclassificationalgorithms.

Naiveбайесов методisbasedontheBayesianalgorithm,whichiscorrespondinglysimplified,thatis,itisassumedthattheattributesareconditionallyindependentofeachotherwhenthetargetvalueisgiven.Thatistosay,noattributevariablehasalargerproportiontothedecisionresult,andnoattributevariablehasasmallerproportiontothedecisionresult.AlthoughthissimplificationmethodreducestheclassificationeffectoftheBayesianclassificationalgorithmtoacertainextent,inactualapplicationscenarios,itgreatlysimplifiesthecomplexityoftheбайесов метод.

Принцип на алгоритъма

NaiveBayesClassification(NBC)isamethodbasedonBayes'theoremandassumingthatthefeatureconditionsareindependentofeachother,firstthroughthegiventrainingSet,taketheindependencebetweenfeaturewordsasthepremise,learnthejointprobabilitydistributionfrominputtooutput,andthenbasedonthelearnedmodel,inputtofindtheoutputthatmaximizestheposteriorprobability

.

Thereisasampledataset,andthecharacteristicattributesetofthecorrespondingsampledatais.Theclassvariableis,thatis,

canbedividedintocategories.Whereismutuallyindependentandrandom,thepriorprobabilityofis,andtheposteriorprobabilityofis
,CanbeobtainedbythenaiveBayesalgorithm,theposteriorprobabilitycanbecalculatedfromthepriorprobability,theevidence,theclassconditionalprobability:/p>

NaiveBayesisbasedontheindependenceofeachfeature.Inthecaseofagivencategoryof,theaboveformulaItcanbefurtherexpressedasthefollowingformula:

Fromtheabovetwoformulas,theposteriorprobabilitycanbecalculatedas:

Sincethesizeofisfixed,whencomparingposteriorprobabilities,onlythenumeratoroftheaboveformulacanbecompared.Therefore,anaiveBayesiancalculationwithsampledatabelongingtothecategorycanbeobtained:

предимства и недостатъци

Предимства

TheNaiveBayesalgorithmassumesthattheattributesofthedatasetareindependentofeachother.Therefore,thelogicofthealgorithmisverysimpleandthealgorithmisrelativelystable.Whenthedatapresentsdifferentcharacteristics,theNaiveBayesalgorithmTheclassificationperformanceofYeshwillnotbemuchdifferent.Inotherwords,therobustnessofthenaiveBayesalgorithmisbetter,anditwillnotshowmuchdifferencefordifferenttypesofdatasets.Whentherelationshipbetweentheattributesofthedatasetisrelativelyindependent,thenaiveBayesclassificationalgorithmwillhavebetterresults.

Недостатъци

TheconditionofattributeindependenceisalsotheshortcomingofthenaiveBayesclassifier.Theindependenceoftheattributesofthedatasetisdifficulttosatisfyinmanycases,becausetheattributesofthedatasetareoftenrelatedtoeachother.Ifthiskindofproblemoccursintheclassificationprocess,theeffectoftheclassificationwillbegreatlyreduced.

Приложение

Текстова класификация

Classificationisabasicprobleminthefieldofdataanalysisandmachinelearning.Текстова класификацияhasbeenwidelyusedinmanyaspectssuchasnetworkinformationfiltering,informationretrievalandinformationrecommendation.Data-drivenclassifierlearninghasalwaysbeenahotspotinrecentyears,withmanymethods,suchasneuralnetworks,decisiontrees,supportvectormachines,andnaiveBayes.Comparedwithotherwell-designedandmorecomplexclassificationalgorithms,thenaiveBayesclassificationalgorithmisoneoftheclassifierswithbetterlearningefficiencyandclassificationeffect.TheintuitivetextclassificationalgorithmisalsothesimplestBayesianclassifier.Ithasgoodinterpretability.ThecharacteristicofthenaiveBayesalgorithmisthatitassumesthattheappearanceofallfeaturesareindependentofeachotherandeachfeatureisequallyimportant.Butinfactthisassumptiondoesnotholdintherealworld:firstly,theinevitableconnectionbetweentwoadjacentwordscannotbeindependent;secondly,foranarticle,someoftherepresentativewordsdetermineitstheme.Thereisnoneedtoreadtheentirearticleandlookatallthewords.Therefore,itisnecessarytoadoptasuitablemethodforfeatureselection,sothatthenaiveBayesclassifiercanachievehigherclassificationefficiency.

други

NaiveBayesalgorithmplaysamoreimportantroleintextrecognitionandimagerecognitiondirection.Anunknowntextorimagecanbeclassifiedaccordingtoitsexistingclassificationrules,andfinallythepurposeofclassificationisachieved.

TheNaiveBayesalgorithmiswidelyusedinreallife,suchastextclassification,spamclassification,creditevaluation,phishingwebsitedetectionandsoon.

Related Articles
TOP