torch_lstsq {torch} | R Documentation |
Lstsq
Description
Lstsq
Arguments
self |
(Tensor) the matrix |
A |
(Tensor) the |
lstsq(input, A, out=NULL) -> Tensor
Computes the solution to the least squares and least norm problems for a full
rank matrix of size
and a matrix
of
size
.
If ,
torch_lstsq()
solves the least-squares problem:
If ,
torch_lstsq()
solves the least-norm problem:
Returned tensor has shape
. The first
rows of
contains the solution. If
, the residual sum of squares
for the solution in each column is given by the sum of squares of elements in the
remaining
rows of that column.
Note
The case when \eqn{m < n} is not supported on the GPU.
[Package torch version 0.13.0 Index]