cvxgrp / pymde

Minimum-distortion embedding with PyTorch
https://pymde.org
Apache License 2.0
526 stars 27 forks source link

Quadratic initialization on GPU #54

Closed adamgayoso closed 2 years ago

adamgayoso commented 2 years ago

The quadratic initialization takes the most time for a dataset with 150k observations and 15 nearest neighbors. Is it possible to use the GPU for this?

PyTorch has support for both CUDA-backed COO matrices and lobpcg. See sparse supported linear algebra operations.

akshayka commented 2 years ago

PyTorch has support for both CUDA-backed COO matrices and lobpcg. See sparse supported linear algebra operations.

Oh, that's awesome! I wasn't aware that sparse support had become this mature.

I'm definitely open to having this in PyMDE.

adamgayoso commented 2 years ago

I could maybe try to implement it, but even if it was in there, it seems like it's not accessible through preserve_neighbors (cg=True) option for quadratic init