mfa#

pymultifracs.mfa(mrq, scaling_ranges, weighted=None, n_cumul=2, q=None, bootstrap_weighted=None, R=1, estimates='auto', robust=False, robust_kwargs=None, idx_reject=None, check_regularity=True, min_j=1)#

Perform multifractal analysis, given wavelet coefficients.

Parameters:
mrqMultiResolutionQuantityBase | List[MultiResolutionQuantityBase]

Multi-resolution quantity to analyze, or list of MRQs. If it is a list, will return a list of the output of the function applied to each MRQ individually.

scaling_rangeslist[tuple[int, int]]

List of pairs of \((j_1, j_2)\) ranges of scales for the analysis.

weightedstr | None

Weighting mode for the linear regressions. Defaults to None, which is no weighting. Possible values are ‘Nj’ which weighs by number of coefficients, and ‘bootstrap’ which weights by bootstrap-derived estimates of variance.

n_cumulint

Number of cumulants computed.

qndarray of float, shape (n_exponents,) | None

List of \(q\) values used in the multifractal analysis. Defaults to None which sets q = [2].

bootstrap_weightedstr | None

Whether the boostrapped mrqs will have weighted regressions. See the description of weighted.

Rint

Number of bootstrapped repetitions.

estimatesstr

String containing characters which dictate which quantities to estimate. The following characters are available:

  • 'c': cumulants

  • 'm': multifractal spectrum

  • 's': structure function

For example, "cms" would indicate that all should be computed, whereas "c" results in only the cumulants being computed.

Defaults to "auto" which determines which quantities to estimate based on the q argument passed: If len(q) >= 2 , then the spectrum is estimated, otherwise only the cumulants and structure functions are computed.

robustbool

Use robust estimates of cumulants.

robust_kwargsdict | None

Arguments passed for robust estimation. Used for cumulant estimates of order >= 3.

idx_rejectdict[int, ndarray of bool]

Dictionary associating each scale to a boolean array indicating whether certain coefficients should be removed.

check_regularitybool

Whether to check the minimum regularity requirements are met by the MRQs.

Returns:
MFractalVar

The output of the multifractal analysis, is a list if mrq was passed as an Iterable.