org.apache.spark.mllib.classification
Class LogisticRegressionWithLBFGS

Object
  extended by org.apache.spark.mllib.regression.GeneralizedLinearAlgorithm<LogisticRegressionModel>
      extended by 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

Constructor Summary
LogisticRegressionWithLBFGS()
           
 
Method Summary
 LBFGS optimizer()
          The optimizer to solve the problem.
 LogisticRegressionWithLBFGS setNumClasses(int numClasses)
          :: Experimental :: Set the number of possible outcomes for k classes classification problem in Multinomial Logistic Regression.
 
Methods inherited from class org.apache.spark.mllib.regression.GeneralizedLinearAlgorithm
getNumFeatures, isAddIntercept, run, run, setIntercept, setValidateData
 
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
 

Constructor Detail

LogisticRegressionWithLBFGS

public LogisticRegressionWithLBFGS()
Method Detail

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)