【文章內(nèi)容簡(jiǎn)介】
a Mining: Concepts and Techniques第 7章 : 分類(lèi)和預(yù)測(cè)n What is classification? What is prediction?n Issues regarding classification and predictionn Classification by decision tree inductionn Bayesian Classificationn Classification by Neural Networksn Classification by Support Vector Machines (SVM)n Classification based on concepts from association rule miningn Other Classification Methodsn Predictionn Classification accuracyn Summary2023/2/27 星期六 28Data Mining: Concepts and TechniquesBayesian Classification: Why?n Probabilistic learning: Calculate explicit probabilities for hypothesis, among the most practical approaches to certain types of learning problemsn Incremental: Each training example can incrementally increase/decrease the probability that a hypothesis is correct. Prior knowledge can be bined with observed data.n Probabilistic prediction: Predict multiple hypotheses, weighted by their probabilitiesn Standard: Even when Bayesian methods are putationally intractable, they can provide a standard of optimal decision making against which other methods can be measured2023/2/27 星期六 29Data Mining: Concepts and TechniquesBayesian Theorem: Basicsn Let X be a data sample whose class label is unknownn Let H be a hypothesis that X belongs to class C n For classification problems, determine P(H/X): the probability that the hypothesis holds given the observed data sample Xn P(H): prior probability of hypothesis H (. the initial probability before we observe any data, reflects the background knowledge)n P(X): probability that sample data is observedn P(X|H) : probability of observing the sample X, given that the hypothesis holds2023/2/27 星期六 30Data Mining: Concepts and TechniquesBayesian Theoremn Given training data X, posteriori probability of a hypothesis H, P(H|X) follows the Bayes theoremn Informally, this can be written as posterior =likelihood x prior / evidencen MAP (maximum posteriori) hypothesisn Practical difficulty: require initial knowledge of many probabilities, significant putational cost2023/2/27 星期六 31Data Mining: Concepts and TechniquesNa239。ve Bayes Classifier n A simplified assumption: attributes are conditionally independent:n The product of occurrence of say 2 elements x1 and x2, given the current class is C, is the product of the probabilities of each element taken separately, given the same class P([y1,y2],C) = P(y1,C) * P(y2,C)n No dependence relation between attributes n Greatly reduces the putation cost, only count the class distribution.n Once the probability P(X|Ci) is known, assign X to the class with maximum P(X|Ci)*P(Ci)2023/2/27 星期六 32Data Mining: Concepts and TechniquesTraining datasetClass:C1:buys_puter=‘yes’C2:buys_puter=‘no’Data sample X =(age=30,Ine=medium,Student=yesCredit_rating=Fair)2023/2/27 星期六 33Data Mining: Concepts and TechniquesNa239。ve Bayesian Classifier: Examplen Compute P(X/Ci) for each class P(age=“30” | buys_puter=“yes”) = 2/9= P(age=“30” | buys_puter=“no”) = 3/5 = P(ine=“medium” | buys_puter=“yes”)= 4/9 = P(ine=“medium” | buys_puter=“no”) = 2/5 = P(student=“yes” | buys_puter=“yes)= 6/9 = P(student=“yes” | buys_puter=“no”)= 1/5= P(credit_rating=“fair” | buys_puter=“yes”)=6/9= P(credit_rating=“fair” | buys_puter=“no”)=2/5= X=(age=30 ,ine =medium, student=yes,credit_rating=fair) P(X|Ci) : P(X|buys_puter=“yes”)= x x x = P(X|buys_puter=“no”)= x x x =P(X|Ci)*P(Ci ) : P(X|buys_puter=“yes”) * P(buys_puter=“yes”)= P(X|buys_puter=“yes”) * P(buys_puter=“yes”)=X belongs to class “buys_puter=yes” 2023/2/27 星期六 34Data Mining: Concepts and TechniquesNa239。ve Bayesian Classifier: Commentsn Advantages : n Easy to implement n Good results obtained in most of the casesn Disadvantagesn Assumption: class conditional independence , therefore loss of accuracyn Practically, dependencies exist among variables n ., hospitals: patients: Profile: age, family history etc Symptoms: fever, cough etc., Disease: lung cancer, diabetes etc n Dependencies among these cannot be modeled by Na239。ve Bayesian Classifiern How to deal with these dependencies?n Bayesian Belief Networks 2023/2/27 星期六 35Data Mining: Concepts and TechniquesBayesian Networksn Bayesian belief work allows a subset of the variables conditionally independentn A graphical model of causal relationshipsn Represents dependency among the variables n Gives a specification of joint probability distribution X YZ PqNodes: random variablesqLinks: dependencyqX,Y are the parents of Z, and Y is the parent of PqNo dependency between Z and PqHas no loops or cycles2023/2/27 星期六 36Data Mining: Concepts and TechniquesBayesian Belief Network: An ExampleFamilyHistoryLungCancerPositiveXRaySmokerEmphysemaDyspneaLC~LC(FH, S) (FH, ~S) (~FH, S) (~FH, ~S)Bayesian Belief NetworksThe conditional probability table for the variable LungCancer:Shows the conditional probability for each possible bination of its parents2023/2/27 星期六 37Data Mining: Concepts and TechniquesLearning Bayesian Networksn Several casesn Given both the work structure and all variables observable: learn only the CPTsn Network structure known, some hidden variables: method of gradient descent, analogous to neural work learningn Network structure unknown, all variables observable: search through the model space to reconstruct graph topology n Unknown structure, all hidden variables: no good algorithms known for this purposen D. Heckerman, Bayesian works for data mining2023/2/27 星期六 38Data Mining: Concepts and Techniques第 7章 : 分類(lèi)和預(yù)測(cè)n What is classification? What is prediction?n Issues regarding classification and predictionn Classification by decision tree induction