Speed up core.prior classes
Extended from #411 (closed)
-
-
Profile all of the priors which use scipy
: LogNormal, Exponential, StudentT, Logistic, Cauchy, Gamma.
-
-
-
See if we can make them run faster by using analytical solutions in the rescale
,prob
,logprob
,cdf
methods.-
Uniform: merged and dealt with in #411 (closed). O(1)-O(2) faster. -
LogNormal: 8x to 20x faster. -
Exponential: 5x to 50x faster. -
StudentT: 3x to 40x faster. -
Logistic: 5x to 60x faster. -
Cauchy: 2x to 500x faster. -
Gamma: 2x to 600x faster. -
Beta: 2x to 300x faster.
-
-
-
-
Add unit tests to ensure that calculations are correct.
-
(Biggest speed-up is when inputting (float
, int
), smaller speed-up is inputting np.ndarray
)
Edited by Liting Xiao