H: Compute the entropy of a discrete sample

View source: R/tools_misc.R

HR Documentation

Compute the entropy of a discrete sample

Description

Compute the entropy of a discrete sample

Usage

H(cl)

Arguments

cl

vector of discrete labels

Value

the entropy of the sample

Examples

cl <- sample(2, 500, replace = TRUE)
H(cl)

greed documentation built on Oct. 4, 2022, 1:06 a.m.