Merge remote-tracking branch 'origin/master' into feature/1103
This commit is contained in:
commit
a897e58e6b
|
@ -17,69 +17,78 @@ let timeDist =
|
||||||
let setup = dist =>
|
let setup = dist =>
|
||||||
dist
|
dist
|
||||||
|> DistPlusIngredients.toDistPlus(
|
|> DistPlusIngredients.toDistPlus(
|
||||||
~sampleCount=10000,
|
~sampleCount=2000,
|
||||||
~outputXYPoints=2000,
|
~outputXYPoints=1000,
|
||||||
~truncateTo=Some(1000),
|
~truncateTo=Some(1000),
|
||||||
)
|
)
|
||||||
|> E.O.React.fmapOrNull(distPlus => <DistPlusPlot distPlus />);
|
|> E.O.React.fmapOrNull(distPlus => <DistPlusPlot distPlus />);
|
||||||
|
|
||||||
|
let simpleExample = (name, guesstimatorString) =>
|
||||||
|
<>
|
||||||
|
<h3 className="text-gray-600 text-lg font-bold">
|
||||||
|
{name |> ReasonReact.string}
|
||||||
|
</h3>
|
||||||
|
{setup(DistPlusIngredients.make(~guesstimatorString, ()))}
|
||||||
|
</>;
|
||||||
|
|
||||||
|
let timeExample = (name, guesstimatorString) =>
|
||||||
|
<>
|
||||||
|
<h3 className="text-gray-600 text-lg font-bold">
|
||||||
|
{name |> ReasonReact.string}
|
||||||
|
</h3>
|
||||||
|
{setup(
|
||||||
|
DistPlusIngredients.make(
|
||||||
|
~guesstimatorString,
|
||||||
|
~unit=TimeDistribution({zero: MomentRe.momentNow(), unit: `years}),
|
||||||
|
(),
|
||||||
|
),
|
||||||
|
)}
|
||||||
|
</>;
|
||||||
|
|
||||||
let distributions = () =>
|
let distributions = () =>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-gray-800 text-xl font-bold">
|
<h2 className="text-gray-800 text-xl font-bold">
|
||||||
{"Initial Section" |> ReasonReact.string}
|
{"Initial Section" |> ReasonReact.string}
|
||||||
</h2>
|
</h2>
|
||||||
<h3 className="text-gray-600 text-lg font-bold">
|
{simpleExample("Continuous", "5 to 20")}
|
||||||
{"Continuous" |> ReasonReact.string}
|
{simpleExample("Continuous, wide range", "1 to 1000000")}
|
||||||
</h3>
|
{simpleExample("Continuous, tiny values", "0.000000001 to 0.00000001")}
|
||||||
{setup(DistPlusIngredients.make(~guesstimatorString="5 to 20", ()))}
|
{simpleExample(
|
||||||
<h3 className="text-gray-600 text-lg font-bold">
|
"Continuous large values",
|
||||||
{"Discrete" |> ReasonReact.string}
|
"50000000000 to 2000000000000",
|
||||||
</h3>
|
|
||||||
{setup(
|
|
||||||
DistPlusIngredients.make(~guesstimatorString="floor(10 to 20)", ()),
|
|
||||||
)}
|
)}
|
||||||
<h3 className="text-gray-600 text-lg font-bold">
|
{simpleExample("Discrete", "floor(10 to 20)")}
|
||||||
{"Mixed" |> ReasonReact.string}
|
{simpleExample("Discrete, wide range", "floor(10 to 200000)")}
|
||||||
</h3>
|
{simpleExample("Mixed", "mm(5 to 20, floor(20 to 30), [.5,.5])")}
|
||||||
{setup(
|
{simpleExample("Mixed, Early-Discrete Point", "mm(1, 5 to 20, [.5,.5])")}
|
||||||
DistPlusIngredients.make(
|
{simpleExample(
|
||||||
~guesstimatorString="mm(5 to 20, floor(20 to 30), [.5,.5])",
|
"Mixed, Single-Discrete Point",
|
||||||
(),
|
"mm(5, 5 to 20, [.5,.5])",
|
||||||
),
|
)}
|
||||||
|
{simpleExample(
|
||||||
|
"Mixed, Two-Discrete Points",
|
||||||
|
"mm(0,10, 5 to 20, [.5,.5,.5])",
|
||||||
)}
|
)}
|
||||||
<h2 className="text-gray-800 text-xl font-bold">
|
<h2 className="text-gray-800 text-xl font-bold">
|
||||||
{"Over Time" |> ReasonReact.string}
|
{"Over Time" |> ReasonReact.string}
|
||||||
</h2>
|
</h2>
|
||||||
<h3 className="text-gray-600 text-lg font-bold">
|
{timeExample("Continuous", "5 to 20")}
|
||||||
{"Continuous" |> ReasonReact.string}
|
{timeExample("Continuous Over Long Period", "500 to 200000")}
|
||||||
</h3>
|
{timeExample("Continuous Over Short Period", "0.0001 to 0.001")}
|
||||||
{setup(
|
{timeExample(
|
||||||
DistPlusIngredients.make(
|
"Continuous Over Very Long Period",
|
||||||
~guesstimatorString="5 to 20",
|
"500 to 20000000000000",
|
||||||
~unit=TimeDistribution({zero: MomentRe.momentNow(), unit: `years}),
|
|
||||||
(),
|
|
||||||
),
|
|
||||||
)}
|
)}
|
||||||
<h3 className="text-gray-600 text-lg font-bold">
|
{timeExample("Discrete", "floor(5 to 20)")}
|
||||||
{"Discrete" |> ReasonReact.string}
|
{timeExample("Mixed", "mm(5 to 20, floor(5 to 20), [.5,.5])")}
|
||||||
</h3>
|
{timeExample(
|
||||||
{setup(
|
"Mixed Over Long Period",
|
||||||
DistPlusIngredients.make(
|
"mm(500 to 2000, floor(50 to 2000), [.5,.5])",
|
||||||
~guesstimatorString="floor(10 to 20)",
|
|
||||||
~unit=TimeDistribution({zero: MomentRe.momentNow(), unit: `years}),
|
|
||||||
(),
|
|
||||||
),
|
|
||||||
)}
|
)}
|
||||||
<h3 className="text-gray-600 text-lg font-bold">
|
{timeExample(
|
||||||
{"Mixed" |> ReasonReact.string}
|
"Mixed Over Very Long Period",
|
||||||
</h3>
|
"mm(500 to 200000, floor(50 to 200000), [.5,.5])",
|
||||||
{setup(
|
|
||||||
DistPlusIngredients.make(
|
|
||||||
~guesstimatorString="mm(5 to 20, floor(20 to 30), [.5,.5])",
|
|
||||||
~unit=TimeDistribution({zero: MomentRe.momentNow(), unit: `years}),
|
|
||||||
(),
|
|
||||||
),
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user