soerp
soerp copied to clipboard
Bug in Tri() constructor for triangular distribution
The constructor for triangular distributions, Tri(a, b, c)
is calling scipy.stats.triang
as follows:
return uv(rv=ss.triang(c, loc=a, scale=b-a), tag=tag)
where a
and b
are respectively the min and max of the distribution and c
is the peak. However, even if this is not clear from the SciPy documentation, the first argument to scipy.stats.triang
should be between 0 and 1. That line should read something like
return uv(rv=ss.triang((c-a)/float(b-a), loc=a, scale=b-a), tag=tag)