Learn R Programming

conMItion (version 0.2.1)

getEntropy: Calculate Univariate Entropy

Description

This function calculates the univariate entropy of a numeric vector using the specified number of bins and spline order.

Usage

getEntropy(x_1, bin = 6, sp_order = 2)

Value

A numeric value representing the entropy of the vector.

Arguments

x_1

A numeric vector for the only variable.

bin

An integer specifying the number of bins. Default is 6.

sp_order

An integer specifying the spline order. Must be less than `bin`. Default is 2.

Examples

Run this code
x_1 <- rnorm(100)
getEntropy(x_1)

Run the code above in your browser using DataLab