org.apache.mahout.classifier.sgd
Class RankingGradient
java.lang.Object
org.apache.mahout.classifier.sgd.RankingGradient
- All Implemented Interfaces:
- Gradient
public class RankingGradient
- extends Object
- implements Gradient
Uses the difference between this instance and recent history to get a
gradient that optimizes ranking performance. Essentially this is the
same as directly optimizing AUC. It isn't expected that this would
be used alone, but rather that a MixedGradient would use it and a
DefaultGradient together to combine both ranking and log-likelihood
goals.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RankingGradient
public RankingGradient(int window)
apply
public final Vector apply(String groupKey,
int actual,
Vector instance,
AbstractVectorClassifier classifier)
- Specified by:
apply
in interface Gradient
addToHistory
public void addToHistory(int actual,
Vector instance)
getBaseGradient
public Gradient getBaseGradient()
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.