anewgithubname / Juzhen

Juzhen is a set of C++ APIs for matrix operations. It provides a higher-level interface for lower-level numerical calculation software like CBLAS and CUDA.
GNU General Public License v3.0
2 stars 0 forks source link

我想问一下Juzhen/examples /demo.cu中的两个测试:cuda_slowinv、cuda_dre对应哪些数学问题? #2

Closed LoserLus closed 9 months ago

LoserLus commented 9 months ago

作者您好,我最近在学习cuda的相关知识,看到了您的代码仓库。 我在看代码的时候发现Juzhen/examples /demo.cu中的两个测试:cuda_slowinv、cuda_dre我不是很理解,您可以解释一下这两个测试对应的是哪些数学问题吗?

anewgithubname commented 9 months ago

您好,slowinv计算的是一个正/负定 (PSD/NSD)矩阵的逆矩阵。它的解法是通过最小化 min_Y || I - XY ||^2 来达到。因为当X是PSD或者NSD的时候,I = XY <=> Y = inv(X)。但是这个解法其实很不聪明,因为它没有利用到X的对称性,所以我称之为slowinv,仅作为测试使用。

dre的话比较复杂。这个对应的问题其实是density ratio estimation (dre),是我研究中经常遇到的一个估计方法。我建议可以看一下density ratio estimation in machine learning那本书里Log Linear KLIEP的例子 (见第五章)。https://www.cambridge.org/core/books/density-ratio-estimation-in-machine-learning/BCBEA6AEAADD66569B1E85DDDEAA7648

LoserLus commented 9 months ago

您好,slowinv计算的是一个正/负定 (PSD/NSD)矩阵的逆矩阵。它的解法是通过最小化 min_Y || I - XY ||^2 来达到。因为当X是PSD或者NSD的时候,I = XY <=> Y = inv(X)。但是这个解法其实很不聪明,因为它没有利用到X的对称性,所以我称之为slowinv,仅作为测试使用。

dre的话比较复杂。这个对应的问题其实是density ratio estimation (dre),是我研究中经常遇到的一个估计方法。我建议可以看一下density ratio estimation in machine learning那本书里Log Linear KLIEP的例子 (见第五章)。https://www.cambridge.org/core/books/density-ratio-estimation-in-machine-learning/BCBEA6AEAADD66569B1E85DDDEAA7648

好的,十分感谢😁