Renamed LogScoring to KLDivergence

Value: [1e-7 to 1e-4]
This commit is contained in:
Quinn Dougherty 2022-05-04 11:54:23 -04:00
parent 627616558a
commit 32f141abdc
4 changed files with 4 additions and 4 deletions

View File

@ -280,7 +280,7 @@ module T = Dist({
if referenceIsZero {
Ok(0.0)
} else {
combinePointwise(PointSetDist_Scoring.LogScoring.logScore, base, reference)
combinePointwise(PointSetDist_Scoring.KLDivergence.logScore, base, reference)
|> E.R.fmap(shapeMap(XYShape.T.filterYValues(Js.Float.isFinite)))
|> E.R.fmap(integralEndY)
}

View File

@ -239,7 +239,7 @@ module T = Dist({
if referenceIsZero {
Ok(0.0)
} else {
combinePointwise(~fn=PointSetDist_Scoring.LogScoring.logScore, base, reference) |> E.R2.bind(
combinePointwise(~fn=PointSetDist_Scoring.KLDivergence.logScore, base, reference) |> E.R2.bind(
integralEndYResult,
)
}

View File

@ -311,7 +311,7 @@ module T = Dist({
if referenceIsZero {
Ok(0.0)
} else {
combinePointwise(PointSetDist_Scoring.LogScoring.logScore, base, reference) |> E.R.fmap(
combinePointwise(PointSetDist_Scoring.KLDivergence.logScore, base, reference) |> E.R.fmap(
integralEndY,
)
}

View File

@ -1,4 +1,4 @@
module LogScoring = {
module KLDivergence = {
let logFn = Js.Math.log
let subtraction = (a, b) => Ok(a -. b)
let logScore = (a: float, b: float): result<float, Operation.Error.t> =>