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.
50 Downloads
Updated 14 Jul 2019

View License

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 (2024). Canonical ensemble for time series (https://www.mathworks.com/matlabcentral/fileexchange/72000-canonical-ensemble-for-time-series), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2017a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Conditional Mean Models in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.2

Description update: paper link added

1.0.1

Description Update

1.0.0