multivariate_kurtosis
: Time series stationarity#
multivariate_kurtosis
#
- hypercoil.loss.multivariate_kurtosis(ts: Tensor, *, l2: float = 0.0, dimensional_scaling: bool = False, key: PRNGKey | None = None) Tensor [source]#
Multivariate kurtosis of a time series.
This is the multivariate kurtosis following Mardia, as used by Laumann and colleagues in the setting of functional connectivity. It is equal to the mean of the squared Mahalanobis norm of each time point (as parameterised by the inverse covariance of the multivariate time series).
- Parameters:
- tsTensor
Multivariate time series to be evaluated. Each row is a channel or variable, and each column is a time point.
- l2float (default 0)
L2 regularisation to be applied to the covariance matrix to ensure that it is invertible.
- dimensional_scalingbool (default False)
The expected value of the multivariate kurtosis for a normally distributed, stationary process of infinite duration with d channels (or variables) is \(d (d + 2)\). Setting this to true normalises for the process dimension by dividing the obtained kurtosis by \(d (d + 2)\). This has no effect in determining the optimum.
- Returns:
- Tensor
Multivariate kurtosis of the input time series.
MultivariateKurtosis
#
- class hypercoil.loss.MultivariateKurtosis(nu: float = 1.0, name: str | None = None, *, l2: float = 0.0, dimensional_scaling: bool = False, scalarisation: Callable | None = None, key: 'jax.random.PRNGKey' | None = None)[source]#
Multivariate kurtosis loss for a time series.
This is the multivariate kurtosis following Mardia, as used by Laumann and colleagues in the setting of functional connectivity. It is equal to the mean of the squared Mahalanobis norm of each time point (as parameterised by the inverse covariance of the multivariate time series).
- Parameters:
- name: str
Designated name of the loss function. It is not required that this be specified, but it is recommended to ensure that the loss function can be identified in the context of a reporting utilities. If not explicitly specified, the name will be inferred from the class name and the name of the scoring function.
- nu: float
Loss strength multiplier. This is a scalar multiplier that is applied to the loss value before it is returned. This can be used to modulate the relative contributions of different loss functions to the overall loss value. It can also be used to implement a schedule for the loss function, by dynamically adjusting the multiplier over the course of training.
- l2float (default 0)
L2 regularisation to be applied to the covariance matrix to ensure that it is invertible.
- dimensional_scalingbool (default False)
The expected value of the multivariate kurtosis for a normally distributed, stationary process of infinite duration with d channels (or variables) is \(d (d + 2)\). Setting this to true normalises for the process dimension by dividing the obtained kurtosis by \(d (d + 2)\). This has no effect in determining the optimum.
- scalarisation: Callable
The scalarisation function to be used to aggregate the values returned by the scoring function. This function should take a single argument, which is a tensor of arbitrary shape, and return a single scalar value. By default, the mean scalarisation is used.
Methods
__call__
(X, *[, key])Call self as a function.