org.apache.mahout.classifier.sgd
Class AdaptiveLogisticRegression.Wrapper
java.lang.Object
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
- regularization constant lambda
- learningRate
.
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.
AdaptiveLogisticRegression.Wrapper
public AdaptiveLogisticRegression.Wrapper()
AdaptiveLogisticRegression.Wrapper
public AdaptiveLogisticRegression.Wrapper(int numCategories,
int numFeatures,
PriorFunction prior)
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.