Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

entr

Entropy Function


Description

The elementwise entropy function, -xlog(x).

Usage

entr(x)

Arguments

x

An Expression, vector, or matrix.

Value

An Expression representing the entropy of the input.

Examples

x <- Variable(5)
obj <- Maximize(sum(entr(x)))
prob <- Problem(obj, list(sum(x) == 1))
result <- solve(prob)
result$getValue(x)

CVXR

Disciplined Convex Optimization

v1.0-10
Apache License 2.0 | file LICENSE
Authors
Anqi Fu [aut, cre], Balasubramanian Narasimhan [aut], David W Kang [aut], Steven Diamond [aut], John Miller [aut], Stephen Boyd [ctb], Paul Kunsberg Rosenfield [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.