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:
mrqMultiResolutionQuantity

Multi resolution quantity to analyze.

n_cumulint

Number of cumulants to compute.

j1int

Lower-bound of the scale support for the linear regressions.

j2int

Upper-bound of the scale support for the linear regressions.

weighted: str | None

Whether to used weighted linear regressions.

Attributes:
formalismstr

Formalism used. Can be any of ‘wavelet coefs’, ‘wavelet leaders’, or ‘wavelet p-leaders’.

njdict(ndarray)

Number of coefficients at scale j. Arrays are of the shape (n_rep,)

valuesndarray, shape (n_cumulants, n_scales, n_rep)

\(C_m(j)\).

n_cumulint

Number of computed cumulants.

j1int

Lower-bound of the scale support for the linear regressions.

j2int

Upper-bound of the scale support for the linear regressions.

weightedstr | None

Whether weighted regression was performed.

mndarray, shape (n_cumulants,)

List of the m values (cumulants), in order presented in the value arrays.

jndarray, shape (n_scales,)

List of the j values (scales), in order presented in the value arrays.

log_cumulantsndarray, shape (n_cumulants, n_rep)

\((c_m)_m\), slopes of the curves \(j \times C_m(j)\).

var_log_cumulantsndarray, shape (n_cumulants, n_rep)

Estimates of the log-cumulants

Warning

var_log_cumulants was not debugged

n_repint

Number of realisations

classmethod from_dict(d)#

Method to instanciate a dataclass by passing a dictionary with extra keywords

Parameters:
ddict

Dictionary containing at least all the parameters required by __init__, but can also contain other parameters, which will be ignored

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]