public class GenericLossFunction extends Object implements LossFunction, scala.Product, scala.Serializable
PartialLossFunction
and the PredictionFunction
.
param: partialLossFunction param: predictionFunction
Constructor and Description |
---|
GenericLossFunction(PartialLossFunction partialLossFunction,
PredictionFunction predictionFunction) |
Modifier and Type | Method and Description |
---|---|
abstract static boolean |
canEqual(Object that) |
abstract static boolean |
equals(Object that) |
static WeightVector |
gradient(LabeledVector dataPoint,
WeightVector weightVector) |
static double |
loss(LabeledVector dataPoint,
WeightVector weightVector) |
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() |
abstract static int |
productArity() |
abstract static Object |
productElement(int n) |
static scala.collection.Iterator<Object> |
productIterator() |
static String |
productPrefix() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
gradient, loss
public GenericLossFunction(PartialLossFunction partialLossFunction, PredictionFunction predictionFunction)
public static double loss(LabeledVector dataPoint, WeightVector weightVector)
public static WeightVector gradient(LabeledVector dataPoint, WeightVector weightVector)
public abstract static boolean canEqual(Object that)
public abstract static boolean equals(Object that)
public abstract static Object productElement(int n)
public abstract static int productArity()
public static scala.collection.Iterator<Object> productIterator()
public static String productPrefix()
public PartialLossFunction partialLossFunction()
public PredictionFunction predictionFunction()
public scala.Tuple2<Object,WeightVector> lossGradient(LabeledVector dataPoint, WeightVector weightVector)
lossGradient
in interface LossFunction
dataPoint
- weightVector
- Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.