public abstract class GeneralizedLinearAlgorithm<M extends GeneralizedLinearModel>
extends Object
implements org.apache.spark.internal.Logging, scala.Serializable
Constructor and Description |
---|
GeneralizedLinearAlgorithm() |
Modifier and Type | Method and Description |
---|---|
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.
|
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 int getNumFeatures()
public boolean isAddIntercept()
public abstract Optimizer optimizer()
public M run(RDD<LabeledPoint> input)
input
- (undocumented)public M run(RDD<LabeledPoint> input, Vector initialWeights)
input
- (undocumented)initialWeights
- (undocumented)public GeneralizedLinearAlgorithm<M> setIntercept(boolean addIntercept)
addIntercept
- (undocumented)public GeneralizedLinearAlgorithm<M> setValidateData(boolean validateData)
validateData
- (undocumented)