Skip to content

Searches for the optimal embedding dimension (E) and time delay (tau) to maximize the accuracy of causality predictions in a dataset. It evaluates each combination of E and tau for their ability to predict different types of causality: total, positive, negative, and dark.

Usage

optimalParametersSearch(Emax, tauMax, metric, dataset)

Arguments

Emax

The maximum embedding dimension to test.

tauMax

The maximum time delay to test.

metric

The distance metric to use in the causality analysis (e.g., 'euclidean').

dataset

A matrix where each column represents a time series to be analyzed.

Value

A data frame summarizing the causality analysis results across all tested E and tau values, showing the mean total, positive, negative, and dark causality accuracies for each parameter combination.

Examples

data(climate_indices)
dataset <- climate_indices[, -1]
# \donttest{
optimalParams <- optimalParametersSearch(Emax=3, tauMax=3, metric="euclidean", dataset=dataset)
#> Testing | E:  2 
#> Testing | tau:  1 
#> Testing | tau:  2 
#> Testing | tau:  3 
#> Testing | E:  3 
#> Testing | tau:  1 
#> Testing | tau:  2 
#> Testing | tau:  3 
#> Calculation duration:  42.0741589069366
print(optimalParams)
#>                   Total of which Positive of which Negative of which Dark
#> E = 2 tau = 1 0.5543614         0.5519477         0.4474361  0.0006162144
#> E = 2 tau = 2 0.5727414         0.5736100         0.4232828  0.0031071596
#> E = 2 tau = 3 0.5711838         0.5469069         0.4513270  0.0017660870
#> E = 3 tau = 1 0.3305296         0.3457169         0.2470929  0.4071902523
#> E = 3 tau = 2 0.3500000         0.4037138         0.2547524  0.3415338782
#> E = 3 tau = 3 0.3570093         0.3657638         0.2690536  0.3651826225
# }