solve_ab_decomposition#
- torchdyno.optim.ridge_regression.solve_ab_decomposition(A, B, l2=None, device=None)[source]#
Computes the result of the AB decomposition for solving the linear system.
- Parameters:
A (Tensor) – YS^T, where Y is the target matrix and S is the input matrix.
B (Tensor) – SS^T, where S is the input matrix.
l2 (Optional[float], optional) – the value of l2 regularization. Defaults to None.
device (str | None)
- Returns:
matrix W of shape [label_size x hidden_size]
- Return type:
Tensor