Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outline for estimating change points / tipping points #13

Closed
Datseris opened this issue Jan 26, 2023 · 1 comment
Closed

Outline for estimating change points / tipping points #13

Datseris opened this issue Jan 26, 2023 · 1 comment

Comments

@Datseris
Copy link
Member

Alright, so we have some measures that have been shown useful to detect transitions. We have some stuff from Early Warning Signals, where an estimator increases more and more towards the thransition, such as AR1-coefficient or Variance. We also have stuff from traditional nonlinear TSA that detect changes in dynamic behavior, such as permutation entropy.

Detecting a change function

As far as I can tell we need two different functions: one that finds significant change in an estimator, and one that finds a continuous increase of an estimator; these are two different things. So we could have: detect_change_points(x, measure, args...; kwargs...) and detect_increase(x, measure, args...; kwargs...).

Estimating significance of results

It's cool that we get the change points, how do you estimate significance? One way is with surrogate tests. E.g., for the slope / early warning signals: you collect the slopes of the surrogates. So, for each rolling window we do a surrogate test. In the surrogate test we collect a "significance" number: this is the normalized distance from the distribution: the absolute distance of the measured value of the slope at this window, minus the mean of the distribution, divided by the width of the central 5-95% quantile. If this number is less than 1 we have no significant result.

(So, this is another function on top of detect_increase or whatever)

sgen = surrogenerator(x, Method)

for i in 1:total_surrogates
   s = sgen()
   ar1_surrogate = sliding_window_apply(ar1_coeff, s, window_viewer)
   slopes = extract_slopes(ar1_surrogates
   matrix_of_slopes[i, :] .= slopes
end

significances = zeros(length(ar1_slopes_real))
for j in 1:size(matrix_of_slopes, 2)
   quantile_595 = quantile(matrix_of_slopes[:, j])
   significances[j] = abs(real_slope - mean(matrix_of_slopes[:, j])/quantile
end
@JanJereczek
Copy link
Contributor

@Datseris, I think we can close this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants