entropy ( probabilities -- n )


Vocabulary
math.statistics

Definition
USING: kernel math math.functions sequences ;

IN: math.statistics

: entropy ( probabilities -- n )
dup sum [ / dup log * ] curry map-sum neg ;