org.apache.spark.mllib.classification
Class LogisticRegressionWithLBFGS
Object
org.apache.spark.mllib.regression.GeneralizedLinearAlgorithm<LogisticRegressionModel>
org.apache.spark.mllib.classification.LogisticRegressionWithLBFGS
- All Implemented Interfaces:
- java.io.Serializable, Logging
public class LogisticRegressionWithLBFGS
- extends GeneralizedLinearAlgorithm<LogisticRegressionModel>
- implements scala.Serializable
Train a classification model for Multinomial/Binary Logistic Regression using
Limited-memory BFGS. Standard feature scaling and L2 regularization are used by default.
NOTE: Labels used in Logistic Regression should be {0, 1, ..., k - 1}
for k classes multi-label classification problem.
- See Also:
- Serialized Form
Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.spark.Logging |
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning |
LogisticRegressionWithLBFGS
public LogisticRegressionWithLBFGS()
optimizer
public LBFGS optimizer()
- Description copied from class:
GeneralizedLinearAlgorithm
- The optimizer to solve the problem.
- Specified by:
optimizer
in class GeneralizedLinearAlgorithm<LogisticRegressionModel>
setNumClasses
public LogisticRegressionWithLBFGS setNumClasses(int numClasses)
- :: Experimental ::
Set the number of possible outcomes for k classes classification problem in
Multinomial Logistic Regression.
By default, it is binary logistic regression so k will be set to 2.
- Parameters:
numClasses
- (undocumented)
- Returns:
- (undocumented)