|
Methods
|
|
|
|
|
|
EOFspaceLeftPatterns
|
EOFspaceLeftPatterns ( self )
Returns the left canonical patterns in EOF coordinates
|
|
|
EOFspaceRightPatterns
|
EOFspaceRightPatterns ( self )
Returns the right canonical patterns in EOF coordinates
|
|
|
MCTest
|
MCTest (
self,
subsamples,
length,
)
Monte Carlo test for the temporal stability of the canonical patterns.
Parameters:
-
subsamples
- Number of Monte Carlo subsamples to take
-
lenght
- Length of each subsample (obviously less than the total
number od time records)
Returns a tuple with the left and right NumPy arrays containing in each
row the congruence coefficient of each subsample obtained patterns with
those obtained for the whole dataset.
|
|
|
MCTestCorrelation
|
MCTestCorrelation ( self, samples )
Monte Carlo test for the significance of the canonical correlations.
The input data are randomly temporally disordered and CCA is performed
obtaining a distribution of canonical correlations due to non actually
correlated fields but (inherently with the same probability distribution
as the original ones)
Parameters:
-
samples
- Number of Monte Carlo subsamples to take
Returns a Numpy array which columns are the different canonical
correlations for each MC run.
|
|
|
__init__
|
__init__ (
self,
leftfield,
rightfield,
retainedeofs=None,
)
BPCCA constructor.
Parameters:
-
leftfield
- One of the fields (say left) entering the CCA
computation (Numpy array). Time is assumed to be
its first dimension. The rest are kept as they are.
-
rightfield
- The other field (say right). The first dimension
must be the same size as that in
leftfield.
-
retainedeofs
- Tuple with two elements containing the number of
EOFs (see module
svdeofs) to retain in the left
and right fields. If not provided, those retaining
70% of the total field variance are selected.
Atributes:
The BPCCA object provides the following accesible atributes.
They are only suposed to be accesible for obtaining aditional info,
altering their values could be dangerous:
-
sPCA
- Is s
SVDEOFs object with the PCA analysis of the left field.
-
zPCA
- Idem for right field.
|
|
|
correlation
|
correlation ( self )
Returns the canonical correlation values
|
|
|
leftAdjointPatterns
|
leftAdjointPatterns ( self )
Returns (along the last dimension) the left adjoint canonical patterns
|
|
|
leftExpCoeffs
|
leftExpCoeffs ( self )
Returns the left temporal expansion coefficients
|
|
|
leftPatterns
|
leftPatterns ( self )
Returns (along the last dimension) the left canonical patterns
|
|
|
reconstructedFields
|
reconstructedFields ( self, nccps )
Reconstructs the original fields with the desired number (nccps) of canonical patterns
|
Exceptions
|
|
pyclimate.pyclimateexcpt.TooBigIntParameter( "nccps", nccps, self.n0 )
|
|
|
|
rightAdjointPatterns
|
rightAdjointPatterns ( self )
Returns (along the last dimension) the right adjoint canonical patterns
|
|
|
rightExpCoeffs
|
rightExpCoeffs ( self )
Returns the right temporal expansion coefficients
|
|
|
rightPatterns
|
rightPatterns ( self )
Returns (along the last dimension) the right canonical patterns
|
|
|
varianceFractions
|
varianceFractions ( self )
Returns a tuple with the left and right patterns explained variance fraction
|