June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -1 +1,3 @@
|
|||
entropy(s)=-sum(x->x*log(2,x), [count(x->x==c,s)/length(s) for c in unique(s)])
|
||||
entropy(s) = -sum(x -> x * log(2, x), count(x -> x == c, s) / length(s) for c in unique(s))
|
||||
@show entropy("1223334444")
|
||||
@show entropy([1, 2, 3, 1, 2, 1, 2, 3, 1, 2, 3, 4, 5]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue