org.apache.mahout.classifier.sgd
Class OnlineLogisticRegression
java.lang.Object
org.apache.mahout.classifier.AbstractVectorClassifier
org.apache.mahout.classifier.sgd.AbstractOnlineLogisticRegression
org.apache.mahout.classifier.sgd.OnlineLogisticRegression
- All Implemented Interfaces:
- Closeable, org.apache.hadoop.io.Writable, OnlineLearner
public class OnlineLogisticRegression
- extends AbstractOnlineLogisticRegression
- implements org.apache.hadoop.io.Writable
Extends the basic on-line logistic regression learner with a specific set of learning
rate annealing schedules.
Methods inherited from class org.apache.mahout.classifier.sgd.AbstractOnlineLogisticRegression |
classify, classifyNoLink, classifyScalar, classifyScalarNoLink, close, copyFrom, getBeta, getLambda, getPrior, getStep, isSealed, link, link, nextStep, numCategories, numFeatures, regularize, setBeta, setGradient, setPrior, train, train, train, unseal, validModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WRITABLE_VERSION
public static final int WRITABLE_VERSION
- See Also:
- Constant Field Values
OnlineLogisticRegression
public OnlineLogisticRegression()
OnlineLogisticRegression
public OnlineLogisticRegression(int numCategories,
int numFeatures,
PriorFunction prior)
alpha
public OnlineLogisticRegression alpha(double alpha)
- Chainable configuration option.
- Parameters:
alpha
- New value of decayFactor, the exponential decay rate for the learning rate.
- Returns:
- This, so other configurations can be chained.
lambda
public OnlineLogisticRegression lambda(double lambda)
- Description copied from class:
AbstractOnlineLogisticRegression
- Chainable configuration option.
- Overrides:
lambda
in class AbstractOnlineLogisticRegression
- Parameters:
lambda
- New value of lambda, the weighting factor for the prior distribution.
- Returns:
- This, so other configurations can be chained.
learningRate
public OnlineLogisticRegression learningRate(double learningRate)
- Chainable configuration option.
- Parameters:
learningRate
- New value of initial learning rate.
- Returns:
- This, so other configurations can be chained.
stepOffset
public OnlineLogisticRegression stepOffset(int stepOffset)
decayExponent
public OnlineLogisticRegression decayExponent(double decayExponent)
perTermLearningRate
public double perTermLearningRate(int j)
- Specified by:
perTermLearningRate
in class AbstractOnlineLogisticRegression
currentLearningRate
public double currentLearningRate()
- Specified by:
currentLearningRate
in class AbstractOnlineLogisticRegression
copyFrom
public void copyFrom(OnlineLogisticRegression other)
copy
public OnlineLogisticRegression copy()
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 in)
throws IOException
- Specified by:
readFields
in interface org.apache.hadoop.io.Writable
- Throws:
IOException
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.