Using the HMatrix class directly

Hi there,

I was wondering whether it is possible to use the results of an HMatrix factorization of a covariance model in order to perform linear algebra computations (e.g., product and sum between HMat covariance matrices in order to estimate a Maximum Mean Discrepancy).

The API documentation of the related classes is extremely limited, and it is not clear whether the HMatrix class can be used as a stand alone linear algebra tool.

Cheers

1 Like

Sure you have product and sum (gemm) but otherwise its quite limited outside of the operators strictly needed for kriging.
You’ll probably be happyier with numpy anyways.

Hi all,
I agree with Julien P., this would be a very handy feature. If I understand correctly, any CovarianceModel object comes with the discretizeHMatrix method. Then, the main operations needed to estimate generic Maximum Mean Discrepancy are averages over rows (or columns) of the variance-covariance Hmatrix obtained. @jPelamatti are you thinking of reusing the smart linear algebraic expressions you co-developed for the HSICs? @josephmure FYI
Ciao!
Elias

1 Like

Thanks for these informations. However if it is the case, then the API documentation definitely needs to be reworked, and an additional should be provided, as it is currently very hard for a standard user to use the class as is.

1 Like