Canonical ensemble for time series

The package provides all the files necessary to sample from the canonical ensemble aimed at randomizing a set of time series.

You are now following this Submission

The canonical ensemble here defined provides a way to create an unbiased randomization of a set of N time series each of length P (stored in a NxP matrix W) without missing data (but a similarly ensemble can be defined to include also missing data). The ensemble here defined is aimed at preserving, as averages, the following quantities :
- Total number of positive and negative events of each sampling time and each time series (number of entries greater/less than 0 of each row and column of W)
- Sum of positive and negative values recorded during each sampling and each time series (sum over positive/negative entries of each row and each column of W)
For further details see the article: https://arxiv.org/pdf/1907.04925.pdf

To use the package, given a matrix W in memory, just call [ lm ] = find_lm(W,1) to find the Lagrange Multipliers defining the ensemble. To sample n matrices from the ensemble, once the Lagrange Multipliers are known, use [ S ] = sample_ensamble( W,lm,n ) . Each instance of the ensemble can be seen as a alternative scenario coherent with the constraints imposed on the system.

Cite As

Riccardo Marcaccioli (2026). Canonical ensemble for time series (https://www.mathworks.com/matlabcentral/fileexchange/72000-canonical-ensemble-for-time-series), MATLAB Central File Exchange. Retrieved .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.2

Description update: paper link added

1.0.1

Description Update

1.0.0