Skip to content

Commit

Permalink
fix tests on fnn
Browse files Browse the repository at this point in the history
  • Loading branch information
heliosdrm committed Dec 5, 2018
1 parent 39ffc7e commit 43d0943
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/estimate_dimension.jl
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function fnn(s::AbstractVector, τ::Int, γs = 1:5; rtol=10., atol=2.)
end

"""
f1nn(s::AbstractVector, τ:Int, γs = 1:5, rtol=10., atol=2.)
f1nn(s::AbstractVector, τ:Int, γs = 1:5)
Calculate the ratio of "false first nearest neighbors" (FFNN) of the datasets created
from `s` with a sequence of `τ`-delayed temporal neighbors.
Expand Down
4 changes: 2 additions & 2 deletions test/R_params.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ end

τ = 15
Ds = 1:5
number_fnn = DelayEmbeddings.estimate_dimension(s_roessler, τ, Ds, "fnn"; atol=15)
number_fnn = DelayEmbeddings.estimate_dimension(s_roessler, τ, Ds, "fnn"; rtol=15)
@test findfirst(number_fnn .≈ 0.0) [2, 3]

τ = 1
Ds = 1:5
number_fnn = DelayEmbeddings.estimate_dimension(s_lorenz, τ, Ds, "fnn"; atol=1, atol=3.0)
number_fnn = DelayEmbeddings.estimate_dimension(s_lorenz, τ, Ds, "fnn"; atol=1, rtol=3.0)
@test findfirst(number_fnn .≈ 0.0) [2, 3]

# Test `f1nn` method
Expand Down

1 comment on commit 43d0943

@heliosdrm
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trivial fix on the latest change of test/R_params.jl

Please sign in to comment.