simplex_project#
- iskra.geometry.distances.simplex_project(x: Tensor, simplices: Tensor) Tensor[SOURCE]#
Projects a point onto the closest point on a simplex.
- !!! tip
Internally broadcasts
x,simplicestogether, meaning it can be used to project many points onto a single simplex, one point onto many simplices or many points to many simplices, all by adding singleton dimensions to the batches before calling the function. Bs3 are the output batch dimensions obtained by broadcasting Bs1 and Bs2 together.