public abstract class GeneralizedLinearAlgorithm<M extends GeneralizedLinearModel>
extends Object
implements 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.
|
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)