powered by
This function calculates the conditional entropy of B given A in bits between two categorical vectors
calculate_conditional_entropy(vectorA, vectorB)
The conditional entropy of B given A in bits
A categorical vector representing the conditioning variable A
A categorical vector representing the conditioned variable B
vectorA <- c("A", "B", "A", "A", "B", "C", "C", "C", "A", "B") vectorB <- c("X", "Y", "X", "Y", "X", "Y", "Y", "X", "X", "Y") calculate_conditional_entropy(vectorA, vectorB)
Run the code above in your browser using DataLab