《数据挖掘》习题库及答案.docx
《《数据挖掘》习题库及答案.docx》由会员分享,可在线阅读,更多相关《《数据挖掘》习题库及答案.docx(36页珍藏版)》请在第壹文秘上搜索。
1、数据挖掘复习试题和答案考虑表中二元分类问题的训练样本集表48练习3的数据集实例z目标类1TTLO+2TT6.0+3TF5.04FF4。+5FT7.06FT3.07FF&08TF70+9FT5.Q1.整个训练样本集关于类属性的滴是多少?2.关于这些训练集中a1,a2的信息增益是多少?3.对于连续属性a3,计算所有可能的划分的信息增益。4.根据信息增益,a1,a2,a3哪个是最佳划分?5.根据分类错误率,a1,a2哪具最佳?6.根据gini指标,a1,a2哪个最佳?答1.ExamplesforcomputingEntropyCl0C26Entropy(t)=-p(jOlog2p(jt)P(C1)三
2、0/6=0P(C2)=6/6=1Entropy=-0log0-1logI=-O-O=OP(C1)=16P(C2)=5/6Entropy=-(1/6)Iog2(1/6)-(5/6)Iog2(5/6)=0.65P(C1)=26P(C2)=4/6Entropy=-(2/6)Iog2(2/6)-(4/6)Iog2(4/6)=0.92Z7(+)=4/9andP(一)=5/9-4/9Iog2(4/9)-5/9Iog2(54)=0.9911.答2:SplittingBasedonINFO.InformationGain:Ckr、GAINpht-Entropy(p)-Entropy(J)ParentNode,
3、pissplitintokpartitions;niisnumberofrecordsinpartitioni- MeasuresReductioninEntropyachievedbecauseofthesplit.Choosethesplitthatachievesmostreduction(maximizesGAIN)- UsedinID3andC4.5- Disadvantage:Tendstoprefersplitsthatresultinlargenumberofpartitions,eachbeingsmallbutpure.(估计不考)Forattribute,thecorre
4、spondingcountsandprobabilitiesare:+-TF3114TheentropyforaisI-(34)log2(34)-(l4)log2(l4)+3-(l5)log2(l5)-(45)log2(45)=0.7616.Therefore,theinformationgainforais0.99110.7616=0.2294.Forattributes,thecorrespondingcountsandprobabilitiesare:S+T23F22Theentropyfor敢is3-(25)log2(25)-(35)log2(35)7-(24)log2(24)-(24
5、)log2(24)=0.9839.Therefore,theinformationgainfor做is0.99110.9839=0.0072.ContinuousAttributes:ComputingGiniIndex.Forefficientcomputation:foreachattribute,-Sorttheattributeonvalues一Linearlyscanthesevalues,eachtimeupdatingthecountmatrixandcomputingginiindex一Choosethesplitpositionthathastheleastginiindex
6、CheatSortedVaIues_SplitPositions_NoNoNoYesYesYesNoNoNoIMOI60I7。I75I85TaxableIncome9095100I120125I2255657280879297110122172230Yes0303030312213030303030No0716253434343443526170Gini0.4200.4000.3750.3430.4170.4000.3430.3750.4000.420Tan,Steinbach,KumarIntroductiontoDataMining4/18/200437Q3ClasslabelSplitp
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数据挖掘 数据 挖掘 习题 答案
