Minor touches to models
This commit is contained in:
parent
ddd0bc0820
commit
f2d52e6180
|
@ -39,7 +39,12 @@ module IntegralChart = {
|
|||
integral
|
||||
|> Distributions.Continuous.toLinear
|
||||
|> E.O.fmap(Distributions.Continuous.getShape);
|
||||
let minX = integral |> Distributions.Continuous.T.minX;
|
||||
let range = T.xTotalRange(distPlus);
|
||||
let minX =
|
||||
switch (T.minX(distPlus), range) {
|
||||
| (Some(min), Some(range)) => Some(min -. range *. 0.001)
|
||||
| _ => None
|
||||
};
|
||||
let maxX = integral |> Distributions.Continuous.T.maxX;
|
||||
let timeScale = distPlus.unit |> DistTypes.DistributionUnit.toJson;
|
||||
<DistributionPlot
|
||||
|
|
|
@ -70,14 +70,14 @@ module Model = {
|
|||
};
|
||||
|
||||
let yearlyMeanGrowthRateIfNotClosed = (group: group): yearlyNumericDiff => {
|
||||
{meanDiff: 1.1, stdDiff: 1.1};
|
||||
{meanDiff: 1.1, stdDiff: 1.08};
|
||||
};
|
||||
|
||||
let calculateDifference =
|
||||
(currentValue, dateTime, currentDateTime, y: yearlyNumericDiff) => {
|
||||
let yearDiff = MomentRe.diff(dateTime, currentDateTime, `days) /. 365.;
|
||||
let meanDiff = Js.Math.pow_float(~base=y.meanDiff, ~exp=yearDiff);
|
||||
let stdDevDiff = Js.Math.pow_float(~base=y.meanDiff, ~exp=yearDiff);
|
||||
let stdDevDiff = Js.Math.pow_float(~base=y.stdDiff, ~exp=yearDiff);
|
||||
GuesstimatorDist.logNormal(
|
||||
currentValue *. meanDiff,
|
||||
firstYearStdDev *. stdDevDiff,
|
||||
|
@ -163,8 +163,9 @@ module Model = {
|
|||
~guesstimatorString=
|
||||
GuesstimatorDist.min(
|
||||
GlobalCatastrophe.guesstimatorString,
|
||||
GuesstimatorDist.logNormal(40., 4.),
|
||||
GuesstimatorDist.logNormal(20., 2.),
|
||||
),
|
||||
~unit=TimeDistribution({zero: currentDateTime, unit: `years}),
|
||||
~domain=RightLimited({xPoint: 100., excludingProbabilityMass: 0.3}),
|
||||
(),
|
||||
),
|
||||
|
|
|
@ -46,7 +46,7 @@ const toPdf = (values, outputResolutionCount, min, max) => {
|
|||
const samples = new Samples(continuousSamples);
|
||||
|
||||
const ratioSize$ = ratioSize(samples);
|
||||
const width = ratioSize$ === 'SMALL' ? 40 : 1;
|
||||
const width = ratioSize$ === 'SMALL' ? 60 : 1;
|
||||
|
||||
const pdf = samples.toPdf({ size: outputResolutionCount, width, min, max });
|
||||
continuous = pdf;
|
||||
|
|
Loading…
Reference in New Issue
Block a user