param_opt module
The eigval_tsa.param_opt module contains basic functions to optimize the parameters that are needed for an eigenvalue estimation with the module eigval_tsa.analysis. The functions
embedding_attractor_reconstruction(data, E, index_shift)
false_NN(data, time, index_shift, start_order = 1, end_order = 15, NN_threshold = 30)
various_R_threshold_fnn(data, index_shift= 1, start_threshold = 15, end_threshold = 50, start_order = 1, end_order = 15, save = False, save_name = 'fnn_R_threshold_series_default00.npy')
avg_distance_from_diagonal(data, E, start_lag = 1, end_lag = 10, image = False)
are explained in the following.
- antiCPy.early_warnings.dominant_eigenvalue.param_opt.embedding_attractor_reconstruction(data, E, index_shift=1)[source]
- Parameters:
data (The time series is given as a one-dimensional numpy array.) – The time series data that should be embedded.
E (The dimension \(E\) should be an integer \(E \in \mathbb{N} \setminus \{ 0, 1\}\).) – The dimension of the desired delayed state space embedding of the investigated time series.
index_shift (The index shift is given as an integer \(index\) _ \(shift\) \(\in \mathbb{N}\setminus \{ 0 \}\) .) – This parameter represents the desired time delay for the time delayed embedding. An index shift of one stands for one sampling step of the given time series, an index shift of two stands for a delay of two sampling steps of the time series per embedding dimension. The default value is one.
- Returns:
The result is a two dimensional numpy array that represents the time delayed state space reconstruction of the time series with the entered dimension \(E\) and the time delay \(index\) _ \(shift\). Every column represents a vector state in state space.
- Return type:
The result is given as a two dimensional numpy array.
- antiCPy.early_warnings.dominant_eigenvalue.param_opt.various_R_threshold_fnn(data, index_shift=1, start_threshold=15, end_threshold=50, start_order=1, end_order=15, save=False, save_name='fnn_R_threshold_series_default00.npy')[source]
- Parameters:
data (One dimensional numpy array.) – The time series data of which an optimal time delayed embedding dimension is needed.
index_shift (Integer.) – This parameter represents the desired time delay for the time delayed embedding. An index shift of one stands for one sampling step of the given time series, an index shift of two stands for a delay of two sampling steps of the time series per embedding dimension. The default value is one.
start_threshold (Integer.) – The threshold value determines the distance in the dimension \(m+1\) between a pair of next neighours in the dimension \(m\). The threshold value should be chosen big. A reasonable start threshold value is 15.
end_threshold (Integer.) – The threshold value determines the distance in the dimension \(m+1\) between a pair of next neighours in the dimension \(m\). The threshold value should be chosen big. A reasonable end threshold value is 50.
start_order (Integer.) – The start embedding dimension for which the number of false next neighbours is calculated. The default value is one.
end_order (Integer.) – The last embedding dimension for which the number of false next neighbours is calculated. The default value is 15.
save (Boolean.) – Determines wether the fnn data is saved as a numpy array or not. Default is
False.save_name (String.) – Specifies the name of the saved fnn data array.
- Returns:
The result is a two dimensional numpy array with the counted number of false next neighbours for the chosen threshold values. The rows correspond to subsequent thresholds. The first row corresponds to
start_threshold. The last row corresponds toend_threshold. The columns correspond to subsequent embedding dimensions. The first entry contains the number of false next neighbours of thestart_dimension, the last entry is given by the number of false next neighbours of theend_dimension.- Return type:
The result is given as a two dimensional numpy array.
- Note:
The NN_threshold interval is chosen following the guide line in [KBA92] .
[KBA92] (1,2)Matthew B. Kennel, Reggie Brown, and Henry D. I. Abarbanel. “Determining embedding dimension for phase-space reconstruction using a geometrical construction”. In: Phys. Rev. A 45 (6 Mar. 1992), pp. 3403–3411. doi: 10.1103/ PhysRevA . 45 . 3403. url: https : / / link . aps . org / doi / 10 . 1103 / PhysRevA.45.3403.
- antiCPy.early_warnings.dominant_eigenvalue.param_opt.false_NN(data, index_shift=1, start_order=1, end_order=15, NN_threshold=30)[source]
- Parameters:
data (The time series is given as a one-dimensional numpy array.) – The time series data of which an optimal time delayed embedding dimension is needed.
index_shift (This parameter represents the desired time delay for the time delayed embedding. An index shift of one stands for one sampling step of the given time series, an index shift of two stands for a delay of two sampling steps of the time series per embedding dimension. The default value is one.) – This parameter represents the desired time delay for the time delayed embedding. An index shift of one stands for one sampling step of the given time series, an index shift of two stands for a delay of two sampling steps of the time series per embedding dimension. The default value is one.
start_order (This parameter is an integer \(start\) _ \(order\) \(\in \mathbb{N}\setminus \{ 0 \}\) . The default value is one.) – The start embedding dimension for which the number of false next neighbours is calculated. The default value is one.
end_order (This parameter is an integer \(end\) _ \(order\) \(\in \mathbb{N}\setminus \{ 0 \}\) . It should hold \(end\) _ \(order>start\) _ \(order\) . The default value is 15.) – The last embedding dimension for which the number of false next neighbours is calculated. The default value is 15.
NN_threshold (The threshold value is an integer that is commonly chosen as \(NN\) _ \(threshold \in [15, 50 ]\) .) – The threshold value determines the distance in the dimension \(m+1\) between a pair of next neighours in the dimension \(m\). The threshold value should be chosen big. A reasonable range of threshold values lies in the interval [15, 50].
- Returns:
The result is a one dimensional numpy array with the counted number of false next neighbours for the chosen threshold value. The first entry contains the number of false next neighbours of the start_dimension, the last entry is given by the number of false next neighbours of the end_dimension.
- Return type:
The result is given as a one dimensional numpy array.
- Note:
The NN_threshold interval is chosen following the guide line in [KBA92] .
- antiCPy.early_warnings.dominant_eigenvalue.param_opt.avg_distance_from_diagonal(data, E, start_lag=1, end_lag=10, image=False)[source]
- Parameters:
data (The time series is given as a one-dimensional numpy array.) – The time series data for which is needed an optimal time delayed embedding dimension.
E (The dimension \(E\) should be an integer \(E \in \mathbb{N} \setminus \{ 0, 1\}\) .) – The dimension of the desired delayed state space embedding of the investigated time series.
start_lag (This parameter is an integer \(start\) _ \(lag\) \(\in \mathbb{N}\setminus \{ 0 \}\) . The default value is one.) – The start time lag that is chosen to calculate the average distance from diagonal for a given dimension \(E\) . The default value is one.
end_lag (This parameter is an integer \(end\) _ \(lag\) \(\in \mathbb{N}\setminus \{ 0 \}\) . It should hold \(end\) _ \(lag>start\) _ \(lag\) . The default value is 10.) – The last time lag for which is calculated the average distance from diagonal for a given dimension \(E\) . The default value is 10.
image (Boolean variable.) – A boolean with the default value False. If it is chosen True, the function creates a plot of the average distance from diagonal depending on the chosen time lag.
- Returns:
The function returns a one dimensional numpy array with the average distances from diagonal for every integer time lag in the chosen interval. The average distance from diagonal for the start time lag can be found in the first array entry. The array is designed in ascending time lags.
- Return type:
The result is given as a one dimensional numpy array.