public class LogisticGradient extends Object implements Serializable
See http://mlwiki.org/index.php/Logistic_Regression.
| 构造器和说明 |
|---|
LogisticGradient(double l2) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
computeGradient(List<org.apache.flink.ml.common.feature.LabeledPointWithWeight> dataPoints,
org.apache.flink.ml.linalg.DenseVector coefficient,
org.apache.flink.ml.linalg.DenseVector cumGradient)
Computes gradient on a set of samples.
|
org.apache.flink.api.java.tuple.Tuple2<Double,Double> |
computeLoss(List<org.apache.flink.ml.common.feature.LabeledPointWithWeight> dataPoints,
org.apache.flink.ml.linalg.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<org.apache.flink.ml.common.feature.LabeledPointWithWeight> dataPoints, org.apache.flink.ml.linalg.DenseVector coefficient)
dataPoints - A sample set of train data.coefficient - The model parameters.public void computeGradient(List<org.apache.flink.ml.common.feature.LabeledPointWithWeight> dataPoints, org.apache.flink.ml.linalg.DenseVector coefficient, org.apache.flink.ml.linalg.DenseVector cumGradient)
dataPoints - A sample set of train data.coefficient - The model parameters.cumGradient - The accumulated gradients.Copyright © 2019–2021 The Apache Software Foundation. All rights reserved.