public class GenericLossFunction extends Object implements LossFunction, scala.Product, scala.Serializable
PartialLossFunction
and the PredictionFunction
.
Constructor and Description |
---|
GenericLossFunction(PartialLossFunction partialLossFunction,
PredictionFunction predictionFunction) |
Modifier and Type | Method and Description |
---|---|
scala.Tuple2<Object,WeightVector> |
lossGradient(LabeledVector dataPoint,
WeightVector weightVector)
Calculates the gradient as well as the loss given a data point and the weight vector
|
PartialLossFunction |
partialLossFunction() |
PredictionFunction |
predictionFunction() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
gradient, loss
public GenericLossFunction(PartialLossFunction partialLossFunction, PredictionFunction predictionFunction)
public PartialLossFunction partialLossFunction()
public PredictionFunction predictionFunction()
public scala.Tuple2<Object,WeightVector> lossGradient(LabeledVector dataPoint, WeightVector weightVector)
lossGradient
in interface LossFunction
dataPoint
- weightVector
- Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.