0 votes
in Azure by
Below are the eight actual values of the target variable in the train file. What is the entropy of the target variable?

[0, 0, 0, 1, 1, 1, 1, 1]

Choose the correct answer.

-(5/8 log(5/8) + 3/8 log(3/8))

5/8 log(5/8) + 3/8 log(3/8)

3/8 log(5/8) + 5/8 log(3/8)

5/8 log(3/8) – 3/8 log(5/8)

1 Answer

0 votes
by
The target variable, in this case, is 1.

The formula for calculating the entropy is:

Putting p=5 and n=8, we get

Entropy = A = -(5/8 log(5/8) + 3/8 log(3/8))
...