Changed Ok(0)
to Error(NegativeInfinityError)
.
Value: [1e-7 to 1e-5]
This commit is contained in:
parent
32f141abdc
commit
683439c7e5
|
@ -239,9 +239,11 @@ module T = Dist({
|
||||||
if referenceIsZero {
|
if referenceIsZero {
|
||||||
Ok(0.0)
|
Ok(0.0)
|
||||||
} else {
|
} else {
|
||||||
combinePointwise(~fn=PointSetDist_Scoring.KLDivergence.logScore, base, reference) |> E.R2.bind(
|
combinePointwise(
|
||||||
integralEndYResult,
|
~fn=PointSetDist_Scoring.KLDivergence.logScore,
|
||||||
)
|
base,
|
||||||
|
reference,
|
||||||
|
) |> E.R2.bind(integralEndYResult)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -157,8 +157,8 @@ module Scale = {
|
||||||
| #Divide => divide(a, b)
|
| #Divide => divide(a, b)
|
||||||
| #Power => power(a, b)
|
| #Power => power(a, b)
|
||||||
| #Logarithm =>
|
| #Logarithm =>
|
||||||
if a < MagicNumbers.Epsilon.seven {
|
if a < MagicNumbers.Epsilon.ten {
|
||||||
Ok(0.0)
|
Error(NegativeInfinityError)
|
||||||
} else {
|
} else {
|
||||||
logarithm(a, b)
|
logarithm(a, b)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user