jaxopt.objective.binary_logreg

jaxopt.objective.binary_logreg = <jaxopt._src.objective.BinaryLogreg object>

Binary logistic regression.

\[\frac{1}{n} \sum_{i=1}^n \ell(w^\top x_i, y_i)\]

where \(\ell\) is binary_logistic_loss and X, y = data.

Parameters
  • w – a vector of shape (n_features, ).

  • 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,), containing 0 or 1 values.

Returns

objective value.

Example:

value = binary_logreg(w, (X, y))