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:
- mrq
MultiResolutionQuantityBase|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_ranges
list[tuple[int,int]] List of pairs of \((j_1, j_2)\) ranges of scales for the analysis.
- weighted
str|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_cumul
int Number of cumulants computed.
- q
ndarrayoffloat, shape (n_exponents,) |None List of \(q\) values used in the multifractal analysis. Defaults to None which sets
q = [2].- bootstrap_weighted
str|None Whether the boostrapped mrqs will have weighted regressions. See the description of
weighted.- R
int Number of bootstrapped repetitions.
- estimates
str 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 theqargument passed: Iflen(q) >= 2, then the spectrum is estimated, otherwise only the cumulants and structure functions are computed.- robustbool
Use robust estimates of cumulants.
- robust_kwargs
dict|None Arguments passed for robust estimation. Used for cumulant estimates of order >= 3.
- idx_reject
dict[int,ndarrayof 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.
- mrq
- Returns:
MFractalVarThe output of the multifractal analysis, is a list if mrq was passed as an Iterable.