Closed andrew-edwards closed 6 years ago
Issue 1 is expected behavior: the leave-one-out cross-validation is done on the reconstructed vectors. Thus, when creating a lagged block manually and using block_lnlp, the output will be the same.
To prevent a value from being used in any vectors, consider using exclusion_radius
, to disallow neighbors from within a certain time-range centered at the target point.
Issue 2 is a bug in selecting nearest neighbors, and should now be fixed.
I have written some R code to manually do simplex calculations in order to better understand the methods used in the rEDM package. I get results that exactly match those from rEDM for 92 out of the 99 predictions in my example data set. So this Issue is concerned with understanding why the remaining values differ (they differ for three different reasons), and confirming what rEDM is doing.
Maybe I am misunderstanding something or there are some assumptions in rEDM that I have not found documentation of. I have written up the details in the attached file rEDMissues.pdf and provided a minimal working example in mwe.r, which is copied below.
rEDMissues.pdf
Thanks for any insight - my manually calculated results for my simulated dataset actually suggest that the EDM method is doing better (higher correlation coefficient rho) than implied by rEDM.
File mwe.r is copied below (it seems that .r files cannot be inserted in GitHub comments like a .pdf can):