Hey there,
currently im working with CRP trying to reconstruct the phase space of financial time series but Im obtaining weird results, ill try to make me clear.
In order to obtain a delay embedding coordinates representation from financial time series, we are using Mutual Information (MI) and False Nearest Neighbors (FNN) as proposed by [Takens, 1981]; the implementation is based on CRP classes working in MATLAB 2009b environment. As far as we understand, Mutual Information and False Nearest Neighbors are deterministic methods, in this sense, as long as the same data and the same parameters are used MI and FNN they must provide the exact same results, right? This conception makes CRP's FNN results difficult to understand. So here comes our questions:
1. First, why would the MAX DIMENSION parameter would affect the Embedding dimension obtained? FNN states as false nearest neighbor any vector which would not satisfy two criteria: The euclidian distance between two vectors with two difference sizes would not be greater than a R_tol Threshold, and the degree of dispersion between a vector and all vectors standard deviation would not be greater than a R_accept threshold. We dont understand why when we change in the MAX DIMENSION parameter we dont obtained the same embedding dimension (keep in mind that we always increase this parameter from ranges of 2050)
2. Even when using the same exact parameters (DATA, MAX DIMENSION, TIME DELAY, NEIGHBOURHOOD CRITERION, NEIGHBOURHOOD SIZE, 'EUCLIDIAN DISTANCE'), running several times the programm we obtain several results for the correct embedding dimension.
We would appreciate any information about this issue.
Thanks in advance
Guillermo Santamaria
False Nearest Neighbors strange behavior
 Norbert
 Expert
 Posts: 194
 Joined: Wed Jan 4, 2006 11:03
 Affiliation (Univ., Inst., Dept.): Potsdam Institute for Climate Impact Research, Germany
 Location: Potsdam, Germany
 Location: Potsdam Institute for Climate Impact Research, Germany
Re: False Nearest Neighbors strange behavior
Hi,
the answer is simple. Because of the long time, a Matlab code will need to calculate the false nearest neighbours, not all points are used, but instead only a subset of 200 points. These points are randomly chosen, therefore, causing slightly different results when calling this function several times. This caveat is mentioned in the help text of this function. If you need a calculation using all points, simply specify it:
Mostly, the difference of the results is not very strong, as the tendency of the drop of the number of false nearest neighbours is mostly unaffected. For a rough estimation for the embedding dimension it is enough.
If you need a faster implementation using all data points, you might think about a C implementation (e.g., TISEAN should contain one).
I hope this clarifies this issue.
Best regards
Norbert
the answer is simple. Because of the long time, a Matlab code will need to calculate the false nearest neighbours, not all points are used, but instead only a subset of 200 points. These points are randomly chosen, therefore, causing slightly different results when calling this function several times. This caveat is mentioned in the help text of this function. If you need a calculation using all points, simply specify it:
where N should then be the length of the time series. Then, also the parameter maxdim will not have any impact on the number of false nearest neighbours, as this was also only an effect of the randomly drawn samples.Y=fnn(X,M,T,R,S,N)
Mostly, the difference of the results is not very strong, as the tendency of the drop of the number of false nearest neighbours is mostly unaffected. For a rough estimation for the embedding dimension it is enough.
If you need a faster implementation using all data points, you might think about a C implementation (e.g., TISEAN should contain one).
I hope this clarifies this issue.
Best regards
Norbert

 Junior
 Posts: 4
 Joined: Sun Feb 10, 2013 21:29
 Affiliation (Univ., Inst., Dept.): Federal University of Campina Grande
 Location: Campina Grande, Brazil
 Research field: Engeneering
Re: False Nearest Neighbors strange behavior
Prof. Norbert,
I want to know what those parameters mean: R and S, on the function fnn.
Thanks
I want to know what those parameters mean: R and S, on the function fnn.
Thanks
Vinícius Jefferson Dias Vieira, M.Sc.
Electrical Engineering Department,
Federal University of Campina Grande, Brazil
Electrical Engineering Department,
Federal University of Campina Grande, Brazil
 Norbert
 Expert
 Posts: 194
 Joined: Wed Jan 4, 2006 11:03
 Affiliation (Univ., Inst., Dept.): Potsdam Institute for Climate Impact Research, Germany
 Location: Potsdam, Germany
 Location: Potsdam Institute for Climate Impact Research, Germany
Re: False Nearest Neighbors strange behavior
Please have a look at
Kennel, M. B., Brown, R., Abarbanel, H. D. I.: Determining embedding dimension for phasespace reconstruction using a geometrical construction, Phys. Rev. A, 45, 1992.
Kennel, M. B., Brown, R., Abarbanel, H. D. I.: Determining embedding dimension for phasespace reconstruction using a geometrical construction, Phys. Rev. A, 45, 1992.