function vamp_score¶
- deeptime.decomposition.vamp_score(koopman_model, r: Union[float, str], covariances_test=None, dim: Optional[int] = None, epsilon: float = 1e-10)¶
Compute the VAMP score between a covariance-based Koopman model and potentially a test model for cross-validation.
- Parameters:
koopman_model (deeptime.decomposition.CovarianceKoopmanModel) – The model to score.
r (float or str) –
The type of score to evaluate. Can by an floating point value greater or equal to 1 or ‘E’, yielding the VAMP-r score or the VAMP-E score, respectively. [1] Typical choices (also accepted as inputs) are:
- ’VAMP1’ Sum of singular values of the half-weighted Koopman matrix.
If the model is reversible, this is equal to the sum of Koopman matrix eigenvalues, also called Rayleigh quotient [1].
- ’VAMPE’ Approximation error of the estimated Koopman operator with respect to
the true Koopman operator up to an additive constant [1] .
covariances_test (deeptime.covariance.CovarianceModel, optional, default=None) –
If test_model is not None, this method computes the cross-validation score between self and covariances_test. It is assumed that self was estimated from the “training” data and test_model was estimated from the “test” data. The score is computed for one realization of self and test_model. Estimation of the average cross-validation score and partitioning of data into test and training part is not performed by this method.
If covariances_test is None, this method computes the VAMP score for the model contained in self.
dim (int, optional, default=None) – Artificially restrict the scoring to the top dim slowest processes.
epsilon (float, default=1e-10) –
- Returns:
score – If test_model is not None, returns the cross-validation VAMP score between self and test_model. Otherwise return the selected VAMP-score of self.
- Return type:
float
Notes
If the Koopman model was estimated using correlations that are based on data with its sample mean removed, this effectively removes the constant function from the singular function space and artificially lowers the score by 1. This is accounted for in this method, i.e., if
koopman_model.cov.data_mean_removed
evaluates to True, the score is internally incremented by 1.The VAMP-\(r\) and VAMP-E scores are computed according to [1], Equation (33) and Equation (30), respectively.
References