Renamed LogScoring
to KLDivergence
Value: [1e-7 to 1e-4]
This commit is contained in:
parent
627616558a
commit
32f141abdc
|
@ -280,7 +280,7 @@ module T = Dist({
|
||||||
if referenceIsZero {
|
if referenceIsZero {
|
||||||
Ok(0.0)
|
Ok(0.0)
|
||||||
} else {
|
} 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(shapeMap(XYShape.T.filterYValues(Js.Float.isFinite)))
|
||||||
|> E.R.fmap(integralEndY)
|
|> E.R.fmap(integralEndY)
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,7 @@ module T = Dist({
|
||||||
if referenceIsZero {
|
if referenceIsZero {
|
||||||
Ok(0.0)
|
Ok(0.0)
|
||||||
} else {
|
} else {
|
||||||
combinePointwise(~fn=PointSetDist_Scoring.LogScoring.logScore, base, reference) |> E.R2.bind(
|
combinePointwise(~fn=PointSetDist_Scoring.KLDivergence.logScore, base, reference) |> E.R2.bind(
|
||||||
integralEndYResult,
|
integralEndYResult,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,7 +311,7 @@ module T = Dist({
|
||||||
if referenceIsZero {
|
if referenceIsZero {
|
||||||
Ok(0.0)
|
Ok(0.0)
|
||||||
} else {
|
} else {
|
||||||
combinePointwise(PointSetDist_Scoring.LogScoring.logScore, base, reference) |> E.R.fmap(
|
combinePointwise(PointSetDist_Scoring.KLDivergence.logScore, base, reference) |> E.R.fmap(
|
||||||
integralEndY,
|
integralEndY,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module LogScoring = {
|
module KLDivergence = {
|
||||||
let logFn = Js.Math.log
|
let logFn = Js.Math.log
|
||||||
let subtraction = (a, b) => Ok(a -. b)
|
let subtraction = (a, b) => Ok(a -. b)
|
||||||
let logScore = (a: float, b: float): result<float, Operation.Error.t> =>
|
let logScore = (a: float, b: float): result<float, Operation.Error.t> =>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user