Commit 937795c0 authored by Romain Reuillon's avatar Romain Reuillon
Browse files

[Tool] fix: type

parent 3830eaf5
Pipeline #1242 passed with stages
in 64 minutes and 12 seconds
......@@ -206,7 +206,7 @@ trait Stat {
Some(test.kolmogorovSmirnovTest(new NormalDistribution(null, mu, sigma), data.toArray))
}
def klDivergence(p1: Array[Double], p2: Array[Double]) = {
def klDivergence(p1: Seq[Double], p2: Seq[Double]) = {
val s = (p1 zip p2).
filter { case (p1, p2) p1 != 0.0 && p2 != 0.0 }.
map { case (p1, p2) p1 * math.log(p1 / p2) }.sum
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment