pyhctsa.operations.distribution.moments

pyhctsa.operations.distribution.moments(y, the_mom=0, do_normalize=True)

A moment of the distribution of the input time series. Returns the standardized central moment: the the_mom-th central moment divided by the (population, divisor N) standard deviation raised to the power the_mom, so that the_mom = 3 is the skewness and the_mom = 4 the kurtosis (3 for a Gaussian) (or, with do_normalize=False, the raw central moment, as hctsa’s DN_Moments(y, theMom, false)).

Parameters:
y : array-like

Input time series or data vector.

the_mom : int, optional

The moment to calculate. Default is 0.

do_normalize : bool, optional

Whether to divide by std(y, ddof=0)**the_mom, giving the scale-invariant standardized moment (True, the default), or to return the raw central moment (False).

Returns:

The calculated moment.

Return type:

float