public class LogisticGradient extends Object implements Serializable
See http://mlwiki.org/index.php/Logistic_Regression.
Constructor and Description |
---|
LogisticGradient(double l2) |
Modifier and Type | Method and Description |
---|---|
void |
computeGradient(List<LabeledPointWithWeight> dataPoints,
DenseVector coefficient,
DenseVector cumGradient)
Computes gradient on a set of samples.
|
org.apache.flink.api.java.tuple.Tuple2<Double,Double> |
computeLoss(List<LabeledPointWithWeight> dataPoints,
DenseVector coefficient)
Computes weight sum and loss sum on a set of samples.
|
public org.apache.flink.api.java.tuple.Tuple2<Double,Double> computeLoss(List<LabeledPointWithWeight> dataPoints, DenseVector coefficient)
dataPoints
- A sample set of train data.coefficient
- The model parameters.public void computeGradient(List<LabeledPointWithWeight> dataPoints, DenseVector coefficient, DenseVector cumGradient)
dataPoints
- A sample set of train data.coefficient
- The model parameters.cumGradient
- The accumulated gradients.Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.