ScalarProductAffinity#
- class torchdr.ScalarProductAffinity(device: str = 'auto', backend: str | None = None, verbose: bool = False)[source]#
Bases:
UnnormalizedAffinity
Compute the scalar product affinity matrix.
Its expression is given by \(\mathbf{X} \mathbf{X}^\top\) where \(\mathbf{X} = (\mathbf{x}_1, \ldots, \mathbf{x}_n)^\top\) with each row vector \(\mathbf{x}_i\) corresponding to the i-th data sample.