base 2 log => natural log (on the advice of Nuno)
Value: [1e-4 to 2e-1]
This commit is contained in:
parent
a4c3405e5d
commit
ca95c7cef8
|
@ -1,8 +1,8 @@
|
||||||
module LogScoring = {
|
module LogScoring = {
|
||||||
let logFn = Js.Math.log2
|
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> => Ok(
|
let logScore = (a: float, b: float): result<float, Operation.Error.t> => Ok(
|
||||||
Js.Math.log2(Js.Math.abs_float(a /. b)),
|
logFn(Js.Math.abs_float(a /. b)),
|
||||||
)
|
)
|
||||||
let multiply = (a: float, b: float): result<float, Operation.Error.t> => Ok(a *. b)
|
let multiply = (a: float, b: float): result<float, Operation.Error.t> => Ok(a *. b)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user