Class GeneralizedLinearModel
Object
org.apache.spark.mllib.regression.GeneralizedLinearModel
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- LassoModel,- LinearRegressionModel,- LogisticRegressionModel,- RidgeRegressionModel,- SVMModel
GeneralizedLinearModel (GLM) represents a model trained using
 GeneralizedLinearAlgorithm. GLMs consist of a weight vector and
 an intercept.
 
param: weights Weights computed for every feature. param: intercept Intercept computed for this model.
- See Also:
- 
Constructor Details- 
GeneralizedLinearModel
 
- 
- 
Method Details- 
interceptpublic double intercept()
- 
predictPredict values for the given data set using the model trained.- Parameters:
- testData- RDD representing data points to be predicted
- Returns:
- RDD[Double] where each entry contains the corresponding prediction
 
- 
predictPredict values for a single data point using the model trained.- Parameters:
- testData- array representing a single data point
- Returns:
- Double prediction from the trained model
 
- 
toStringPrint a summary of the model.
- 
weights
 
-