Skip to content

Estimate the acceptable minimum embedding dimension

kosh edited this page Feb 26, 2022 · 8 revisions

Estimate the acceptable minimum embedding dimension.

est_dimension_w_fnn

dev

Estimate the acceptable minimum embedding dimension using False Nearest Neighbors Algorithm [Kennel_1992].

Select xk appropriately from the embedded data with dimension d, find the closest tangent vector xn, and set the distance to Rkn. It is embedded from 1 to D_max. Calculate the closest distance for all data. The points that satisfy the following two conditions are counted. Atol (threshold_A) and Rtol (threshold_R) are thresholds.

\Biggl( \frac{R_{d+1}^2(k, n)-R_d^2(k, n)}{R_d^2(k, n)} \Biggr)^\frac{1}{2}>R_{tol}

\frac{R_{d+1}(k, n)}{R_A}>A_{tol}

RA is the standard deviation obtained from the time series.
Let the acceptable minimum embedding dimension be the first dimension below 1% (threshold_percent) in the percentages obtained for each embedded dimension.

By default, the actual calculation result is displayed. The point actually adopted is red. If you want to turn off the display, give plot=False.

from hundun.exploration import est_dimension_w_fnn

Parameters

  • u_seq
  • T
  • D_max=10
  • threshold_R=10
  • threshold_A=2
  • threshold_percent=1
  • plot=True
  • path_save_plot=None

Returns

  • dimension
  • percentages: numpy.ndarray

Example

Estimate the acceptable minimum embedding dimension for x in the Lorenz time series.

from hundun.equations import Lorenz
from hundun.exploration import est_dimension_w_fnn


x_seq = Lorenz.get_u_seq(25000)[::5, 0]
D, percentages = est_dimension_w_fnn(x_seq, T=10)
print(D)
3

img:embedding_T

Reference

Determining embedding dimension for phase-space reconstruction using a geometrical construction

(1992) Matthew B. Kennel, Reggie Brown, and Henry D. I. Abarbanel
DOI: 10.1103/PhysRevA.45.3403