Jump to navigation Jump to search

TISEAN package

1,158 bytes removed, 12:37, 14 August 2015
→‎Testing for Nonlinearity: updated with good example
=== Testing for Nonlinearity ===
This section is discussed on the [ SECTION00090000000000000000 TISEAN documentation page]. One The focus of this section will be the functions discussed is function {{Codeline|d2surrogates}}. It uses surrogate data to determine weather data is used to estimate nonlinear. Let us first create the correlation sum, correlation dimension and correlation entropy of input data which will be a time seriesstationary Gaussian linear stochastic process. The time series used here will be It is measured by {{Codeline|s(xn) &#61; xn^3}}. We then run it through {{Codeline|surrogates}} and plot the Henon mapdata.{{Code|Calculation correlation sum, dimension and entropyCreating data from Gaussian process|<syntaxhighlight lang="octave" style="font-size:13px"># Create mapsGaussian process datahen g = henon zeros (100002000,1);# Calculate the correlation sum, dimension and entropyfor i = 2:2000vals = d2 g(hen, 'd', 1, 'm', 5, 't',50i);# Plot correlation sumsubplot = 0.7 * g(2,3,i-1)do_plot_corr + = @(x) loglog -6 + sum (rand (x{1}[size(:,1),x{1}(:,212]),'b'3);hold onarrayfun (do_plot_corr, {vals.c2});hold offxlabel ("Epsilon")ylabel ("Correlation sums")title ("c2");endfor# Plot correlation entropyCreate a measurement of itsubplot (2,3,4)do_plot_entrop spike = @(x) semilogx (x{1}(:,1),x{1}(:,2),'g');hold onarrayfun (do_plot_entrop, {vals.h2})^3;hold off# Create the surrogatexlabel sur = surrogates ("Epsilon")ylabel ("Correlation entropies"spike);title ("h2")# Plot correlation dimensionthe datasubplot (2,3,[2 3 5 6])do_plot_slope = @(x) semilogx (x{1}(:,1),x{1}plot (:,2)spike,'rg');hold onarrayfun (do_plot_slope, {vals.d2});hold offxlabel ("Epsilon")ylabel ("Local slopes")title ("d2spike");</syntaxhighlight>}}[[File:d2_out.png|400px|center]]The output of {{Codeline|d2}} can be further processed using the following functions: {{Codeline|av_d2}}, {{Codeline|c2t}}, {{Codeline|c2g}}. This tutorial will show how to use {{Codeline|av_d2}} which smooths the output of {{Codeline|d2}} subplot (usually used to smooth the "{{Codeline|d2}}" field of the output).{{Code|Smooth output of d2|<syntaxhighlight lang="octave" style="font-size:13px"># Smooth d2 outputfigure 2smooth = av_d2 (vals,'a'1,2);# Plot the smoothed outputdo_plot_slope = @(x) semilogx (x{1}(:,1),x{1}plot (:,2)sur,'b');hold onarrayfun (do_plot_slope, {smooth.d2});hold offxlabel ("Epsilon")ylabel ("Local slopes")title ("Smoothsurrogate");
Optionally the line "{{Codeline|figure 2}}" can be omitted, which will cause It is crucial that the smoothed version input to be superimposed on the "raw" version that came straight from {{Codeline|d2}}.surro


Navigation menu