open FC.Base; let multimodal = "=mm(uniform(0,100), uniform(10,20), [.33,0.9])"; let mm1 = "=mm(uniform(1,100), normal(50, 5), [.01, .99])"; let mm2 = "=mm(uniform(1,100), normal(50, 8), [.01, .99])"; module Scoring = { type dist = Types.Dist.t; [@react.component] let make = () => { let (varA, setVarA) = React.useState(() => None); let (varB, setVarB) = React.useState(() => None); let (varC, setVarC) = React.useState(() => None); let distributionScoreDistribution = switch (varA, varB, varC) { | (Some(a), Some(b), Some(c)) => Types.Dist.distributionScoreDistribution([|a, b, c|]) | _ => None }; let distributionScoreNumber = switch (varA, varB, varC) { | (Some(a), Some(b), Some(c)) => Some(Types.Dist.distributionScoreNumber([|a, b, c|])) | _ => None }; let minX = [|varA, varB, varC, distributionScoreDistribution|] |> E.A.O.concatSome |> Types.Dists.minX(0.01); let maxX = [|varA, varB, varC, distributionScoreDistribution|] |> E.A.O.concatSome |> Types.Dists.maxX(0.99); Js.log2("MIN", min);