Open
Description
Hi,
I noticed that in the Koopman Reweighting Estimator, the selected eigenvector (that determines the weights), is chosen to be the one with the largest eigenvalue rather than the one with eigenvalue 1.
I encountered this issue when trying to use this and led to divisions by 0 (this would occur when attempting to normalize u such that the padded constant basis function, has constant 1, in u = u/np.dot(u, v)
)
In the (admittedly rare) case where the basis set and the off-equilibria data that compute it result in a (nearly exact) reversible Koopman matrix, would this not cause issues too? You would have degenerate eigenvalues, with some eigenvectors leading to divisions by 0 as well?
thanks
def _compute_u(K):
r"""Estimate an approximation of the ratio of stationary over empirical distribution from the basis.
Parameters:
-----------
K0 : (M+1, M+1) ndarray
Time-lagged correlation matrix for the whitened and padded data set.
Returns:
--------
weights : (M,) ndarray
Coefficients of the ratio stationary / empirical distribution from the whitened and expanded basis.
"""
M = K.shape[0] - 1
# Compute right and left eigenvectors:
l, U = eig(K.T)
l, U = sort_eigs(l, U)
# Extract the eigenvector for eigenvalue one and normalize:
u = np.real(U[:, 0]) #Extracting the biggest eigenvalue here, not necessarily equal to 1
v = np.zeros(M + 1)
v[M] = 1.0
u = u / np.dot(u, v)
return u
Metadata
Metadata
Assignees
Labels
No labels