conditional.entropy: Conditional Entropy

Description Usage Arguments Value Examples

View source: R/metrics.R

Description

Conditional Entropy

Usage

1
conditional.entropy(x, y = NULL, file = "None")

Arguments

x

a vector, matrix, or data.frame.

y

a vector. y must be NULL if x is a matrix or a data.frame

file

In case of x been a data.frame or matrix, represent the name of output file for saving conditional entropy plot

Value

In case of x been a data.frame or matrix, conditional entropy of all variables/columns in x. Otherwise, conditional entropy of x and y

Examples

1
2
3
4
5
df <- data.frame("V1" = sample.int(2,5,replace=TRUE), "V2" =sample.int(2,5,replace=TRUE) , "V3" = sample.int(2,5,replace=TRUE), "V4" = sample.int(2,5,replace=TRUE),  "V5" = sample.int(2,5,replace=TRUE), "V6" = sample.int(2,5,replace=TRUE), "V7" = sample.int(2,5,replace=TRUE), "V8" = sample.int(2,5,replace=TRUE))
x <- sample.int(2, 5,replace=TRUE)
y <- sample.int(2,5,replace=TRUE)
conditional.entropy(df, file ="conditionalEntropy")
conditional.entropy(x = x, y = y)

AnderEhu/sme documentation built on Jan. 31, 2022, 12:01 a.m.