linan2 / Decision-tree

K236 task

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

result:

{'district': {'rur': 'responded', 'sub': {'income': {'low': 'responded', 'high': 'nothing'}}, 'urb': {'previous_cus': {'no': 'responded', 'yes': 'nothing'}}}}

python dt.py

shannonEnt: 0.5305095811322291 shannonEnt: 0.9402859586706309 rur shannonEnt: 0.0 urb shannonEnt: 0.44217935649972373 shannonEnt: 0.9709505944546686 sub shannonEnt: 0.44217935649972373 shannonEnt: 0.9709505944546686 base: 0.9402859586706309 new: 0.6935361388961918 infoGain: 0.2467498197744391 deta shannonEnt: 0.5 shannonEnt: 1.0 semi shannonEnt: 0.2575424759098898 shannonEnt: 0.7219280948873623 terr shannonEnt: 0.5287712379549449 shannonEnt: 0.9709505944546686 base: 0.9402859586706309 new: 0.8903138176221539 infoGain: 0.049972141048477026 low shannonEnt: 0.19062207543124116 shannonEnt: 0.5916727785823275 high shannonEnt: 0.4613456697472024 shannonEnt: 0.9852281360342516 base: 0.9402859586706309 new: 0.7884504573082896 infoGain: 0.15183550136234136 yes shannonEnt: 0.5 shannonEnt: 1.0 no shannonEnt: 0.5 shannonEnt: 0.8112781244591328 base: 0.9402859586706309 new: 0.8921589282623617 infoGain: 0.04812703040826927 responded shannonEnt: 0.44217935649972373 shannonEnt: 0.9709505944546686 semi shannonEnt: 0.38997500048077083 shannonEnt: 0.9182958340544896 terr shannonEnt: 0.5 shannonEnt: 1.0 base: 0.9709505944546686 new: 0.9509775004326937 infoGain: 0.01997309402197489 low shannonEnt: 0.38997500048077083 shannonEnt: 0.9182958340544896 high shannonEnt: 0.5 shannonEnt: 1.0 base: 0.9709505944546686 new: 0.9509775004326937 infoGain: 0.01997309402197489 yes shannonEnt: 0.0 no shannonEnt: 0.0 base: 0.9709505944546686 new: 0.0 infoGain: 0.9709505944546686 nothing responded shannonEnt: 0.44217935649972373 shannonEnt: 0.9709505944546686 deta shannonEnt: 0.0 semi shannonEnt: 0.0 terr shannonEnt: 0.5 shannonEnt: 1.0 base: 0.9709505944546686 new: 0.4 infoGain: 0.5709505944546686 low shannonEnt: 0.0 high shannonEnt: 0.0 base: 0.9709505944546686 new: 0.0 infoGain: 0.9709505944546686 yes shannonEnt: 0.5 shannonEnt: 1.0 no shannonEnt: 0.38997500048077083 shannonEnt: 0.9182958340544896 base: 0.9709505944546686 new: 0.9509775004326937 infoGain: 0.01997309402197489 responded nothing

About

K236 task


Languages

Language:Python 100.0%