JuliaDynamics / TransitionsInTimeseries.jl

Transition Indicators / Early Warning Signals / Regime Shifts / Change Point Detection
MIT License
18 stars 5 forks source link

Example: Dansgaard-Oescher events with NGRIP and CLIMBER-X data #44

Closed JanJereczek closed 10 months ago

JanJereczek commented 1 year ago

This PR mainly provides an example (docs/src/examples/do-events.jl) of Critical Slowing Down applied on the $\delta^{18}O$ record from NGRIP. This time series displays DO-events and therefore many abrupt transitions in real-world, paleoclimatic data. Furthtermore, the same analysis is performed on simulation data from CLIMBER-X (less noisy and even time sampling), an Earth Model of Intermediate Complexity able to reproduce DO-like events.

Two things are mildly ugly in this example and are subject to future changes:

This PR additionally comes with minor suggestions:

JanJereczek commented 1 year ago

Commit d430b09 separates the config of the significance analysis, now defined in e.g. SurrogastesConfig<:SignificanceConfig, from its results, now stored in e.g. SurrogatesSignificance<:TransitionsSignificance. Now we would run:

sigconfig = SurrogatesConfig()
signif = estimate_significance(sigconfig, wir::WindowedIndicatorResults)

The p-values, their flags and the config used are accessible by calling the fields .pvalues, .flags, .config. This separation is more coherent with the choices we've made so far for the API, for instance separating WindowedIndicatorConfig from WindowedIndicatorResults.

Furthermore, if one wants to analyse many time series with the same config, no need to initialise it every time within the loop.

An additional change has been made in the initialisation of the p-values (c.f. estimate_significance). It was formerly done with similar() which however led to some nonsense p-values in some cases (outside of [0,1]). It is now corrected by simply using zeros instead.

Datseris commented 11 months ago

please use this : https://github.com/JuliaDynamics/ComplexityMeasures.jl/pull/302

Datseris commented 11 months ago

[Li2019](@cite)

Datseris commented 10 months ago

closing in favor of #48 (which I will review soon). Don't worry Jan I am not deleting the branch yet.