climate.eventseries_climatenetwork

Provides class for the analysis of dynamical systems and time series based on event synchronization and event coincidence analysis

class pyunicorn.climate.eventseries_climatenetwork.EventSeriesClimateNetwork(data, method='ES', p_value=None, **kwargs)[source]

Bases: EventSeries, ClimateNetwork

Class EventSeriesClimateNetwork for generating and quantitatively analyzing event synchronisation and event coincidence analysis networks

References: [Boers2014].

static SmallTestData()[source]

Return test data set of 6 time series with 10 sampling points each.

Example:

>>> r(Data.SmallTestData().observable())
array([[ 0.    ,  1.    ,  0.    , -1.    , -0.    ,  1.    ],
       [ 0.309 ,  0.9511, -0.309 , -0.9511,  0.309 ,  0.9511],
       [ 0.5878,  0.809 , -0.5878, -0.809 ,  0.5878,  0.809 ],
       [ 0.809 ,  0.5878, -0.809 , -0.5878,  0.809 ,  0.5878],
       [ 0.9511,  0.309 , -0.9511, -0.309 ,  0.9511,  0.309 ],
       [ 1.    ,  0.    , -1.    , -0.    ,  1.    ,  0.    ],
       [ 0.9511, -0.309 , -0.9511,  0.309 ,  0.9511, -0.309 ],
       [ 0.809 , -0.5878, -0.809 ,  0.5878,  0.809 , -0.5878],
       [ 0.5878, -0.809 , -0.5878,  0.809 ,  0.5878, -0.809 ],
       [ 0.309 , -0.9511, -0.309 ,  0.9511,  0.309 , -0.9511]])
Return type:

ClimateData instance

Returns:

a ClimateData instance for testing purposes.

__init__(data, method='ES', p_value=None, **kwargs)[source]

Initialize an instance of EventSeriesClimateNetwork.

For other applications of event series networks please use the EventSeries class together with the Network class.

Parameters:
  • data (climate.ClimateData) – The climate data used for network construction.

  • method (str {'ES', 'ECA', 'ES_pval', 'ECA_pval'}) – determines if ES, ECA, or the p-values of one of the methods should be used for network reconstruction.

  • p_value (float in [0,1]) – determines the p-value threshold for network reconstruction. ES/ECA scores of event time series pairs with p-value higher than threshold are set to zero leading to missing link in climate network. Default: None. No p-value thresholding.

  • **kwargs – optional keyword arguments to specify parent classes’ behavior, see below for all options.

Keyword Arguments:
  • taumax (float) – maximum time difference between two events to be considered synchronous. Caution: For ES, the default is np.inf because of the intrinsic dynamic coincidence interval in ES. For ECA, taumax is a parameter of the method that needs to be defined.

  • lag (float) – extra time lag between the event series.

  • symmetrization ( str {'directed', 'symmetric', 'antisym', 'mean', 'max', 'min'} for ES, str {‘directed’, ‘mean’, ‘max’, ‘min’}`` for ECA ) – determines if and if true, which symmetrization should be used for the ES/ECA score matrix.

  • window_type ( str {'retarded', 'advanced', 'symmetric'} ) – Only for ECA. Determines if precursor coincidence rate (‘advanced’), trigger coincidence rate (‘retarded’) or a general coincidence rate with the symmetric interval [-taumax, taumax] are computed (‘symmetric’). Default: ‘symmetric’.

  • threshold_method ( str 'quantile' or 'value' or 1D numpy array of 'quantile' or 'value' ) – specifies the method for generating a binary event matrix from an array of continuous time series. Default: None.

  • threshold_values (1D Numpy array or float) – quantile or real number determining threshold for each variable. Default: None.

  • threshold_types ( str 'above' or 'below' or 1D list of strings of 'above' or 'below' ) – determines for each variable if event is below or above threshold.

  • non_local (bool) – determines whether links between spatially close nodes should be suppressed.

  • node_weight_type (str) – The type of geographical node weight to be used.

  • arg silence_level (int) – The inverse level of verbosity of the object.

__str__()[source]

Return a string representation of EventSeriesClimateNetwork.

Example:

>>> data = EventSeriesClimateNetwork.SmallTestData()
>>> print(EventSeriesClimateNetwork(data, taumax=16.0,
>>>       threshold_method='quantile', threshold_value=0.8,
>>>       threshold_types='above'))
Extracting network adjacency matrix by thresholding...
Setting area weights according to type surface ...
Setting area weights according to type surface ...
EventSeriesClimateNetwork:
EventSeries: 6 variables, 10 timesteps, __taumax: 16.0, lag: 0.0
ClimateNetwork:
GeoNetwork:
Network: directed, 6 nodes, 0 links, link density 0.000.
Geographical boundaries:
         time     lat     lon
   min    0.0    0.00    2.50
   max    9.0   25.00   15.00
Threshold: 0
Local connections filtered out: False
Type of event series measure to construct
the network: directedES