|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.apache.spark.mllib.regression.GeneralizedLinearAlgorithm<M>
public abstract class GeneralizedLinearAlgorithm<M extends GeneralizedLinearModel>
:: DeveloperApi :: GeneralizedLinearAlgorithm implements methods to train a Generalized Linear Model (GLM). This class should be extended with an Optimizer to create a new GLM.
Constructor Summary | |
---|---|
GeneralizedLinearAlgorithm()
|
Method Summary | |
---|---|
int |
getNumFeatures()
The dimension of training features. |
boolean |
isAddIntercept()
Get if the algorithm uses addIntercept |
abstract Optimizer |
optimizer()
The optimizer to solve the problem. |
M |
run(RDD<LabeledPoint> input)
Run the algorithm with the configured parameters on an input RDD of LabeledPoint entries. |
M |
run(RDD<LabeledPoint> input,
Vector initialWeights)
Run the algorithm with the configured parameters on an input RDD of LabeledPoint entries starting from the initial weights provided. |
GeneralizedLinearAlgorithm<M> |
setIntercept(boolean addIntercept)
Set if the algorithm should add an intercept. |
GeneralizedLinearAlgorithm<M> |
setValidateData(boolean validateData)
Set if the algorithm should validate data before training. |
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 |
---|
public GeneralizedLinearAlgorithm()
Method Detail |
---|
public abstract Optimizer optimizer()
public int getNumFeatures()
public boolean isAddIntercept()
public GeneralizedLinearAlgorithm<M> setIntercept(boolean addIntercept)
addIntercept
- (undocumented)
public GeneralizedLinearAlgorithm<M> setValidateData(boolean validateData)
validateData
- (undocumented)
public M run(RDD<LabeledPoint> input)
input
- (undocumented)
public M run(RDD<LabeledPoint> input, Vector initialWeights)
input
- (undocumented)initialWeights
- (undocumented)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |