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 {
|
||||
Ok(0.0)
|
||||
} else {
|
||||
combinePointwise(~fn=PointSetDist_Scoring.KLDivergence.logScore, base, reference) |> E.R2.bind(
|
||||
integralEndYResult,
|
||||
)
|
||||
combinePointwise(
|
||||
~fn=PointSetDist_Scoring.KLDivergence.logScore,
|
||||
base,
|
||||
reference,
|
||||
) |> E.R2.bind(integralEndYResult)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -157,8 +157,8 @@ module Scale = {
|
|||
| #Divide => divide(a, b)
|
||||
| #Power => power(a, b)
|
||||
| #Logarithm =>
|
||||
if a < MagicNumbers.Epsilon.seven {
|
||||
Ok(0.0)
|
||||
if a < MagicNumbers.Epsilon.ten {
|
||||
Error(NegativeInfinityError)
|
||||
} else {
|
||||
logarithm(a, b)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user