Skip to content
Snippets Groups Projects
Commit 7c8cd1e0 authored by K. Hauke Kraemer's avatar K. Hauke Kraemer
Browse files

slight changes in "old" local_PRED and adjusted tests

parent d49eaf39
No related branches found
No related tags found
No related merge requests found
......@@ -382,7 +382,11 @@ function zeroth_prediction_cost(Y::AbstractDataset{D, ET};
# select a random state space vector sample according to input samplesize
NN = length(Y)-Tw;
NNN = floor(Int, samplesize*NN)
ns = sample(1:NN, NNN; replace=false) # the fiducial point indices
if samplesize < 1
ns = sample(1:NN, NNN; replace=false) # the fiducial point indices
else
ns = 1:NN # the fiducial point indices
end
vs = Y[ns] # the fiducial points in the data set
......@@ -586,7 +590,11 @@ function linear_prediction_cost(Y::AbstractDataset{D, ET};
# select a random state space vector sample according to input samplesize
NN = length(Y)-Tw;
NNN = floor(Int, samplesize*NN)
ns = sample(1:NN, NNN; replace=false) # the fiducial point indices
if samplesize < 1
ns = sample(1:NN, NNN; replace=false) # the fiducial point indices
else
ns = 1:NN # the fiducial point indices
end
vs = Y[ns] # the fiducial points in the data set
......
......@@ -186,11 +186,12 @@ println("\nTesting MCDTS complete tree, Lorenz Prediction:")
best_node = MCDTS.best_embedding(tree)
τ_mcdts2 = best_node.τs
L_mcdts2 = best_node.L
@test length(τ_mcdts2) == 4
@test τ_mcdts2[2] == 3
@test length(τ_mcdts2) == 5
@test τ_mcdts2[2] == 4
@test τ_mcdts2[3] == 1
@test τ_mcdts2[4] == 2
@test L_mcdts2 < 0.0000037
@test τ_mcdts2[5] == 3
@test L_mcdts2 < 0.00000383
# Prediction range-function, zeroth predictor mean-KL
......@@ -308,8 +309,8 @@ println("\nTesting MCDTS complete tree, Lorenz Prediction:")
τ_mcdts = best_node.τs
L_mcdts = best_node.L
@test length(τ_mcdts) == 3
@test τ_mcdts[2] == 1
@test τ_mcdts[3] == 5
@test τ_mcdts[2] == 5
@test τ_mcdts[3] == 1
@test L_mcdts < 0.01612
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment