org.apache.mahout.classifier.sgd
Class AdaptiveLogisticRegression.Wrapper

java.lang.Object
  extended by org.apache.mahout.classifier.sgd.AdaptiveLogisticRegression.Wrapper
All Implemented Interfaces:
org.apache.hadoop.io.Writable, Payload<CrossFoldLearner>
Enclosing class:
AdaptiveLogisticRegression

public static class AdaptiveLogisticRegression.Wrapper
extends Object
implements Payload<CrossFoldLearner>

Provides a shim between the EP optimization stuff and the CrossFoldLearner. The most important interface has to do with the parameters of the optimization. These are taken from the double[] params in the following order

. All other parameters are set in such a way so as to defeat annealing to the extent possible. This lets the evolutionary algorithm handle the annealing.

Note that per coefficient annealing is still done and no optimization of the per coefficient offset is done.


Constructor Summary
AdaptiveLogisticRegression.Wrapper()
           
AdaptiveLogisticRegression.Wrapper(int numCategories, int numFeatures, PriorFunction prior)
           
 
Method Summary
 AdaptiveLogisticRegression.Wrapper copy()
           
static void freeze(State<AdaptiveLogisticRegression.Wrapper,CrossFoldLearner> s)
           
 CrossFoldLearner getLearner()
           
 void readFields(DataInput input)
           
 void setAucEvaluator(OnlineAuc auc)
           
static void setMappings(State<AdaptiveLogisticRegression.Wrapper,CrossFoldLearner> x)
           
 String toString()
           
 void train(AdaptiveLogisticRegression.TrainingExample example)
           
 void update(double[] params)
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdaptiveLogisticRegression.Wrapper

public AdaptiveLogisticRegression.Wrapper()

AdaptiveLogisticRegression.Wrapper

public AdaptiveLogisticRegression.Wrapper(int numCategories,
                                          int numFeatures,
                                          PriorFunction prior)
Method Detail

copy

public AdaptiveLogisticRegression.Wrapper copy()
Specified by:
copy in interface Payload<CrossFoldLearner>

update

public void update(double[] params)
Specified by:
update in interface Payload<CrossFoldLearner>

freeze

public static void freeze(State<AdaptiveLogisticRegression.Wrapper,CrossFoldLearner> s)

setMappings

public static void setMappings(State<AdaptiveLogisticRegression.Wrapper,CrossFoldLearner> x)

train

public void train(AdaptiveLogisticRegression.TrainingExample example)

getLearner

public CrossFoldLearner getLearner()

toString

public String toString()
Overrides:
toString in class Object

setAucEvaluator

public void setAucEvaluator(OnlineAuc auc)

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput input)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.