calculate_conditional_entropy {AnimalSequences}R Documentation

Calculate Conditional Entropy of B given A in Bits

Description

This function calculates the conditional entropy of B given A in bits between two categorical vectors

Usage

calculate_conditional_entropy(vectorA, vectorB)

Arguments

vectorA

A categorical vector representing the conditioning variable A

vectorB

A categorical vector representing the conditioned variable B

Value

The conditional entropy of B given A in bits

Examples

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)

[Package AnimalSequences version 0.2.0 Index]