Made multiplicative factor in Scoring
file rather than with bind
calls Value: [1e-5 to 7.5e-4]
This commit is contained in:
parent
f5f5be2cfb
commit
627616558a
|
@ -280,10 +280,7 @@ module T = Dist({
|
|||
if referenceIsZero {
|
||||
Ok(0.0)
|
||||
} else {
|
||||
E.R2.bind(
|
||||
combinePointwise(PointSetDist_Scoring.LogScoring.multiply, reference),
|
||||
combinePointwise(PointSetDist_Scoring.LogScoring.logScore, base, reference),
|
||||
)
|
||||
combinePointwise(PointSetDist_Scoring.LogScoring.logScore, base, reference)
|
||||
|> E.R.fmap(shapeMap(XYShape.T.filterYValues(Js.Float.isFinite)))
|
||||
|> E.R.fmap(integralEndY)
|
||||
}
|
||||
|
|
|
@ -239,10 +239,9 @@ module T = Dist({
|
|||
if referenceIsZero {
|
||||
Ok(0.0)
|
||||
} else {
|
||||
E.R2.bind(
|
||||
combinePointwise(~fn=PointSetDist_Scoring.LogScoring.multiply, reference),
|
||||
combinePointwise(~fn=PointSetDist_Scoring.LogScoring.logScore, base, reference),
|
||||
) |> E.R2.bind(integralEndYResult)
|
||||
combinePointwise(~fn=PointSetDist_Scoring.LogScoring.logScore, base, reference) |> E.R2.bind(
|
||||
integralEndYResult,
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -311,10 +311,9 @@ module T = Dist({
|
|||
if referenceIsZero {
|
||||
Ok(0.0)
|
||||
} else {
|
||||
E.R2.bind(
|
||||
combinePointwise(PointSetDist_Scoring.LogScoring.multiply, reference),
|
||||
combinePointwise(PointSetDist_Scoring.LogScoring.logScore, base, reference),
|
||||
) |> E.R.fmap(integralEndY)
|
||||
combinePointwise(PointSetDist_Scoring.LogScoring.logScore, base, reference) |> E.R.fmap(
|
||||
integralEndY,
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -8,7 +8,7 @@ module LogScoring = {
|
|||
Error(Operation.DivisionByZeroError)
|
||||
} else {
|
||||
let quot = a /. b
|
||||
quot < 0.0 ? Error(Operation.ComplexNumberError) : Ok(logFn(quot))
|
||||
quot < 0.0 ? Error(Operation.ComplexNumberError) : Ok(b *. logFn(quot))
|
||||
}
|
||||
let multiply = (a: float, b: float): result<float, Operation.Error.t> => Ok(a *. b)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user