pymultifracs.mfspectrum.MultifractalSpectrum#
- class pymultifracs.mfspectrum.MultifractalSpectrum(mrq: dataclasses.InitVar[MultiResolutionQuantity], scaling_ranges: List[Tuple[int]], q: array, bootstrapped_mfa: dataclasses.InitVar[MFractalVar] = None, weighted: str = None)#
Estimates the Multifractal Spectrum
Based on equations 2.74 - 2.78 of Herwig Wendt’s thesis [1]
- Parameters:
- mrq
MultiResolutionQuantity
Multi resolution quantity to analyze.
- scaling_ranges: List[Tuple[int]]
List of pairs of (j1, j2) ranges of scales for the analysis
- q
ndarray
,shape
(n_exponents,) Exponents used construct the multifractal spectrum
- boostrapped_mfa: MFractalVar | None
Output of the MFA of bootstrapped MRQs.
- weighted
str
|None
Whether to used weighted linear regressions.
- mrq
References
[1]H. Wendt (2008). Contributions of Wavelet Leaders and Bootstrap to Multifractal Analysis: Images, Estimation Performance, Dependence Structure and Vanishing Moments. Confidence Intervals and Hypothesis Tests. Ph.D thesis, Laboratoire de Physique, Ecole Normale Superieure de Lyon. https://www.irit.fr/~Herwig.Wendt/data/ThesisWendt.pdf
- Attributes:
- formalism
str
Formalism used. Can be any of ‘wavelet coefs’, ‘wavelet leaders’, or ‘wavelet p-leaders’.
- j
ndarray
,shape
(n_scales,) List of the j values (scales), in order presented in the value arrays.
- scaling_ranges: List[Tuple[int]]
List of pairs of (j1, j2) ranges of scales for the analysis
- weighted
str
|None
If not None, indicates the weighting approach used for regression
- q
ndarray
,shape
(n_exponents,) Exponents used construct the multifractal spectrum
- Dq
ndarray
,shape
(n_exponents
,n_rep
) Fractal dimensions : \(D(q)\), y-axis of the multifractal spectrum
- hq
ndarray
,shape
(n_exponents
,n_rep
) Hölder exponents : \(h(q)\), x-axis of the multifractal spectrum
- U
ndarray
,shape
(n_scales
,n_exponents
,n_rep
) \(U(j, q)\)
- V
ndarray
,shape
(n_scales
,n_exponents
,n_rep
) \(V(j, q)\)
- formalism
- classmethod from_dict(d)#
Method to instanciate a dataclass by passing a dictionary with extra keywords
- Parameters:
- d
dict
Dictionary containing at least all the parameters required by __init__, but can also contain other parameters, which will be ignored
- d
- Returns:
MultiResolutionQuantityBase
Properly initialized multi resolution quantity
Notes
Note
Normally, dataclasses can only be instantiated by only specifiying parameters expected by the automatically generated __init__ method. Using this method instead allows us to discard extraneous parameters, similarly to introducing a **kwargs parameter.
- get_nj()#
Returns nj as a list
- get_nj_interv(j1, j2)#
Returns nj as an array, for j in [j1,j2]