new Gradient()
Class used to compute the gradient for a loss function, given a single data point.
Methods
compute(data, label, weights) → {module:eclairjs.Tuple2}
Compute the gradient and loss given the features of a single data point.
Parameters:
Name | Type | Description |
---|---|---|
data |
module:eclairjs/mllib/linalg.Vector | |
label |
float | |
weights |
module:eclairjs/mllib/linalg.Vector |