In the constructor .from_penalty, we are currently always computing the eigenvalue decomposition of the penalty matrix. This is super inefficient, since the constructor gets called very often and the eigenvalues of the penalty matrix stays constant. What's more, the eigenvalue decomposition is computed even in the case that the user provides the rank and log pseudo-determinant of the penalty matrix manually. In this case, the eigenvalue-decomposition is not even used! The constructor could easily be made more efficient without changing its API by computing the eigenvalue-decomposition ONLY if the rank and log-pseudodeterminant are not provided.
In the constructor
.from_penalty
, we are currently always computing the eigenvalue decomposition of the penalty matrix. This is super inefficient, since the constructor gets called very often and the eigenvalues of the penalty matrix stays constant. What's more, the eigenvalue decomposition is computed even in the case that the user provides the rank and log pseudo-determinant of the penalty matrix manually. In this case, the eigenvalue-decomposition is not even used! The constructor could easily be made more efficient without changing its API by computing the eigenvalue-decomposition ONLY if the rank and log-pseudodeterminant are not provided.