Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://stats.stackexchange.com/questions/302774/does-uniform-distribution-belong-to-location-and-scale-familya
- def get_upd_distr(dict_: dict):
- for key, values in dict_.items():
- if key == "norm":
- values[0] = 'mean'
- values[1] = 'sd'
- if key == "cauchy":
- #https://www.itl.nist.gov/div898/handbook/eda/section3/eda3663.htm
- values[0] = 't' #t
- values[1] = 's' #s
- if key == 'expon':
- values[0] = 'min value'
- values[1] = '1/lambda'
- if key == "chi2":
- #https://www.itl.nist.gov/div898/handbook/eda/section3/eda3666.htm
- #https://web.ma.utexas.edu/users/mks/M358KInstr/tDistandDF.pdf
- values[0] = 'df' #TODO understand
- values[1] = 'mean'
- values[2] = 'sd'
- if key == "lognorm":
- #https://statisticsbyjim.com/probability/lognormal-distribution/
- #https://stackoverflow.com/questions/8747761/scipy-lognormal-distribution-parameters
- values[0] = 'sd' #shape
- values[1] = 'mean' #loc
- values[2] = 'alpha' #scale
- if key == 'uniform':
- #https://statisticsbyjim.com/probability/gamma-distribution/
- values[0] = 'a'
- values[1] = '|b-a|'
- if key == 'rayleigh':
- #https://anylogic.help/advanced/functions/rayleigh.html
- #https://stats.stackexchange.com/questions/224416/parameter-estimation-of-a-rayleigh-random-variable-with-an-offset --useful
- values[0] = 'mean'
- values[1] = 'sd'
- if key == 'powerlaw': #TODO understand what is it
- values[0] = 'alpha'
- values[1] = 'Xmin'
- values[2] = 'D' #Kolmogorov smirnov statistic
- if key == 'exponpow': #TODO understand what is it
- values[0] = 'b'
- values[1] = 'loc'
- values[2] = 'scale'
- if key == 'gamma':
- #https://stackoverflow.com/questions/2896179/fitting-a-gamma-distribution-with-python-scipy
- #https://statisticsbyjim.com/probability/gamma-distribution/
- #https://en.wikipedia.org/wiki/Gamma_distribution
- #https://pythonguides.com/python-scipy-stats-fit/
- values[0] = 'alpha' #shape
- values[1] = 'loc' #scale
- values[2] = 'betta' #thres
- if key == 'beta':
- # https://stats.stackexchange.com/questions/68983/beta-distribution-fitting-in-scipy
- values[0] = 'alpha'
- values[1] = 'beta'
- values[2] = 'lower limit'
- values[3] = 'upper limit - lower limit'
- if key == 'burr':
- """
- In terms of mathematical statistics, the loc and scale parameters for the Burr distribution correspond to the shift and scale parameters.
- The loc parameter represents a shift (or offset) of the distribution along the axis of values. If loc is a, then the distribution will be shifted by a units to the right (positive value) or to the left (negative value).
- The scale parameter represents the scale that affects the spread of the data. If scale is equal to b, then the distribution will be scaled along the axis of values.
- So you can rewrite the values of loc and scale in terms of mathematical statistics as follows:
- Shift (loc):μ=loc
- Scale (scale):σ=scale
- Here
- μ is the mean (shift), and σ is the standard deviation (scale).
- """
- values[0] = 'c' #tail parameter
- values[1] = 'd'
- values[2] = 'mean'
- values[3] = 'sd'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement