开源软件名称(OpenSource Name):danm0nster/mdembedding开源软件地址(OpenSource Url):https://github.com/danm0nster/mdembedding开源编程语言(OpenSource Language):MATLAB 100.0%开源软件介绍(OpenSource Introduction):Estimation of embedding parameters for multivariate dataThis repository contains MATLAB code for estimating parameters for phase space reconstruction of multivariate data. The functions provided in this repository are described in the article:
InstallationThe functions in this repository can be used if you place the files containing them in a directory that is in your MATLAB Path. You can simply download mdDelay.m, autoMI.m and mdFnn.m or you can clone the whole repository to get all the files and examples:
If you want your cloned copy in a different directory you can change the last parameter to something else, e.g. To embed time series data using the time-delayed embedding method two parameters are needed: the time delay and the embeddding dimension. We provide two functions to estimate these parameters: ExampleThis is a short example of how to use the functions using the well-known Lorenz attractor. The data have been pre-generated and the MATLAB code for generating the plots can be found in this repository under docs/Lorenz, and you can also view the full output of the MATLAB notebook. Here, we will just show the basic commands used to produce plots and other outputs. We start by loading the data generated by a numerical solution to the Lorenz equations data = load('lorenz_3d_timeseries.txt'); The data can be visualized by plotting the three variables x, y and z. plot3(data(:,1), data(:,2), data(:,3), 'k') Estimating the time delayTo estimate the proper time delay for embedding the data we use the function tau = mdDelay(data, 'maxLag', 25, 'plottype', 'all'); This gives a value of tau = mdDelay(data, 'maxLag', 25, 'plottype', 'mean'); Estimating the embedding dimensionThe optimal embedding dimension is estimated using the method of false nearest neighbors (FNN), which is implemented in the function [fnnPercent, embeddingDimension] = mdFnn(data, round(tau)); Since the number of false nearest neighbors drops to zero already at 2 embeddings we see that it is enough to embed the data in the three dimensions already present in the data, which is not surprising because we have sampled all the variables in the dynamical system. Testing the functionsYou can run a short test suite for the functions by typing the following command in the MATLAB command window. runtests('tests/mdDelayTest.m') If the test is successful you should see something like the output below.
How to citeIf you find these functions useful and publish results where you have used them, please cite our paper: Wallot & Mønster (2018) Calculation of average mutual information (AMI) and false-nearest neighbors (FNN) for the estimation of embedding parameters of multidimensional time-series in MATLAB Frontiers in Psychology, 9: 1679 DOI:10.3389/fpsyg.2018.01679 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论