rcat.stats.pdf.freq_int_dist

rcat.stats.pdf.freq_int_dist(data, keepdims=False, axis=0, bins=10, thr=None, density=True, ci=False, bootstrap=False, nmc=500, block=1, ci_level=95, nproc=1)[source]

Calculate frequency - instensity distriutions.

Parameters:
  • data (array) – 2D or 1D array of data. All data points are collectively used in the freq-instensity calculation unless ‘keepdims’ is True. Then calculation is performed along the dimension defined by axis argument (default 0).
  • keepdims (boolean) – If data is 2d (time in third dimesion) and keepdims is set to True, calculation is applied to the dimension defined by axis argument (default 0) and returns a 2d array of freq-int dists. If set to False (default) all values are collectively assembled before calculation.
  • axis (int) – The axis over which to apply the calculation if keepdims is set to True. Default is 0.
  • bins (int/list/array) – If an int, it defines the number of equal-width bins in the given range (10, by default). If a sequence, it defines the bin edges, including the rightmost edge, allowing for non-uniform bin widths. If bins is set to ‘None’ they will be automatically calculated.
  • thr (float) – Value of threshold if thresholding data. Default None.
  • density (boolean) – If True (default) then the value of the probability density function at each bin is returned, otherwise the number of samples per bin.
  • bootstrap (boolean) – If to use block bootstrap to calculate confidence interval.
  • nmc (int/float) – Number of bootstrap samples to use.
  • block (int/float) – Size of block to use in block bootstrap
  • ci_level (int/float) – The confidence interval level to use (eg 95, 99 representing 95%, 99% levels)
  • nproc (int) – Number of processes to use in bootstrap calculation. Default 1.
Returns:

  • pdf (array) – data array with size len(bins)-1 with counts/probabilities
  • ci (dict) – data dictionary with confidence level for each bin; keys ‘min_levels’/’max_levels’ with corresponding values. If bootstrap is False, then None values are returned.