org.apache.spark.mllib.optimization
Compute the gradient and loss given the features of a single data point, add the gradient to a provided vector to avoid creating new objects, and return loss.
Compute the gradient and loss given the features of a single data point, add the gradient to a provided vector to avoid creating new objects, and return loss.
features for one data point
label for this data point
weights/coefficients corresponding to features
the computed gradient will be added to this vector
loss
Compute the gradient and loss given the features of a single data point.
Compute the gradient and loss given the features of a single data point.
features for one data point
label for this data point
weights/coefficients corresponding to features
(gradient: Vector, loss: Double)
:: DeveloperApi :: Class used to compute the gradient for a loss function, given a single data point.