tfd_pert {tfprobability}R Documentation

Modified PERT distribution for modeling expert predictions.

Description

The PERT distribution is a loc-scale family of Beta distributions fit onto a real interval between low and high values set by the user, along with a peak to indicate the expert's most frequent prediction, and temperature to control how sharp the peak is.

Usage

tfd_pert(
  low,
  peak,
  high,
  temperature = 4,
  validate_args = FALSE,
  allow_nan_stats = FALSE,
  name = "Pert"
)

Arguments

low

lower bound

peak

most frequent value

high

upper bound

temperature

controls the shape of the distribution

validate_args

Logical, default FALSE. When TRUE distribution parameters are checked for validity despite possibly degrading runtime performance. When FALSE invalid inputs may silently render incorrect outputs. Default value: FALSE.

allow_nan_stats

Logical, default TRUE. When TRUE, statistics (e.g., mean, mode, variance) use the value NaN to indicate the result is undefined. When FALSE, an exception is raised if one or more of the statistic's batch members are undefined.

name

name prefixed to Ops created by this class.

Details

The distribution is similar to a Triangular distribution (i.e. tfd.Triangular) but with a smooth peak.

Mathematical Details

In terms of a Beta distribution, PERT can be expressed as

PERT ~ loc + scale * Beta(concentration1, concentration0)

where

loc = low
scale = high - low
concentration1 = 1 + temperature * (peak - low)/(high - low)
concentration0 = 1 + temperature * (high - peak)/(high - low)
temperature > 0

The support is ⁠[low, high]⁠. The peak must fit in that interval: ⁠low < peak < high⁠. The temperature is a positive parameter that controls the shape of the distribution. Higher values yield a sharper peak. The standard PERT distribution is obtained when temperature = 4.

Value

a distribution instance.

See Also

For usage examples see e.g. tfd_sample(), tfd_log_prob(), tfd_mean().


[Package tfprobability version 0.15.1 Index]