public final class OnlineLDAOptimizer extends Object implements LDAOptimizer, org.apache.spark.internal.Logging
Original Online LDA paper: Hoffman, Blei and Bach, "Online Learning for Latent Dirichlet Allocation." NIPS, 2010.
Constructor and Description |
---|
OnlineLDAOptimizer() |
Modifier and Type | Method and Description |
---|---|
double |
getKappa()
Learning rate: exponential decay rate
|
double |
getMiniBatchFraction()
Mini-batch fraction, which sets the fraction of document sampled and used in each iteration
|
boolean |
getOptimizeDocConcentration()
Optimize docConcentration, indicates whether docConcentration (Dirichlet parameter for
document-topic distribution) will be optimized during training.
|
double |
getTau0()
A (positive) learning parameter that downweights early iterations.
|
OnlineLDAOptimizer |
setKappa(double kappa)
Learning rate: exponential decay rate---should be between
(0.5, 1.0] to guarantee asymptotic convergence.
|
OnlineLDAOptimizer |
setMiniBatchFraction(double miniBatchFraction)
Mini-batch fraction in (0, 1], which sets the fraction of document sampled and used in
each iteration.
|
OnlineLDAOptimizer |
setOptimizeDocConcentration(boolean optimizeDocConcentration)
Sets whether to optimize docConcentration parameter during training.
|
OnlineLDAOptimizer |
setTau0(double tau0)
A (positive) learning parameter that downweights early iterations.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize
public double getTau0()
public OnlineLDAOptimizer setTau0(double tau0)
tau0
- (undocumented)public double getKappa()
public OnlineLDAOptimizer setKappa(double kappa)
kappa
- (undocumented)public double getMiniBatchFraction()
public OnlineLDAOptimizer setMiniBatchFraction(double miniBatchFraction)
miniBatchFraction
- (undocumented)LDA.setMaxIterations()
so the entire corpus is used. Specifically, set both so that
maxIterations * miniBatchFraction is at least 1.
Default: 0.05, i.e., 5% of total documents.
public boolean getOptimizeDocConcentration()
public OnlineLDAOptimizer setOptimizeDocConcentration(boolean optimizeDocConcentration)
Default: false
optimizeDocConcentration
- (undocumented)