calculate_conditional_entropy: Calculate Conditional Entropy of B given A in Bits

View source: R/calculate_conditional_entropy.R

calculate_conditional_entropyR 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)

AnimalSequences documentation built on Sept. 30, 2024, 9:18 a.m.