pyhctsa.operations.distribution.compare_ks_fit

pyhctsa.operations.distribution.compare_ks_fit(x, what_distn)

Fits a distribution to data.

Returns simple statistics on the discrepancy between the kernel-smoothed distribution of the time-series values and the distribution fitted to it by some model: Gaussian, Extreme Value, Uniform, Exponential, and LogNormal.

Parameters:
x : array-like

The input data vector.

what_distn : str

The type of distribution to fit to the data:
  • ’norm’: normal

  • ’ev’: extreme value

  • ’uni’: uniform

  • ’exp’: exponential

  • ’logn’: Log-Normal

Returns:

Includes the absolute area between the two distributions, the peak separation, overlap integral, and relative entropy.

Return type:

dict