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
- 
intercept
public double intercept() - 
predict
Predict 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
 
 - 
predict
Predict 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
 
 - 
toString
Print a summary of the model. - 
weights
 
 -