public class LinearSVCAggregator
extends Object
implements scala.Serializable
Two LinearSVCAggregator can be merged together to have a summary of loss and gradient of the corresponding joint dataset.
This class standardizes feature values during computation using bcFeaturesStd.
param: bcCoefficients The coefficients corresponding to the features. param: fitIntercept Whether to fit an intercept term. param: bcFeaturesStd The standard deviation values of the features.
Constructor and Description |
---|
LinearSVCAggregator(Broadcast<Vector> bcCoefficients,
Broadcast<double[]> bcFeaturesStd,
boolean fitIntercept) |
Modifier and Type | Method and Description |
---|---|
LinearSVCAggregator |
add(org.apache.spark.ml.feature.Instance instance)
Add a new training instance to this LinearSVCAggregator, and update the loss and gradient
of the objective function.
|
Vector |
gradient() |
double |
loss() |
LinearSVCAggregator |
merge(LinearSVCAggregator other)
Merge another LinearSVCAggregator, and update the loss and gradient
of the objective function.
|
public LinearSVCAggregator add(org.apache.spark.ml.feature.Instance instance)
instance
- The instance of data point to be added.public LinearSVCAggregator merge(LinearSVCAggregator other)
this
object will be modified.)
other
- The other LinearSVCAggregator to be merged.public double loss()
public Vector gradient()