00:01
So we can start with the entropy has equal to negative 0 .5, log 2, 0 .5, minus 0 .5, log 2, 0 .5, log 2, 0 .5 .5.
00:39
This is equal to 1.
00:44
So that would satisfy the initial entropy.
00:54
So next, we have to calculate the information gain for each.
00:57
Each attribute.
01:03
So we could use the gain cycle, gain of cycle made equal to entropy s, oops, entropy s, there we go, minus.
01:40
So if we look at 0 .3, so we're at a function of 10, so we use three tenths entropy of the third cycle plus three tenths, entropy second, plus four tenths, entropy first.
02:47
So this will become gain cycle equal to 1 minus 0 plus 0 .274 plus 0 .4 plus 0 .4.
03:14
So this is 0 .320.
03:18
So this is 0 .3254.
03:20
So that satisfies the gain for each attribute consolidated.
03:34
And then we can go to the doc sub yes.
03:39
So that's five instances, correlating with two inference equal zero, three inference equal one.
03:48
And then doc sub no is five instances, correlating with three inference equals zero, and two in inference equaling 1.
04:05
So if we represent entropy with yes, we have entropy, entropy represented by s of yes, and then entropy of no.
04:28
So if we correlate these simultaneously, we have negative two -fifths for yes, negative three -fifths for no.
04:47
Log 2, 2 5ths, 3 5ths.
05:03
Difference from 3 5ths and 2 5ths, log 2, 3 5ths, 2 5ths.
05:29
So both should have equal values in both do.
05:38
All right, so now we can go to the gain dock sub.
05:44
This becomes one minus, see we have half on 10, so we can go five -tenths, entropy, yes, plus five -tenths, entropy, no.
06:22
So this becomes one minus 0 .971, 0 .029.
06:33
So we got our gain doc sub evaluation satisfied.
06:42
Now we go to category.
06:44
So category is equal to layer and category is equal to rock.
06:50
So layer would be five instances, which correlates the three inference equal zero, two inference equal one.
06:59
And then for category rock, five instances correlates the two inference equal zero and three inference equal one.
07:08
So we'll just do the entropy simultaneously for layer.
07:20
And so this is negative and negative.
07:35
So 0 .6 and 0 .4.
07:38
So we go 3 5ths, 2 5ths.
07:47
Log 2, log 2, 3 5ths, 2 5ths.
08:02
It would be minus both approximately equal to 971 .971.
08:36
So this gain category is equal to 1 minus 5 tenths...