`
lindexi-gd
  • 浏览: 140117 次
社区版块
存档分类
最新评论

数据挖掘 ID3

 
阅读更多

本文讲的是数据挖掘中的ID3,这个有很多人做了,我也没有说什么改善,只是要考试,用我考试记录的来写,具有很大主观性,如果看到有觉得不对或感觉不好,请关掉浏览器或和我说,请不要生气或发不良的言论。

决策树使用属性划分

那么简单的,我有一只猫,不是吃的东西他就回去吃,吃的东西中,不给猫吃的,他就会吃。那么我们拿出一个东西,他就会根据构建的判断

这里写图片描述

ID3算法是由Quinlan首先提出的,该算法是以信息论为基础,以信息熵和信息增益为衡量标准,从而实现对数据的归纳分类。

ID3就是判断那个属性作为节点,例如上面说的,我们有属性 吃的、给猫吃的,两个属性,ID3判断那个属性作为第一个节点,选取完了第一个节点吃的,就从剩下的属性选取。

信息熵

ID3判断是用信息熵,信息熵就是主要是指信息的混乱程度,变量的不确定性越大,熵的值也就越大,这是香农提出,熵的公式可以表示为:

<nobr><span class="math" id="MathJax-Span-1" style="width: 18.776em; display: inline-block;"><span style="display: inline-block; position: relative; width: 14.989em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.069em 1000em 4.109em -0.424em); top: -2.771em; left: 0.003em;"><span class="mrow" id="MathJax-Span-2"><span class="mi" id="MathJax-Span-3" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-4" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5" style="font-family: MathJax_Math-italic;">t</span><span class="mi" id="MathJax-Span-6" style="font-family: MathJax_Math-italic;">r</span><span class="mi" id="MathJax-Span-7" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-8" style="font-family: MathJax_Math-italic;">p</span><span class="mi" id="MathJax-Span-9" style="font-family: MathJax_Math-italic;">y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mo" id="MathJax-Span-10" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-11" style="font-family: MathJax_Math-italic;">S<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mo" id="MathJax-Span-12" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-13" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mo" id="MathJax-Span-14" style="font-family: MathJax_Main; padding-left: 0.269em;">−</span><span class="munderover" id="MathJax-Span-15" style="padding-left: 0.163em;"><span style="display: inline-block; position: relative; width: 1.443em; height: 0px;"><span style="position: absolute; clip: rect(2.669em 1000em 4.376em -0.424em); top: -3.784em; left: 0.003em;"><span class="mo" id="MathJax-Span-16" style="font-family: MathJax_Size2; vertical-align: 0.003em;">∑</span><span style="display: inline-block; width: 0px; height: 3.789em;"></span></span><span style="position: absolute; clip: rect(1.816em 1000em 2.723em -0.477em); top: -1.384em; left: 0.109em;"><span class="texatom" id="MathJax-Span-17"><span class="mrow" id="MathJax-Span-18"><span class="mi" id="MathJax-Span-19" style="font-size: 70.7%; font-family: MathJax_Math-italic;">i</span><span class="mo" id="MathJax-Span-20" style="font-size: 70.7%; font-family: MathJax_Main;">=</span><span class="mn" id="MathJax-Span-21" style="font-size: 70.7%; font-family: MathJax_Main;">1</span></span></span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span><span style="position: absolute; clip: rect(1.869em 1000em 2.616em -0.477em); top: -3.624em; left: 0.376em;"><span class="texatom" id="MathJax-Span-22"><span class="mrow" id="MathJax-Span-23"><span class="mi" id="MathJax-Span-24" style="font-size: 70.7%; font-family: MathJax_Math-italic;">m</span></span></span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mi" id="MathJax-Span-25" style="font-family: MathJax_Math-italic; padding-left: 0.163em;">p</span><span class="mo" id="MathJax-Span-26" style="font-family: MathJax_Main;">(</span><span class="msubsup" id="MathJax-Span-27"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.723em -0.477em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-28" style="font-family: MathJax_Math-italic;">u</span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.589em;"><span class="mi" id="MathJax-Span-29" style="font-size: 70.7%; font-family: MathJax_Math-italic;">i</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mo" id="MathJax-Span-30" style="font-family: MathJax_Main;">)</span><span class="mi" id="MathJax-Span-31" style="font-family: MathJax_Math-italic;">l</span><span class="mi" id="MathJax-Span-32" style="font-family: MathJax_Math-italic;">o</span><span class="msubsup" id="MathJax-Span-33"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.936em -0.477em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-34" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.184em; left: 0.483em;"><span class="mn" id="MathJax-Span-35" style="font-size: 70.7%; font-family: MathJax_Main;">2</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mi" id="MathJax-Span-36" style="font-family: MathJax_Math-italic;">p</span><span class="mo" id="MathJax-Span-37" style="font-family: MathJax_Main;">(</span><span class="msubsup" id="MathJax-Span-38"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.723em -0.477em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-39" style="font-family: MathJax_Math-italic;">u</span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.589em;"><span class="mi" id="MathJax-Span-40" style="font-size: 70.7%; font-family: MathJax_Math-italic;">i</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mo" id="MathJax-Span-41" style="font-family: MathJax_Main;">)</span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 3.603em; vertical-align: -1.53em;"></span></span></nobr>
<script type="math/tex; mode=display" id="MathJax-Element-1"> Entropy(S)=-\sum_{i=1}^{m} p(u_i)log_2p(u_i) </script>
其中 <nobr><span class="math" id="MathJax-Span-42" style="width: 6.029em; display: inline-block;"><span style="display: inline-block; position: relative; width: 4.803em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.496em 1000em 3.576em -0.531em); top: -2.771em; left: 0.003em;"><span class="mrow" id="MathJax-Span-43"><span class="mi" id="MathJax-Span-44" style="font-family: MathJax_Math-italic;">p</span><span class="mo" id="MathJax-Span-45" style="font-family: MathJax_Main;">(</span><span class="msubsup" id="MathJax-Span-46"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.723em -0.477em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-47" style="font-family: MathJax_Math-italic;">u</span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.589em;"><span class="mi" id="MathJax-Span-48" style="font-size: 70.7%; font-family: MathJax_Math-italic;">i</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mo" id="MathJax-Span-49" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-50" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mfrac" id="MathJax-Span-51" style="padding-left: 0.269em;"><span style="display: inline-block; position: relative; width: 1.123em; height: 0px; margin-right: 0.109em; margin-left: 0.109em;"><span style="position: absolute; clip: rect(1.763em 1000em 2.776em -0.371em); top: -3.037em; left: 50%; margin-left: -0.477em;"><span class="mrow" id="MathJax-Span-52"><span class="texatom" id="MathJax-Span-53"><span class="mrow" id="MathJax-Span-54"><span class="mo" id="MathJax-Span-55" style="font-size: 70.7%; font-family: MathJax_Main;">|</span></span></span><span class="msubsup" id="MathJax-Span-56"><span style="display: inline-block; position: relative; width: 0.643em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.616em -0.477em); top: -2.451em; left: 0.003em;"><span class="mi" id="MathJax-Span-57" style="font-size: 70.7%; font-family: MathJax_Math-italic;">u</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span><span style="position: absolute; top: -2.237em; left: 0.429em;"><span class="mi" id="MathJax-Span-58" style="font-size: 50%; font-family: MathJax_Math-italic;">i</span><span style="display: inline-block; width: 0px; height: 2.349em;"></span></span></span></span><span class="texatom" id="MathJax-Span-59"><span class="mrow" id="MathJax-Span-60"><span class="mo" id="MathJax-Span-61" style="font-size: 70.7%; font-family: MathJax_Main;">|</span></span></span></span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span><span style="position: absolute; clip: rect(1.763em 1000em 2.776em -0.371em); top: -2.024em; left: 50%; margin-left: -0.424em;"><span class="mrow" id="MathJax-Span-62"><span class="texatom" id="MathJax-Span-63"><span class="mrow" id="MathJax-Span-64"><span class="mo" id="MathJax-Span-65" style="font-size: 70.7%; font-family: MathJax_Main;">|</span></span></span><span class="mi" id="MathJax-Span-66" style="font-size: 70.7%; font-family: MathJax_Math-italic;">S<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="texatom" id="MathJax-Span-67"><span class="mrow" id="MathJax-Span-68"><span class="mo" id="MathJax-Span-69" style="font-size: 70.7%; font-family: MathJax_Main;">|</span></span></span></span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span><span style="position: absolute; clip: rect(0.856em 1000em 1.229em -0.477em); top: -1.277em; left: 0.003em;"><span style="border-left-width: 1.123em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.25px; vertical-align: 0.003em;"></span><span style="display: inline-block; width: 0px; height: 1.069em;"></span></span></span></span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 2.27em; vertical-align: -0.863em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-2">p(u_i)=\frac{|u_i|}{|S|}</script>,<nobr><span class="math" id="MathJax-Span-70" style="width: 2.776em; display: inline-block;"><span style="display: inline-block; position: relative; width: 2.189em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.869em 1000em 3.203em -0.531em); top: -2.771em; left: 0.003em;"><span class="mrow" id="MathJax-Span-71"><span class="mi" id="MathJax-Span-72" style="font-family: MathJax_Math-italic;">p</span><span class="mo" id="MathJax-Span-73" style="font-family: MathJax_Main;">(</span><span class="msubsup" id="MathJax-Span-74"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.723em -0.477em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-75" style="font-family: MathJax_Math-italic;">u</span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.589em;"><span class="mi" id="MathJax-Span-76" style="font-size: 70.7%; font-family: MathJax_Math-italic;">i</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mo" id="MathJax-Span-77" style="font-family: MathJax_Main;">)</span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.403em; vertical-align: -0.397em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-3">p(u_i)</script>是类别<nobr><span class="math" id="MathJax-Span-78" style="width: 1.176em; display: inline-block;"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.763em 1000em 2.669em -0.477em); top: -2.344em; left: 0.003em;"><span class="mrow" id="MathJax-Span-79"><span class="msubsup" id="MathJax-Span-80"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.723em -0.477em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-81" style="font-family: MathJax_Math-italic;">u</span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.589em;"><span class="mi" id="MathJax-Span-82" style="font-size: 70.7%; font-family: MathJax_Math-italic;">i</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span></span><span style="display: inline-block; width: 0px; height: 2.349em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 0.87em; vertical-align: -0.263em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-4">u_i</script>在S出现概率。

信息不确定大,熵越大,所以把它分离作为节点得到信息多,如果一个熵为0,那么就不用分裂,表示确定,例如看到水100度,得到结果他沸在常温下

信息增益

信息增益(Information gain) 指的是划分前后熵的变化,可以用下面的公式表示:

<nobr><span class="math" id="MathJax-Span-5132" style="width: 100%; display: inline-block; min-width: 17.816em;"><span style="display: inline-block; position: relative; width: 100%; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(4.429em 1000em 9.069em -0.477em); top: -5.331em; left: 0.003em; width: 100%;"><span class="mrow" id="MathJax-Span-5133"><span style="display: inline-block; position: relative; width: 100%; height: 0px;"><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.477em); top: -3.997em; left: 50%; margin-left: -7.144em;"><span class="mi" id="MathJax-Span-5134" style="font-family: MathJax_Math-italic;">i</span><span class="mi" id="MathJax-Span-5135" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5136" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5137" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5138" style="font-family: MathJax_Math-italic;">G</span><span class="mi" id="MathJax-Span-5139" style="font-family: MathJax_Math-italic;">a</span><span class="mi" id="MathJax-Span-5140" style="font-family: MathJax_Math-italic;">i</span><span class="mi" id="MathJax-Span-5141" style="font-family: MathJax_Math-italic;">n</span><span class="mo" id="MathJax-Span-5142" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5143" style="font-family: MathJax_Math-italic;">S<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mo" id="MathJax-Span-5144" style="font-family: MathJax_Main;">,</span><span class="mi" id="MathJax-Span-5145" style="font-family: MathJax_Math-italic; padding-left: 0.163em;">A</span><span class="mo" id="MathJax-Span-5146" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5147" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mi" id="MathJax-Span-5148" style="font-family: MathJax_Math-italic; padding-left: 0.269em;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-5149" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5150" style="font-family: MathJax_Math-italic;">t</span><span class="mi" id="MathJax-Span-5151" style="font-family: MathJax_Math-italic;">r</span><span class="mi" id="MathJax-Span-5152" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5153" style="font-family: MathJax_Math-italic;">p</span><span class="mi" id="MathJax-Span-5154" style="font-family: MathJax_Math-italic;">y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mo" id="MathJax-Span-5155" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5156" style="font-family: MathJax_Math-italic;">S<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mo" id="MathJax-Span-5157" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5158" style="font-family: MathJax_Main; padding-left: 0.216em;">−</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(2.349em 1000em 5.603em -0.424em); top: -1.864em; left: 50%; margin-left: -5.917em;"><span class="munderover" id="MathJax-Span-5159" style=""><span style="display: inline-block; position: relative; width: 3.896em; height: 0px;"><span style="position: absolute; clip: rect(2.669em 1000em 4.376em -0.424em); top: -3.784em; left: 1.229em;"><span class="mo" id="MathJax-Span-5160" style="font-family: MathJax_Size2; vertical-align: 0.003em;">∑</span><span style="display: inline-block; width: 0px; height: 3.789em;"></span></span><span style="position: absolute; clip: rect(1.763em 1000em 2.883em -0.424em); top: -1.277em; left: 0.003em;"><span class="texatom" id="MathJax-Span-5161"><span class="mrow" id="MathJax-Span-5162"><span class="mi" id="MathJax-Span-5163" style="font-size: 70.7%; font-family: MathJax_Math-italic;">V<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mo" id="MathJax-Span-5164" style="font-size: 70.7%; font-family: MathJax_Main;">∈</span><span class="mi" id="MathJax-Span-5165" style="font-size: 70.7%; font-family: MathJax_Math-italic;">V<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5166" style="font-size: 70.7%; font-family: MathJax_Math-italic;">a</span><span class="mi" id="MathJax-Span-5167" style="font-size: 70.7%; font-family: MathJax_Math-italic;">l</span><span class="mi" id="MathJax-Span-5168" style="font-size: 70.7%; font-family: MathJax_Math-italic;">u</span><span class="mi" id="MathJax-Span-5169" style="font-size: 70.7%; font-family: MathJax_Math-italic;">e</span><span class="mo" id="MathJax-Span-5170" style="font-size: 70.7%; font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5171" style="font-size: 70.7%; font-family: MathJax_Math-italic;">A</span><span class="mo" id="MathJax-Span-5172" style="font-size: 70.7%; font-family: MathJax_Main;">)</span></span></span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mfrac" id="MathJax-Span-5173" style="padding-left: 0.163em;"><span style="display: inline-block; position: relative; width: 1.816em; height: 0px; margin-right: 0.109em; margin-left: 0.109em;"><span style="position: absolute; clip: rect(1.869em 1000em 3.203em -0.371em); top: -3.517em; left: 50%; margin-left: -0.851em;"><span class="mrow" id="MathJax-Span-5174"><span class="texatom" id="MathJax-Span-5175"><span class="mrow" id="MathJax-Span-5176"><span class="mo" id="MathJax-Span-5177" style="font-family: MathJax_Main;">|</span></span></span><span class="msubsup" id="MathJax-Span-5178"><span style="display: inline-block; position: relative; width: 1.123em; height: 0px;"><span style="position: absolute; clip: rect(1.709em 1000em 2.723em -0.424em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-5179" style="font-family: MathJax_Math-italic;">S<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.643em;"><span class="mi" id="MathJax-Span-5180" style="font-size: 70.7%; font-family: MathJax_Math-italic;">v</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="texatom" id="MathJax-Span-5181"><span class="mrow" id="MathJax-Span-5182"><span class="mo" id="MathJax-Span-5183" style="font-family: MathJax_Main;">|</span></span></span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span><span style="position: absolute; clip: rect(1.869em 1000em 3.203em -0.371em); top: -2.024em; left: 50%; margin-left: -0.584em;"><span class="mrow" id="MathJax-Span-5184"><span class="texatom" id="MathJax-Span-5185"><span class="mrow" id="MathJax-Span-5186"><span class="mo" id="MathJax-Span-5187" style="font-family: MathJax_Main;">|</span></span></span><span class="mi" id="MathJax-Span-5188" style="font-family: MathJax_Math-italic;">S<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="texatom" id="MathJax-Span-5189"><span class="mrow" id="MathJax-Span-5190"><span class="mo" id="MathJax-Span-5191" style="font-family: MathJax_Main;">|</span></span></span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span><span style="position: absolute; clip: rect(0.856em 1000em 1.229em -0.477em); top: -1.277em; left: 0.003em;"><span style="border-left-width: 1.816em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.25px; vertical-align: 0.003em;"></span><span style="display: inline-block; width: 0px; height: 1.069em;"></span></span></span></span><span class="mi" id="MathJax-Span-5192" style="font-family: MathJax_Math-italic; padding-left: 0.163em;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-5193" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5194" style="font-family: MathJax_Math-italic;">t</span><span class="mi" id="MathJax-Span-5195" style="font-family: MathJax_Math-italic;">r</span><span class="mi" id="MathJax-Span-5196" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5197" style="font-family: MathJax_Math-italic;">p</span><span class="mi" id="MathJax-Span-5198" style="font-family: MathJax_Math-italic;">y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mo" id="MathJax-Span-5199" style="font-family: MathJax_Main;">(</span><span class="msubsup" id="MathJax-Span-5200"><span style="display: inline-block; position: relative; width: 1.123em; height: 0px;"><span style="position: absolute; clip: rect(1.709em 1000em 2.723em -0.424em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-5201" style="font-family: MathJax_Math-italic;">S<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.643em;"><span class="mi" id="MathJax-Span-5202" style="font-size: 70.7%; font-family: MathJax_Math-italic;">v</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mo" id="MathJax-Span-5203" style="font-family: MathJax_Main;">)</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span></span></span><span style="display: inline-block; width: 0px; height: 5.336em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 5.537em; vertical-align: -4.53em;"></span></span></nobr>
<script type="math/tex; mode=display" id="MathJax-Element-95"> infoGain(S,A)=Entropy(S)-\sum_{V\in Value(A)} \frac{|S_v|}{|S|}Entropy(S_v) </script>

其中,A表示样本的属性,<nobr><span class="math" id="MathJax-Span-5204" style="width: 5.229em; display: inline-block;"><span style="display: inline-block; position: relative; width: 4.163em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.869em 1000em 3.203em -0.424em); top: -2.771em; left: 0.003em;"><span class="mrow" id="MathJax-Span-5205"><span class="mi" id="MathJax-Span-5206" style="font-family: MathJax_Math-italic;">V<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.163em;"></span></span><span class="mi" id="MathJax-Span-5207" style="font-family: MathJax_Math-italic;">a</span><span class="mi" id="MathJax-Span-5208" style="font-family: MathJax_Math-italic;">l</span><span class="mi" id="MathJax-Span-5209" style="font-family: MathJax_Math-italic;">u</span><span class="mi" id="MathJax-Span-5210" style="font-family: MathJax_Math-italic;">e</span><span class="mo" id="MathJax-Span-5211" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5212" style="font-family: MathJax_Math-italic;">A</span><span class="mo" id="MathJax-Span-5213" style="font-family: MathJax_Main;">)</span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.403em; vertical-align: -0.397em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-96">Value(A)</script>是属性A所有的取值集合。V是A其中一个属性值,<nobr><span class="math" id="MathJax-Span-5214" style="width: 1.443em; display: inline-block;"><span style="display: inline-block; position: relative; width: 1.123em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.496em 1000em 2.669em -0.424em); top: -2.344em; left: 0.003em;"><span class="mrow" id="MathJax-Span-5215"><span class="msubsup" id="MathJax-Span-5216"><span style="display: inline-block; position: relative; width: 1.123em; height: 0px;"><span style="position: absolute; clip: rect(1.709em 1000em 2.723em -0.424em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-5217" style="font-family: MathJax_Math-italic;">S<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.643em;"><span class="mi" id="MathJax-Span-5218" style="font-size: 70.7%; font-family: MathJax_Math-italic;">v</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span></span><span style="display: inline-block; width: 0px; height: 2.349em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.203em; vertical-align: -0.263em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-97">S_v</script>是S中A的值为V样例的集合。

那么看到这觉得不知道我在说什么,简答例子

我们先用别的大神例子,假如还是我们那个用某人是否网球天气

Day

Outlook

Temperature

Humidity

Wind

PlayTennis

D1

Sunny

Hot

High

Weak

No

D2

Sunny

Hot

High

Strong

No

D3

Overcast

Hot

High

Weak

Yes

D4

Rain

Mild

High

Weak

Yes

D5

Rain

Cool

Normal

Weak

Yes

D6

Rain

Cool

Normal

Strong

No

D7

Overcast

Cool

Normal

Strong

Yes

D8

Sunny

Mild

High

Weak

No

D9

Sunny

Cool

Normal

Weak

Yes

D10

Rain

Mild

Normal

Weak

Yes

D11

Sunny

Mild

Normal

Strong

Yes

D12

Overcast

Mild

High

Strong

Yes

D13

Overcast

Hot

Normal

Weak

Yes

D14

Rain

Mild

High

Strong

No

未知 Outlook=sunny, Temperature=cool,Humidity=high,Wind=strong

那么我们根据现在数据

计算信息熵

我们yes存在9,no存在4,根据<nobr><span class="math" id="MathJax-Span-5219" style="width: 19.843em; display: inline-block;"><span style="display: inline-block; position: relative; width: 15.843em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.816em 1000em 3.203em -0.424em); top: -2.771em; left: 0.003em;"><span class="mrow" id="MathJax-Span-5220"><span class="mi" id="MathJax-Span-5221" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-5222" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5223" style="font-family: MathJax_Math-italic;">t</span><span class="mi" id="MathJax-Span-5224" style="font-family: MathJax_Math-italic;">r</span><span class="mi" id="MathJax-Span-5225" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5226" style="font-family: MathJax_Math-italic;">p</span><span class="mi" id="MathJax-Span-5227" style="font-family: MathJax_Math-italic;">y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mo" id="MathJax-Span-5228" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5229" style="font-family: MathJax_Math-italic;">S<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mo" id="MathJax-Span-5230" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5231" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mo" id="MathJax-Span-5232" style="font-family: MathJax_Main; padding-left: 0.269em;">−</span><span class="munderover" id="MathJax-Span-5233" style="padding-left: 0.163em;"><span style="display: inline-block; position: relative; width: 2.296em; height: 0px;"><span style="position: absolute; clip: rect(1.869em 1000em 3.203em -0.424em); top: -2.771em; left: 0.003em;"><span class="mo" id="MathJax-Span-5234" style="font-family: MathJax_Size1; vertical-align: 0.003em;">∑</span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span><span style="position: absolute; clip: rect(1.976em 1000em 2.616em -0.477em); top: -2.931em; left: 1.069em;"><span class="texatom" id="MathJax-Span-5235"><span class="mrow" id="MathJax-Span-5236"><span class="mi" id="MathJax-Span-5237" style="font-size: 70.7%; font-family: MathJax_Math-italic;">m</span></span></span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span><span style="position: absolute; clip: rect(1.816em 1000em 2.616em -0.477em); top: -2.184em; left: 1.069em;"><span class="texatom" id="MathJax-Span-5238"><span class="mrow" id="MathJax-Span-5239"><span class="mi" id="MathJax-Span-5240" style="font-size: 70.7%; font-family: MathJax_Math-italic;">i</span><span class="mo" id="MathJax-Span-5241" style="font-size: 70.7%; font-family: MathJax_Main;">=</span><span class="mn" id="MathJax-Span-5242" style="font-size: 70.7%; font-family: MathJax_Main;">1</span></span></span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mi" id="MathJax-Span-5243" style="font-family: MathJax_Math-italic; padding-left: 0.163em;">p</span><span class="mo" id="MathJax-Span-5244" style="font-family: MathJax_Main;">(</span><span class="msubsup" id="MathJax-Span-5245"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.723em -0.477em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-5246" style="font-family: MathJax_Math-italic;">u</span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.589em;"><span class="mi" id="MathJax-Span-5247" style="font-size: 70.7%; font-family: MathJax_Math-italic;">i</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mo" id="MathJax-Span-5248" style="font-family: MathJax_Main;">)</span><span class="mi" id="MathJax-Span-5249" style="font-family: MathJax_Math-italic;">l</span><span class="mi" id="MathJax-Span-5250" style="font-family: MathJax_Math-italic;">o</span><span class="msubsup" id="MathJax-Span-5251"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.936em -0.477em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-5252" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.184em; left: 0.483em;"><span class="mn" id="MathJax-Span-5253" style="font-size: 70.7%; font-family: MathJax_Main;">2</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mi" id="MathJax-Span-5254" style="font-family: MathJax_Math-italic;">p</span><span class="mo" id="MathJax-Span-5255" style="font-family: MathJax_Main;">(</span><span class="msubsup" id="MathJax-Span-5256"><span style="display: inline-block; position: relative; width: 0.909em; height: 0px;"><span style="position: absolute; clip: rect(1.976em 1000em 2.723em -0.477em); top: -2.557em; left: 0.003em;"><span class="mi" id="MathJax-Span-5257" style="font-family: MathJax_Math-italic;">u</span><span style="display: inline-block; width: 0px; height: 2.563em;"></span></span><span style="position: absolute; top: -2.291em; left: 0.589em;"><span class="mi" id="MathJax-Span-5258" style="font-size: 70.7%; font-family: MathJax_Math-italic;">i</span><span style="display: inline-block; width: 0px; height: 2.456em;"></span></span></span></span><span class="mo" id="MathJax-Span-5259" style="font-family: MathJax_Main;">)</span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.47em; vertical-align: -0.397em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-98">Entropy(S)=-\sum_{i=1}^{m} p(u_i)log_2p(u_i)</script>

<nobr><span class="math" id="MathJax-Span-5260" style="width: 27.309em; display: inline-block;"><span style="display: inline-block; position: relative; width: 21.816em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(3.096em 1000em 5.549em -0.477em); top: -3.997em; left: 0.003em;"><span class="mrow" id="MathJax-Span-5261"><span style="display: inline-block; position: relative; width: 21.816em; height: 0px;"><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.477em); top: -3.997em; left: 0.003em;"><span class="mi" id="MathJax-Span-5262" style="font-family: MathJax_Math-italic;">i</span><span class="mi" id="MathJax-Span-5263" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5264" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5265" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5266" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5267" style="font-family: MathJax_Math-italic;">D</span><span class="mo" id="MathJax-Span-5268" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5269" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mo" id="MathJax-Span-5270" style="font-family: MathJax_Main; padding-left: 0.269em;">−</span><span class="mn" id="MathJax-Span-5271" style="font-family: MathJax_Main;">9</span><span class="texatom" id="MathJax-Span-5272"><span class="mrow" id="MathJax-Span-5273"><span class="mo" id="MathJax-Span-5274" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5275" style="font-family: MathJax_Main;">14</span><span class="mo" id="MathJax-Span-5276" style="font-family: MathJax_Main; padding-left: 0.216em;">∗</span><span class="mi" id="MathJax-Span-5277" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">l</span><span class="mi" id="MathJax-Span-5278" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5279" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mn" id="MathJax-Span-5280" style="font-family: MathJax_Main;">2</span><span class="mo" id="MathJax-Span-5281" style="font-family: MathJax_Main;">(</span><span class="mn" id="MathJax-Span-5282" style="font-family: MathJax_Main;">9</span><span class="texatom" id="MathJax-Span-5283"><span class="mrow" id="MathJax-Span-5284"><span class="mo" id="MathJax-Span-5285" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5286" style="font-family: MathJax_Main;">14</span><span class="mo" id="MathJax-Span-5287" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5288" style="font-family: MathJax_Main; padding-left: 0.216em;">−</span><span class="mn" id="MathJax-Span-5289" style="font-family: MathJax_Main; padding-left: 0.216em;">5</span><span class="texatom" id="MathJax-Span-5290"><span class="mrow" id="MathJax-Span-5291"><span class="mo" id="MathJax-Span-5292" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5293" style="font-family: MathJax_Main;">14</span><span class="mo" id="MathJax-Span-5294" style="font-family: MathJax_Main; padding-left: 0.216em;">∗</span><span class="mi" id="MathJax-Span-5295" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">l</span><span class="mi" id="MathJax-Span-5296" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5297" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mn" id="MathJax-Span-5298" style="font-family: MathJax_Main;">2</span><span class="mo" id="MathJax-Span-5299" style="font-family: MathJax_Main;">(</span><span class="mn" id="MathJax-Span-5300" style="font-family: MathJax_Main;">5</span><span class="texatom" id="MathJax-Span-5301"><span class="mrow" id="MathJax-Span-5302"><span class="mo" id="MathJax-Span-5303" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5304" style="font-family: MathJax_Main;">14</span><span class="mo" id="MathJax-Span-5305" style="font-family: MathJax_Main;">)</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.149em 1000em 4.163em -0.424em); top: -2.664em; left: 0.003em;"><span class="mo" id="MathJax-Span-5306" style="font-family: MathJax_Main;">=</span><span class="mn" id="MathJax-Span-5307" style="font-family: MathJax_Main; padding-left: 0.269em;">0.940</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span></span></span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 2.803em; vertical-align: -1.797em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-99">info(D)=-9/14 * log2(9/14) - 5/14 * log2(5/14) = 0.940 </script>

对每个属性计算,OUTLOOK属性中,有3个取值:Sunny、Overcast和Rainy,样本分布情况如下:
类别为Yes时,Sunny有2个样本;类别为No时,Sunny有3个样本。
类别为Yes时,Overcast有4个样本;类别为No时,Overcast有0个样本。
类别为Yes时,Rainy有3个样本;类别为No时,Rainy有2个样本。

<nobr><span class="math" id="MathJax-Span-5308" style="width: 27.736em; display: inline-block;"><span style="display: inline-block; position: relative; width: 22.189em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(5.389em 1000em 10.989em -0.477em); top: -6.291em; left: 0.003em;"><span class="mrow" id="MathJax-Span-5309"><span style="display: inline-block; position: relative; width: 22.189em; height: 0px;"><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.477em); top: -3.997em; left: 0.003em;"><span class="mi" id="MathJax-Span-5310" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5311" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5312" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5313" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5314" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5315" style="font-family: MathJax_Math-italic;">O</span><span class="mi" id="MathJax-Span-5316" style="font-family: MathJax_Math-italic;">U<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5317" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5318" style="font-family: MathJax_Math-italic;">L</span><span class="mi" id="MathJax-Span-5319" style="font-family: MathJax_Math-italic;">O</span><span class="mi" id="MathJax-Span-5320" style="font-family: MathJax_Math-italic;">O</span><span class="mi" id="MathJax-Span-5321" style="font-family: MathJax_Math-italic;">K<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mo" id="MathJax-Span-5322" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5323" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mn" id="MathJax-Span-5324" style="font-family: MathJax_Main; padding-left: 0.269em;">5</span><span class="texatom" id="MathJax-Span-5325"><span class="mrow" id="MathJax-Span-5326"><span class="mo" id="MathJax-Span-5327" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5328" style="font-family: MathJax_Main;">14</span><span class="mo" id="MathJax-Span-5329" style="font-family: MathJax_Main; padding-left: 0.216em;">∗</span><span class="mo" id="MathJax-Span-5330" style="font-family: MathJax_Main; padding-left: 0.216em;">[</span><span class="mo" id="MathJax-Span-5331" style="font-family: MathJax_Main;">−</span><span class="mn" id="MathJax-Span-5332" style="font-family: MathJax_Main;">2</span><span class="texatom" id="MathJax-Span-5333"><span class="mrow" id="MathJax-Span-5334"><span class="mo" id="MathJax-Span-5335" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5336" style="font-family: MathJax_Main;">5</span><span class="mo" id="MathJax-Span-5337" style="font-family: MathJax_Main; padding-left: 0.216em;">∗</span><span class="mi" id="MathJax-Span-5338" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">l</span><span class="mi" id="MathJax-Span-5339" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5340" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mn" id="MathJax-Span-5341" style="font-family: MathJax_Main;">2</span><span class="mo" id="MathJax-Span-5342" style="font-family: MathJax_Main;">(</span><span class="mn" id="MathJax-Span-5343" style="font-family: MathJax_Main;">2</span><span class="texatom" id="MathJax-Span-5344"><span class="mrow" id="MathJax-Span-5345"><span class="mo" id="MathJax-Span-5346" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5347" style="font-family: MathJax_Main;">5</span><span class="mo" id="MathJax-Span-5348" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5349" style="font-family: MathJax_Main;">–</span><span class="mn" id="MathJax-Span-5350" style="font-family: MathJax_Main; padding-left: 0.163em;">3</span><span class="texatom" id="MathJax-Span-5351"><span class="mrow" id="MathJax-Span-5352"><span class="mo" id="MathJax-Span-5353" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5354" style="font-family: MathJax_Main;">5</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.424em); top: -2.557em; left: 0.003em;"><span class="mo" id="MathJax-Span-5355" style="font-family: MathJax_Main;">∗</span><span class="mi" id="MathJax-Span-5356" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">l</span><span class="mi" id="MathJax-Span-5357" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5358" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mn" id="MathJax-Span-5359" style="font-family: MathJax_Main;">2</span><span class="mo" id="MathJax-Span-5360" style="font-family: MathJax_Main;">(</span><span class="mn" id="MathJax-Span-5361" style="font-family: MathJax_Main;">3</span><span class="texatom" id="MathJax-Span-5362"><span class="mrow" id="MathJax-Span-5363"><span class="mo" id="MathJax-Span-5364" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5365" style="font-family: MathJax_Main;">5</span><span class="mo" id="MathJax-Span-5366" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5367" style="font-family: MathJax_Main;">]</span><span class="mo" id="MathJax-Span-5368" style="font-family: MathJax_Main; padding-left: 0.216em;">+</span><span class="mn" id="MathJax-Span-5369" style="font-family: MathJax_Main; padding-left: 0.216em;">4</span><span class="texatom" id="MathJax-Span-5370"><span class="mrow" id="MathJax-Span-5371"><span class="mo" id="MathJax-Span-5372" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5373" style="font-family: MathJax_Main;">14</span><span class="mo" id="MathJax-Span-5374" style="font-family: MathJax_Main; padding-left: 0.216em;">∗</span><span class="mo" id="MathJax-Span-5375" style="font-family: MathJax_Main; padding-left: 0.216em;">[</span><span class="mo" id="MathJax-Span-5376" style="font-family: MathJax_Main;">−</span><span class="mn" id="MathJax-Span-5377" style="font-family: MathJax_Main;">4</span><span class="texatom" id="MathJax-Span-5378"><span class="mrow" id="MathJax-Span-5379"><span class="mo" id="MathJax-Span-5380" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5381" style="font-family: MathJax_Main;">4</span><span class="mo" id="MathJax-Span-5382" style="font-family: MathJax_Main; padding-left: 0.216em;">∗</span><span class="mi" id="MathJax-Span-5383" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">l</span><span class="mi" id="MathJax-Span-5384" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5385" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mn" id="MathJax-Span-5386" style="font-family: MathJax_Main;">2</span><span class="mo" id="MathJax-Span-5387" style="font-family: MathJax_Main;">(</span><span class="mn" id="MathJax-Span-5388" style="font-family: MathJax_Main;">4</span><span class="texatom" id="MathJax-Span-5389"><span class="mrow" id="MathJax-Span-5390"><span class="mo" id="MathJax-Span-5391" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5392" style="font-family: MathJax_Main;">4</span><span class="mo" id="MathJax-Span-5393" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5394" style="font-family: MathJax_Main; padding-left: 0.216em;">−</span><span class="mn" id="MathJax-Span-5395" style="font-family: MathJax_Main; padding-left: 0.216em;">0</span><span class="texatom" id="MathJax-Span-5396"><span class="mrow" id="MathJax-Span-5397"><span class="mo" id="MathJax-Span-5398" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5399" style="font-family: MathJax_Main;">4</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.424em); top: -1.117em; left: 0.003em;"><span class="mo" id="MathJax-Span-5400" style="font-family: MathJax_Main;">∗</span><span class="mi" id="MathJax-Span-5401" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">l</span><span class="mi" id="MathJax-Span-5402" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5403" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mn" id="MathJax-Span-5404" style="font-family: MathJax_Main;">2</span><span class="mo" id="MathJax-Span-5405" style="font-family: MathJax_Main;">(</span><span class="mn" id="MathJax-Span-5406" style="font-family: MathJax_Main;">0</span><span class="texatom" id="MathJax-Span-5407"><span class="mrow" id="MathJax-Span-5408"><span class="mo" id="MathJax-Span-5409" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5410" style="font-family: MathJax_Main;">4</span><span class="mo" id="MathJax-Span-5411" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5412" style="font-family: MathJax_Main;">]</span><span class="mo" id="MathJax-Span-5413" style="font-family: MathJax_Main; padding-left: 0.216em;">+</span><span class="mn" id="MathJax-Span-5414" style="font-family: MathJax_Main; padding-left: 0.216em;">5</span><span class="texatom" id="MathJax-Span-5415"><span class="mrow" id="MathJax-Span-5416"><span class="mo" id="MathJax-Span-5417" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5418" style="font-family: MathJax_Main;">14</span><span class="mo" id="MathJax-Span-5419" style="font-family: MathJax_Main; padding-left: 0.216em;">∗</span><span class="mo" id="MathJax-Span-5420" style="font-family: MathJax_Main; padding-left: 0.216em;">[</span><span class="mo" id="MathJax-Span-5421" style="font-family: MathJax_Main;">−</span><span class="mn" id="MathJax-Span-5422" style="font-family: MathJax_Main;">3</span><span class="texatom" id="MathJax-Span-5423"><span class="mrow" id="MathJax-Span-5424"><span class="mo" id="MathJax-Span-5425" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5426" style="font-family: MathJax_Main;">5</span><span class="mo" id="MathJax-Span-5427" style="font-family: MathJax_Main; padding-left: 0.216em;">∗</span><span class="mi" id="MathJax-Span-5428" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">l</span><span class="mi" id="MathJax-Span-5429" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5430" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mn" id="MathJax-Span-5431" style="font-family: MathJax_Main;">2</span><span class="mo" id="MathJax-Span-5432" style="font-family: MathJax_Main;">(</span><span class="mn" id="MathJax-Span-5433" style="font-family: MathJax_Main;">3</span><span class="texatom" id="MathJax-Span-5434"><span class="mrow" id="MathJax-Span-5435"><span class="mo" id="MathJax-Span-5436" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5437" style="font-family: MathJax_Main;">5</span><span class="mo" id="MathJax-Span-5438" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5439" style="font-family: MathJax_Main;">–</span><span class="mn" id="MathJax-Span-5440" style="font-family: MathJax_Main; padding-left: 0.163em;">2</span><span class="texatom" id="MathJax-Span-5441"><span class="mrow" id="MathJax-Span-5442"><span class="mo" id="MathJax-Span-5443" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5444" style="font-family: MathJax_Main;">5</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.424em); top: 0.269em; left: 0.003em;"><span class="mo" id="MathJax-Span-5445" style="font-family: MathJax_Main;">∗</span><span class="mi" id="MathJax-Span-5446" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">l</span><span class="mi" id="MathJax-Span-5447" style="font-family: MathJax_Math-italic;">o</span><span class="mi" id="MathJax-Span-5448" style="font-family: MathJax_Math-italic;">g<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mn" id="MathJax-Span-5449" style="font-family: MathJax_Main;">2</span><span class="mo" id="MathJax-Span-5450" style="font-family: MathJax_Main;">(</span><span class="mn" id="MathJax-Span-5451" style="font-family: MathJax_Main;">2</span><span class="texatom" id="MathJax-Span-5452"><span class="mrow" id="MathJax-Span-5453"><span class="mo" id="MathJax-Span-5454" style="font-family: MathJax_Main;">/</span></span></span><span class="mn" id="MathJax-Span-5455" style="font-family: MathJax_Main;">5</span><span class="mo" id="MathJax-Span-5456" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5457" style="font-family: MathJax_Main;">]</span><span class="mo" id="MathJax-Span-5458" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mn" id="MathJax-Span-5459" style="font-family: MathJax_Main; padding-left: 0.269em;">0.694</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span></span></span><span style="display: inline-block; width: 0px; height: 6.296em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 6.737em; vertical-align: -5.73em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-100">Info(OUTLOOK) = 5/14 * [- 2/5 * log2(2/5) – 3/5 * log2(3/5)] + 4/14 * [ - 4/4 * log2(4/4) - 0/4 * log2(0/4)] + 5/14 * [ - 3/5 * log2(3/5) – 2/5 * log2(2/5)] = 0.694</script>

接着对所有属性计算

<nobr><span class="math" id="MathJax-Span-5460" style="width: 18.776em; display: inline-block;"><span style="display: inline-block; position: relative; width: 14.989em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.869em 1000em 3.203em -0.477em); top: -2.771em; left: 0.003em;"><span class="mrow" id="MathJax-Span-5461"><span class="mi" id="MathJax-Span-5462" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5463" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5464" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5465" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5466" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5467" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5468" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-5469" style="font-family: MathJax_Math-italic;">M<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5470" style="font-family: MathJax_Math-italic;">P<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5471" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-5472" style="font-family: MathJax_Math-italic;">R</span><span class="mi" id="MathJax-Span-5473" style="font-family: MathJax_Math-italic;">A</span><span class="mi" id="MathJax-Span-5474" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5475" style="font-family: MathJax_Math-italic;">U<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5476" style="font-family: MathJax_Math-italic;">R</span><span class="mi" id="MathJax-Span-5477" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mo" id="MathJax-Span-5478" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5479" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mn" id="MathJax-Span-5480" style="font-family: MathJax_Main; padding-left: 0.269em;">0.911</span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.403em; vertical-align: -0.397em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-101">Info(TEMPERATURE)=0.911</script>
<nobr><span class="math" id="MathJax-Span-5481" style="width: 15.629em; display: inline-block;"><span style="display: inline-block; position: relative; width: 12.483em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.869em 1000em 3.203em -0.477em); top: -2.771em; left: 0.003em;"><span class="mrow" id="MathJax-Span-5482"><span class="mi" id="MathJax-Span-5483" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5484" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5485" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5486" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5487" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5488" style="font-family: MathJax_Math-italic;">H<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5489" style="font-family: MathJax_Math-italic;">U<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5490" style="font-family: MathJax_Math-italic;">M<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5491" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5492" style="font-family: MathJax_Math-italic;">D</span><span class="mi" id="MathJax-Span-5493" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5494" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5495" style="font-family: MathJax_Math-italic;">Y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.163em;"></span></span><span class="mo" id="MathJax-Span-5496" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5497" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mn" id="MathJax-Span-5498" style="font-family: MathJax_Main; padding-left: 0.269em;">0.789</span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.403em; vertical-align: -0.397em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-102">Info(HUMIDITY)= 0.789</script>
<nobr><span class="math" id="MathJax-Span-5499" style="width: 13.176em; display: inline-block;"><span style="display: inline-block; position: relative; width: 10.509em; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(1.869em 1000em 3.203em -0.477em); top: -2.771em; left: 0.003em;"><span class="mrow" id="MathJax-Span-5500"><span class="mi" id="MathJax-Span-5501" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5502" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5503" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5504" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5505" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5506" style="font-family: MathJax_Math-italic;">W<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5507" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5508" style="font-family: MathJax_Math-italic;">N<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5509" style="font-family: MathJax_Math-italic;">D</span><span class="mi" id="MathJax-Span-5510" style="font-family: MathJax_Math-italic;">Y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.163em;"></span></span><span class="mo" id="MathJax-Span-5511" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5512" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mn" id="MathJax-Span-5513" style="font-family: MathJax_Main; padding-left: 0.269em;">0.892</span></span><span style="display: inline-block; width: 0px; height: 2.776em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 1.403em; vertical-align: -0.397em;"></span></span></nobr><script type="math/tex" id="MathJax-Element-103">Info(WINDY)=0.892</script>

信息增益

<nobr><span class="math" id="MathJax-Span-5514" style="width: 100%; display: inline-block; min-width: 28.643em;"><span style="display: inline-block; position: relative; width: 100%; height: 0px; font-size: 125%;"><span style="position: absolute; clip: rect(12.749em 1000em 25.763em -0.477em); top: -13.651em; left: 0.003em; width: 100%;"><span class="mrow" id="MathJax-Span-5515"><span style="display: inline-block; position: relative; width: 100%; height: 0px;"><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.424em); top: -3.997em; left: 50%; margin-left: -11.464em;"><span class="mi" id="MathJax-Span-5516" style="font-family: MathJax_Math-italic;">G</span><span class="mi" id="MathJax-Span-5517" style="font-family: MathJax_Math-italic;">a</span><span class="mi" id="MathJax-Span-5518" style="font-family: MathJax_Math-italic;">i</span><span class="mi" id="MathJax-Span-5519" style="font-family: MathJax_Math-italic;">n</span><span class="mo" id="MathJax-Span-5520" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5521" style="font-family: MathJax_Math-italic;">O</span><span class="mi" id="MathJax-Span-5522" style="font-family: MathJax_Math-italic;">U<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5523" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5524" style="font-family: MathJax_Math-italic;">L</span><span class="mi" id="MathJax-Span-5525" style="font-family: MathJax_Math-italic;">O</span><span class="mi" id="MathJax-Span-5526" style="font-family: MathJax_Math-italic;">O</span><span class="mi" id="MathJax-Span-5527" style="font-family: MathJax_Math-italic;">K<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mo" id="MathJax-Span-5528" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5529" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mi" id="MathJax-Span-5530" style="font-family: MathJax_Math-italic; padding-left: 0.269em;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5531" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5532" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5533" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5534" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5535" style="font-family: MathJax_Math-italic;">D</span><span class="mo" id="MathJax-Span-5536" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5537" style="font-family: MathJax_Main; padding-left: 0.216em;">−</span><span class="mi" id="MathJax-Span-5538" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5539" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5540" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5541" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5542" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5543" style="font-family: MathJax_Math-italic;">O</span><span class="mi" id="MathJax-Span-5544" style="font-family: MathJax_Math-italic;">U<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5545" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5546" style="font-family: MathJax_Math-italic;">L</span><span class="mi" id="MathJax-Span-5547" style="font-family: MathJax_Math-italic;">O</span><span class="mi" id="MathJax-Span-5548" style="font-family: MathJax_Math-italic;">O</span><span class="mi" id="MathJax-Span-5549" style="font-family: MathJax_Math-italic;">K<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mo" id="MathJax-Span-5550" style="font-family: MathJax_Main;">)</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.149em 1000em 4.163em -0.477em); top: -2.664em; left: 50%; margin-left: -5.224em;"><span class="mspace" id="MathJax-Span-5551" style="height: 0.003em; vertical-align: 0.003em; width: 0.003em; display: inline-block; overflow: hidden;"></span><span class="mo" id="MathJax-Span-5552" style="font-family: MathJax_Main;">=</span><span class="mn" id="MathJax-Span-5553" style="font-family: MathJax_Main; padding-left: 0.269em;">0.940</span><span class="mo" id="MathJax-Span-5554" style="font-family: MathJax_Main; padding-left: 0.216em;">−</span><span class="mn" id="MathJax-Span-5555" style="font-family: MathJax_Main; padding-left: 0.216em;">0.694</span><span class="mo" id="MathJax-Span-5556" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mn" id="MathJax-Span-5557" style="font-family: MathJax_Main; padding-left: 0.269em;">0.246</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.477em); top: -1.437em; left: 50%; margin-left: -8.317em;"><span class="mspace" id="MathJax-Span-5558" style="height: 0.003em; vertical-align: 0.003em; width: 0.003em; display: inline-block; overflow: hidden;"></span><span class="mi" id="MathJax-Span-5559" style="font-family: MathJax_Math-italic;">G</span><span class="mi" id="MathJax-Span-5560" style="font-family: MathJax_Math-italic;">a</span><span class="mi" id="MathJax-Span-5561" style="font-family: MathJax_Math-italic;">i</span><span class="mi" id="MathJax-Span-5562" style="font-family: MathJax_Math-italic;">n</span><span class="mo" id="MathJax-Span-5563" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5564" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5565" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-5566" style="font-family: MathJax_Math-italic;">M<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5567" style="font-family: MathJax_Math-italic;">P<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5568" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-5569" style="font-family: MathJax_Math-italic;">R</span><span class="mi" id="MathJax-Span-5570" style="font-family: MathJax_Math-italic;">A</span><span class="mi" id="MathJax-Span-5571" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5572" style="font-family: MathJax_Math-italic;">U<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5573" style="font-family: MathJax_Math-italic;">R</span><span class="mi" id="MathJax-Span-5574" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mo" id="MathJax-Span-5575" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5576" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mi" id="MathJax-Span-5577" style="font-family: MathJax_Math-italic; padding-left: 0.269em;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5578" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5579" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5580" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5581" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5582" style="font-family: MathJax_Math-italic;">D</span><span class="mo" id="MathJax-Span-5583" style="font-family: MathJax_Main;">)</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.371em); top: 0.003em; left: 50%; margin-left: -6.237em;"><span class="mo" id="MathJax-Span-5584" style="font-family: MathJax_Main;">−</span><span class="mi" id="MathJax-Span-5585" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5586" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5587" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5588" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5589" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5590" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5591" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-5592" style="font-family: MathJax_Math-italic;">M<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5593" style="font-family: MathJax_Math-italic;">P<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5594" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mi" id="MathJax-Span-5595" style="font-family: MathJax_Math-italic;">R</span><span class="mi" id="MathJax-Span-5596" style="font-family: MathJax_Math-italic;">A</span><span class="mi" id="MathJax-Span-5597" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5598" style="font-family: MathJax_Math-italic;">U<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5599" style="font-family: MathJax_Math-italic;">R</span><span class="mi" id="MathJax-Span-5600" style="font-family: MathJax_Math-italic;">E<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.003em;"></span></span><span class="mo" id="MathJax-Span-5601" style="font-family: MathJax_Main;">)</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.149em 1000em 4.163em -0.477em); top: 1.336em; left: 50%; margin-left: -5.224em;"><span class="mspace" id="MathJax-Span-5602" style="height: 0.003em; vertical-align: 0.003em; width: 0.003em; display: inline-block; overflow: hidden;"></span><span class="mo" id="MathJax-Span-5603" style="font-family: MathJax_Main;">=</span><span class="mn" id="MathJax-Span-5604" style="font-family: MathJax_Main; padding-left: 0.269em;">0.940</span><span class="mo" id="MathJax-Span-5605" style="font-family: MathJax_Main; padding-left: 0.216em;">−</span><span class="mn" id="MathJax-Span-5606" style="font-family: MathJax_Main; padding-left: 0.216em;">0.911</span><span class="mo" id="MathJax-Span-5607" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mn" id="MathJax-Span-5608" style="font-family: MathJax_Main; padding-left: 0.269em;">0.029</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.477em); top: 2.563em; left: 50%; margin-left: -7.037em;"><span class="mspace" id="MathJax-Span-5609" style="height: 0.003em; vertical-align: 0.003em; width: 0.003em; display: inline-block; overflow: hidden;"></span><span class="mi" id="MathJax-Span-5610" style="font-family: MathJax_Math-italic;">G</span><span class="mi" id="MathJax-Span-5611" style="font-family: MathJax_Math-italic;">a</span><span class="mi" id="MathJax-Span-5612" style="font-family: MathJax_Math-italic;">i</span><span class="mi" id="MathJax-Span-5613" style="font-family: MathJax_Math-italic;">n</span><span class="mo" id="MathJax-Span-5614" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5615" style="font-family: MathJax_Math-italic;">H<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5616" style="font-family: MathJax_Math-italic;">U<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5617" style="font-family: MathJax_Math-italic;">M<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5618" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5619" style="font-family: MathJax_Math-italic;">D</span><span class="mi" id="MathJax-Span-5620" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5621" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5622" style="font-family: MathJax_Math-italic;">Y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.163em;"></span></span><span class="mo" id="MathJax-Span-5623" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5624" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mi" id="MathJax-Span-5625" style="font-family: MathJax_Math-italic; padding-left: 0.269em;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5626" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5627" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5628" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5629" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5630" style="font-family: MathJax_Math-italic;">D</span><span class="mo" id="MathJax-Span-5631" style="font-family: MathJax_Main;">)</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.371em); top: 4.003em; left: 50%; margin-left: -4.957em;"><span class="mo" id="MathJax-Span-5632" style="font-family: MathJax_Main;">−</span><span class="mi" id="MathJax-Span-5633" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5634" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5635" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5636" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5637" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5638" style="font-family: MathJax_Math-italic;">H<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5639" style="font-family: MathJax_Math-italic;">U<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5640" style="font-family: MathJax_Math-italic;">M<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5641" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5642" style="font-family: MathJax_Math-italic;">D</span><span class="mi" id="MathJax-Span-5643" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5644" style="font-family: MathJax_Math-italic;">T<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5645" style="font-family: MathJax_Math-italic;">Y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.163em;"></span></span><span class="mo" id="MathJax-Span-5646" style="font-family: MathJax_Main;">)</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.149em 1000em 4.163em -0.477em); top: 5.336em; left: 50%; margin-left: -5.224em;"><span class="mspace" id="MathJax-Span-5647" style="height: 0.003em; vertical-align: 0.003em; width: 0.003em; display: inline-block; overflow: hidden;"></span><span class="mo" id="MathJax-Span-5648" style="font-family: MathJax_Main;">=</span><span class="mn" id="MathJax-Span-5649" style="font-family: MathJax_Main; padding-left: 0.269em;">0.940</span><span class="mo" id="MathJax-Span-5650" style="font-family: MathJax_Main; padding-left: 0.216em;">−</span><span class="mn" id="MathJax-Span-5651" style="font-family: MathJax_Main; padding-left: 0.216em;">0.789</span><span class="mo" id="MathJax-Span-5652" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mn" id="MathJax-Span-5653" style="font-family: MathJax_Main; padding-left: 0.269em;">0.151</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.096em 1000em 4.429em -0.477em); top: 6.563em; left: 50%; margin-left: -10.131em;"><span class="mspace" id="MathJax-Span-5654" style="height: 0.003em; vertical-align: 0.003em; width: 0.003em; display: inline-block; overflow: hidden;"></span><span class="mi" id="MathJax-Span-5655" style="font-family: MathJax_Math-italic;">G</span><span class="mi" id="MathJax-Span-5656" style="font-family: MathJax_Math-italic;">a</span><span class="mi" id="MathJax-Span-5657" style="font-family: MathJax_Math-italic;">i</span><span class="mi" id="MathJax-Span-5658" style="font-family: MathJax_Math-italic;">n</span><span class="mo" id="MathJax-Span-5659" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5660" style="font-family: MathJax_Math-italic;">W<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5661" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5662" style="font-family: MathJax_Math-italic;">N<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5663" style="font-family: MathJax_Math-italic;">D</span><span class="mi" id="MathJax-Span-5664" style="font-family: MathJax_Math-italic;">Y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.163em;"></span></span><span class="mo" id="MathJax-Span-5665" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5666" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mi" id="MathJax-Span-5667" style="font-family: MathJax_Math-italic; padding-left: 0.269em;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5668" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5669" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5670" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5671" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5672" style="font-family: MathJax_Math-italic;">D</span><span class="mo" id="MathJax-Span-5673" style="font-family: MathJax_Main;">)</span><span class="mo" id="MathJax-Span-5674" style="font-family: MathJax_Main; padding-left: 0.216em;">−</span><span class="mi" id="MathJax-Span-5675" style="font-family: MathJax_Math-italic; padding-left: 0.216em;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5676" style="font-family: MathJax_Math-italic;">n</span><span class="mi" id="MathJax-Span-5677" style="font-family: MathJax_Math-italic;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5678" style="font-family: MathJax_Math-italic;">o</span><span class="mo" id="MathJax-Span-5679" style="font-family: MathJax_Main;">(</span><span class="mi" id="MathJax-Span-5680" style="font-family: MathJax_Math-italic;">W<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5681" style="font-family: MathJax_Math-italic;">I<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.056em;"></span></span><span class="mi" id="MathJax-Span-5682" style="font-family: MathJax_Math-italic;">N<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.109em;"></span></span><span class="mi" id="MathJax-Span-5683" style="font-family: MathJax_Math-italic;">D</span><span class="mi" id="MathJax-Span-5684" style="font-family: MathJax_Math-italic;">Y<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.163em;"></span></span><span class="mo" id="MathJax-Span-5685" style="font-family: MathJax_Main;">)</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span><span style="position: absolute; clip: rect(3.149em 1000em 4.163em -0.477em); top: 7.896em; left: 50%; margin-left: -5.224em;"><span class="mspace" id="MathJax-Span-5686" style="height: 0.003em; vertical-align: 0.003em; width: 0.003em; display: inline-block; overflow: hidden;"></span><span class="mo" id="MathJax-Span-5687" style="font-family: MathJax_Main;">=</span><span class="mn" id="MathJax-Span-5688" style="font-family: MathJax_Main; padding-left: 0.269em;">0.940</span><span class="mo" id="MathJax-Span-5689" style="font-family: MathJax_Main; padding-left: 0.216em;">−</span><span class="mn" id="MathJax-Span-5690" style="font-family: MathJax_Main; padding-left: 0.216em;">0.892</span><span class="mo" id="MathJax-Span-5691" style="font-family: MathJax_Main; padding-left: 0.269em;">=</span><span class="mn" id="MathJax-Span-5692" style="font-family: MathJax_Main; padding-left: 0.269em;">0.048</span><span style="display: inline-block; width: 0px; height: 4.003em;"></span></span></span></span><span style="display: inline-block; width: 0px; height: 13.656em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block; overflow: hidden; width: 0px; height: 16.003em; vertical-align: -14.997em;"></span></span></nobr>
<script type="math/tex; mode=display" id="MathJax-Element-104"> Gain(OUTLOOK) = Info(D) - Info(OUTLOOK) \\=0.940 - 0.694 = 0.246 \\ Gain(TEMPERATURE) = Info(D) - Info(TEMPERATURE) \\= 0.940 - 0.911 = 0.029 \\ Gain(HUMIDITY) = Info(D) - Info(HUMIDITY) \\= 0.940 - 0.789 = 0.151 \\ Gain(WINDY) = Info(D) - Info(WINDY) \\= 0.940 - 0.892 = 0.048 </script>

选出最大OutLook,然后把OutLook做节点,依靠不用属性分为多个集合,再对每个集合计算信息增益得到节点,直到不能再分。

我们得到决策树就可以把我们要分的属性依靠决策树来分,这个方法已经很老,现在比较少用

参考:http://shiyanjun.cn/archives/417.html

知识共享许可协议
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。欢迎转载、使用、重新发布,但务必保留文章署名林德熙(包含链接:http://blog.csdn.net/lindexi_gd ),不得用于商业目的,基于本文修改后的作品务必以相同的许可发布。如有任何疑问,请与我联系

<script type="text/javascript"> $(function () { $('pre.prettyprint code').each(function () { var lines = $(this).text().split('\n').length; var $numbering = $('<ul/>').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('<li/>').text(i)); }; $numbering.fadeIn(1700); }); }); </script>
分享到:
评论

相关推荐

    数据挖掘ID3分类算法研究综述.pdf

    总结来说,数据挖掘ID3分类算法通过构建决策树的方式,为数据分类问题提供了一种高效的解决方法。通过对信息熵的深入理解和应用,ID3算法能够有效地从数据集中挖掘出隐藏的模式和关系。同时,随着数据挖掘技术的不断...

    数据挖掘ID3

    ID3(Iterative Dichotomiser 3)是数据挖掘中的一种经典决策树算法,由Ross Quinlan在1986年提出。ID3主要用于分类任务,通过构建一棵决策树来对未知数据进行预测。 ID3算法的核心思想是信息熵和信息增益。信息熵...

    数据挖掘 ID3算法 C语言版本

    ID3算法是一种决策树学习方法,常用于数据挖掘中的分类任务。它由Ross Quinlan在1986年提出,其全称为Iterative Dichotomiser 3(迭代二分器3)。ID3算法主要基于信息熵和信息增益来选择最优特征,构建决策树模型。 ...

    数据挖掘ID3决策树

    ### 数据挖掘ID3决策树详解 #### 一、ID3决策树简介 ID3(Iterative Dichotomiser 3)是一种经典的决策树学习算法,由Ross Quinlan在1986年提出。该算法主要用于分类问题,通过递归地选择最优特征进行分割来构建决策...

    数据挖掘技术决策树分类算法(ID3算法)研究.pdf

    数据挖掘技术是一种通过从大量数据中提取有价值信息和知识的过程,这一过程通过分析数据库、云端服务器或数据仓库等存储媒介中的大量数据信息,可以发现数据之间潜在的关联结构。数据挖掘技术在实际应用中的作用日益...

    数据挖掘的ID3算法

    在数据挖掘中,ID3(Iterative Dichotomiser 3)算法是一种经典的决策树学习方法,由Ross Quinlan在1986年提出。ID3主要应用于分类任务,它通过构建一个树形结构来表示各种可能的决策路径。 ID3算法的核心思想是...

    数据挖掘ID3关联规则算法

    在数据挖掘中,ID3算法是一种经典的决策树学习方法,由Ross Quinlan于1986年提出,主要用于分类任务。本文将深入探讨ID3算法的原理、实现以及其在C++中的应用。 ID3算法基于信息熵和信息增益这两个概念。信息熵衡量...

    数据挖掘ID3算法java和c++代码实现

    总结来说,ID3算法是数据挖掘中的一个重要工具,它通过信息增益选择最优特征,构建决策树模型。在Java和C++中实现ID3算法,主要的区别在于编程语言特性和库的使用,但核心逻辑是一致的。理解并掌握ID3算法,不仅可以...

    数据挖掘id3算法matlab实现

    数据挖掘是一种从大量数据中提取或“挖掘”知识的过程,它是信息技术领域的重要组成部分。ID3(Iterative Dichotomiser 3)算法是早期的一种决策树学习方法,由Ross Quinlan于1986年提出,主要用于分类任务。本教程...

    数据挖掘id3算法

    数据挖掘是一种从大量数据中发现有价值信息的过程,而ID3(Iterative Dichotomiser 3)算法是数据挖掘领域中决策树构建的一种经典方法,由Ross Quinlan于1986年提出。ID3算法主要用于分类任务,它通过信息熵和信息...

    数据挖掘ID3算法(JAVA实现)

    ID3(Iterative Dichotomiser 3)算法是数据挖掘中的一种决策树学习方法,由Ross Quinlan在1986年提出。这个算法主要用于分类任务,通过构建一个树形结构来表示特征与类别之间的关系。 ID3算法的核心思想是信息熵和...

    大数据与数据挖掘id3_preprocess.m

    大数据与数据挖掘

    ID3算法数据挖掘

    ID3数据挖掘 C语言版本 网络下载来的

    大数据与数据挖掘id3.m

    聚类算法1

    用C语言对ID3算法进行实现

    在数据挖掘领域,它常被用来进行分类任务,尤其适用于处理离散属性的数据集。C语言作为底层编程语言,因其高效性和灵活性,被广泛用于各种算法的实现,包括ID3算法。 ID3算法的核心思想是信息增益(Information ...

    数据挖掘 ID3选择具有最高信息熵增益的属性作为分裂属性,基于这种原则我们首先可以算出初始集合的熵,然后分别求出以各个属性为分裂属性时的熵,然后将通过上面得到的数据算出以各个属性为分裂属性时的信心增益,选择具有最大的信息增益属性作为我们的分裂属性。

    数据挖掘中的ID3算法选择具有最高信息熵增益的属性作为分裂属性 ID3算法是基于决策树的分类算法之一,该算法的核心思想是选择具有最高信息熵增益的属性作为分裂属性,从而将数据集分割成更小的子集,以便更好地分类...

    数据挖掘决策树ID3算法C++实现

    总结起来,数据挖掘中的ID3算法是一种高效的决策树学习方法,通过C++实现可以加深对算法的理解并应用于实际问题。在这个过程中,不仅需要掌握ID3算法的理论知识,还要熟悉C++编程,尤其是数据结构和递归算法的应用。...

    ID3数据挖掘源码(java)编写

    在Java编程语言中实现ID3算法可以帮助开发者深入理解其工作原理,并能应用于实际的数据挖掘项目。 1. **ID3算法基础**: - **信息熵**:度量一个数据集纯度的指标,熵越大,表示数据集的不确定性越高。 - **信息...

    数据挖掘中ID3算法的vc++实现

    ID3算法,全称为Iterative Dichotomiser 3(迭代二分法3),是数据挖掘领域中一种经典的决策树学习算法,由Ross Quinlan于1986年提出。该算法主要用于分类任务,通过信息熵和信息增益来选择最佳属性进行划分,构建...

Global site tag (gtag.js) - Google Analytics