climate.partial_correlation¶
Provides classes for generating and analyzing complex climate networks.
- class pyunicorn.climate.partial_correlation.PartialCorrelationClimateNetwork(data, threshold=None, link_density=None, non_local=False, node_weight_type='surface', winter_only=True, silence_level=0)[source]¶
Bases:
TsonisClimateNetwork
Encapsulates a partial correlation climate network.
Constructs a static climate network based on partial correlation, as in [Ueoka2008].
- __init__(data, threshold=None, link_density=None, non_local=False, node_weight_type='surface', winter_only=True, silence_level=0)[source]¶
Initialize an instance of PartialCorrelationClimateNetwork.
Note
Either threshold OR link_density have to be given!
- Possible choices for
node_weight_type
: None (constant unit weights)
“surface” (cos lat)
“irrigation” (cos**2 lat)
- Parameters:
data (
ClimateData
) – The climate data used for network construction.threshold (float) – The threshold of similarity measure, above which two nodes are linked in the network.
link_density (float) – The networks’s desired link density.
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.
winter_only (bool) – Determines, whether only data points from the winter months (December, January and February) should be used for analysis. Possibly, this further suppresses the annual cycle in the time series.
silence_level (int) – The inverse level of verbosity of the object.
- Possible choices for
- _calculate_correlation(anomaly)[source]¶
Return the partial correlation matrix at zero lag.
- Parameters:
anomaly (2D Numpy array (time, index)) – the anomaly time series from to calculate the partial correlation matrix at zero lag.
- Return type:
2D Numpy array (index, index)
- Returns:
the partial correlation matrix at zero lag.