public interface Example extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
addGradient(Vector gradientVector,
double gradient)
Adds the current example's gradient to the gradientVector, assuming that
the gradient with respect to the prediction is gradient.
|
double |
getLabel()
Access to the label.
|
double |
predict(Vector w)
Computes the prediction for this Example, given the model w.
|
double getLabel()
double predict(Vector w)
w.dot(this.getFeatures())
w
- the modelvoid addGradient(Vector gradientVector, double gradient)
Copyright © 2016 The Apache Software Foundation. All rights reserved.