pymultifracs.cumulants.Cumulants#
- class pymultifracs.cumulants.Cumulants(mrq: dataclasses.InitVar[MultiResolutionQuantity], n_cumul: int, scaling_ranges: ~typing.List[~typing.Tuple[int]], bootstrapped_mfa: dataclasses.InitVar[MFractalVar] = None, weighted: str = None, robust_kwargs: ~typing.Dict[str, object] = <factory>, robust: dataclasses.InitVar[bool] = False)#
Computes and analyzes cumulants
- Parameters:
- mrq
MultiResolutionQuantity
Multi resolution quantity to analyze.
- n_cumul
int
Number of cumulants to compute.
- j1
int
Lower-bound of the scale support for the linear regressions.
- j2
int
Upper-bound of the scale support for the linear regressions.
- weighted: str | None
Whether to used weighted linear regressions.
- mrq
- Attributes:
- formalism
str
Formalism used. Can be any of ‘wavelet coefs’, ‘wavelet leaders’, or ‘wavelet p-leaders’.
- nj
dict
(ndarray
) Number of coefficients at scale j. Arrays are of the shape (n_rep,)
- values
ndarray
,shape
(n_cumulants
,n_scales
,n_rep
) \(C_m(j)\).
- n_cumul
int
Number of computed cumulants.
- j1
int
Lower-bound of the scale support for the linear regressions.
- j2
int
Upper-bound of the scale support for the linear regressions.
- weighted
str
|None
Whether weighted regression was performed.
- m
ndarray
,shape
(n_cumulants,) List of the m values (cumulants), in order presented in the value arrays.
- j
ndarray
,shape
(n_scales,) List of the j values (scales), in order presented in the value arrays.
- log_cumulants
ndarray
,shape
(n_cumulants
,n_rep
) \((c_m)_m\), slopes of the curves \(j \times C_m(j)\).
- var_log_cumulants
ndarray
,shape
(n_cumulants
,n_rep
) Estimates of the log-cumulants
Warning
var_log_cumulants was not debugged
- n_rep
int
Number of realisations
- 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]