Editing TISEAN package

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 139: Line 139:
[[File:lyap_k.png|400px|center]]
[[File:lyap_k.png|400px|center]]


=== Dimensions and Entropies ===
=== Dimensions and entropies ===
This section is discussed on the [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node29.html#SECTION00080000000000000000 TISEAN documentation page]. One of the functions discussed is {{Codeline|d2}}. It is used to estimate the correlation sum, correlation dimension and correlation entropy of a time series. The time series used here will be the Henon map.
This function uses a method to determine the minimum sufficient embedding dimension. It is based on the [http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/chaospaper/node9.html#SECTION00032200000000000000 False Nearest Neighbors] section of the TISEAN documentation. As a demonstration we will create a plot that contains an Ikeda Map, a Henon Map and a Henon Map corrupted by 10% of Gaussian noise.
{{Code|Calculation correlation sum, dimension and entropy|<syntaxhighlight lang="octave" style="font-size:13px">
{{Code|Analyzing false nearest neighbors|<syntaxhighlight lang="octave" style="font-size:13px">
# Create maps
# Create maps
ikd      = ikeda (10000);
hen      = henon (10000);
hen      = henon (10000);
# Calculate the correlation sum, dimension and entropy
hen_noisy = hen + std (hen) * 0.02 .* (-6 + sum (rand ([size(hen), 12]), 3));
vals = d2 (hen, 'd', 1, 'm', 5, 't',50);
# Create and plot false nearest neighbors
# Plot correlation sum
[dim_ikd, frac_ikd] = false_nearest (ikd(:,1));
subplot (2,3,1)
[dim_hen, frac_hen] = false_nearest (hen(:,1));
do_plot_corr  = @(x) loglog (x{1}(:,1),x{1}(:,2),'b');
[dim_hen_noisy, frac_hen_noisy] = false_nearest (hen_noisy(:,1));
hold on
plot (dim_ikd, frac_ikd, '-b*;Ikeda;',...
arrayfun (do_plot_corr, {vals.c2});
      dim_hen, frac_hen, '-r+;Henon;',...
hold off
      dim_hen_noisy, frac_hen_noisy, '-gx;Henon Noisy;');
xlabel ("Epsilon")
ylabel ("Correlation sums")
title ("c2");
# Plot correlation entropy
subplot (2,3,4)
do_plot_entrop  = @(x) semilogx (x{1}(:,1),x{1}(:,2),'g');
hold on
arrayfun (do_plot_entrop, {vals.h2});
hold off
xlabel ("Epsilon")
ylabel ("Correlation entropies");
title ("h2")
# Plot correlation dimension
subplot (2,3,[2 3 5 6])
do_plot_slope = @(x) semilogx (x{1}(:,1),x{1}(:,2),'r');
hold on
arrayfun (do_plot_slope, {vals.d2});
hold off
xlabel ("Epsilon")
ylabel ("Local slopes")
title ("d2");
</syntaxhighlight>}}
</syntaxhighlight>}}
[[File:d2_out.png|400px|center]]
The {{Codeline|dim_*}} variables hold the dimension (so here 1:5), and {{Codeline|frac_*}} contain the fraction of false nearest neighbors. From this chart we can obtain the sufficient embedding dimension for each system. For a Henon Map {{Codeline|m &#61; 2}} is sufficient, but for an Ikeda map it is better to use {{Codeline|m &#61; 3}}.
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}} (usually used to smooth the "{{Codeline|d2}}" field of the output).
[[File:tisean_false_neigh.png|400px|center]]
{{Code|Smooth output of d2|<syntaxhighlight lang="octave" style="font-size:13px">
 
# Smooth d2 output
 
figure 2
smooth = av_d2 (vals,'a',2);
# Plot the smoothed output
do_plot_slope = @(x) semilogx (x{1}(:,1),x{1}(:,2),'b');
hold on
arrayfun (do_plot_slope, {smooth.d2});
hold off
xlabel ("Epsilon")
ylabel ("Local slopes")
title ("Smooth");
</syntaxhighlight>}}
[[File:tisean_av_d2_out.png|400px|center]]
Optionally the line "{{Codeline|figure 2}}" can be omitted, which will cause the smoothed version to be superimposed on the "raw" version that came straight from {{Codeline|d2}}.


=== Testing for Nonlinearity ===
=== Testing for Nonlinearity ===
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: