Classification Algorithm in Machine Learning.pdf

SivaSankar306103 67 views 20 slides Mar 05, 2025
Slide 1
Slide 1 of 20
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20

About This Presentation

Classification Algorithm in Machine Learning.pdf


Slide Content

Classification Algorithm in
Machine Learning

Classification Algorithm in Machine Learning
•TheSupervisedMachineLearningalgorithmcanbebroadlyclassified
intoRegressionandClassificationAlgorithms.
•InRegressionalgorithms,wehavepredictedtheoutputforcontinuous
values,
•Topredictthecategoricalvalues,weneedClassificationalgorithms.

Classification Algorithm
•TheClassificationalgorithmisaSupervisedLearningtechniquethatis
usedtoidentifythecategoryofnewobservationsonthebasisof
trainingdata.
•InClassification,aprogramlearnsfromthegivendatasetor
observationsandthenclassifiesnewobservationintoanumberof
classesorgroups.
•YesorNo,0or1,SpamorNotSpam,catordog,etc.Classescanbe
calledastargets/labelsorcategories.

•Unlikeregression,theoutputvariableofClassificationisacategory,
notavalue,suchas"GreenorBlue","fruitoranimal",etc.
•SincetheClassificationalgorithmisaSupervisedlearningtechnique,
henceittakeslabeledinputdata,whichmeansitcontainsinputwith
thecorrespondingoutput.
•ThebestexampleofanMLclassificationalgorithmisEmailSpam
Detector.

Types of classifiers
•BinaryClassifier:Iftheclassificationproblemhasonlytwopossible
outcomes,thenitiscalledasBinaryClassifier.
Examples:YESorNO,MALEorFEMALE,SPAMorNOTSPAM,CATor
DOG,etc.
•Multi-classClassifier:Ifaclassificationproblemhasmorethantwo
outcomes,thenitiscalledasMulti-classClassifier.
•Example:Classificationsoftypesofcrops,Classificationoftypesof
music.

Types of ML Classification Algorithms:
•Linear Models
•Logistic Regression
•Support Vector Machines
•Non-linear Models
•K-Nearest Neighbours
•Kernel SVM
•Naïve Bayes
•Decision Tree Classification
•Random Forest Classification

Logistic Regression

Logistic Regression
•LogisticregressionisoneofthemostpopularMachineLearning
algorithms,whichcomesundertheSupervisedLearningtechnique.
•Itisusedforpredictingthecategoricaldependentvariableusinga
givensetofindependentvariables.
•Logisticregressionpredictstheoutputofacategoricaldependent
variable.Thereforetheoutcomemustbeacategoricalordiscrete
value.
•ItcanbeeitherYesorNo,0or1,trueorFalse,etc.butinsteadof
givingtheexactvalueas0and1,itgivestheprobabilisticvalues
whichliebetween0and1.

•LogisticRegressionismuchsimilartotheLinearRegressionexcept
thathowtheyareused.
•LinearRegressionisusedforsolvingRegressionproblems,
whereasLogisticregressionisusedforsolvingtheclassification
problems.
•InLogisticregression,insteadoffittingaregressionline,wefitan"S"
shapedlogisticfunction,whichpredictstwomaximumvalues(0or1).
•Thecurvefromthelogisticfunctionindicatesthelikelihoodof
somethingsuchaswhetherthecellsarecancerousornot,amouseis
obeseornotbasedonitsweight,etc.

Cost function: MSE is not used

Logistic Function (Sigmoid Function):
•Thesigmoidfunctionisamathematicalfunctionusedtomapthe
predictedvaluestoprobabilities.
•Itmapsanyrealvalueintoanothervaluewithinarangeof0and1.
•Thevalueofthelogisticregressionmustbebetween0and1,which
cannotgobeyondthislimit,soitformsacurvelikethe"S"form.The
S-formcurveiscalledtheSigmoidfunctionorthelogisticfunction.
•Inlogisticregression,weusetheconceptofthethresholdvalue,which
definestheprobabilityofeither0or1.Suchasvaluesabovethe
thresholdvaluetendsto1,andavaluebelowthethresholdvalues
tendsto0.

Type of Logistic Regression:
Onthebasisofthecategories,LogisticRegressioncanbeclassifiedinto
threetypes:
•Binomial:InbinomialLogisticregression,therecanbeonlytwo
possibletypesofthedependentvariables,suchas0or1,PassorFail,
etc.
•Multinomial:InmultinomialLogisticregression,therecanbe3or
morepossibleunorderedtypesofthedependentvariable,suchas
"cat","dogs",or"sheep"
•Ordinal:InordinalLogisticregression,therecanbe3ormore
possibleorderedtypesofdependentvariables,suchas"low",
"Medium",or"High".
Tags