jaxopt.objective.least_squares

jaxopt.objective.least_squares = <jaxopt._src.objective.LeastSquares object>

Least squares.

\[\frac{1}{2n} ||XW - y||_2^2\]
Parameters
  • W – parameters.

  • data – a tuple (X, y) where X is a matrix of shape (n_samples, n_features) and y is a vector of shape (n_samples,).

Returns

objective value.

Example:

value = least_squares(W, (X, y))