public abstract class GeneralizedLinearModel
extends Object
implements scala.Serializable
param: weights Weights computed for every feature. param: intercept Intercept computed for this model.
Constructor and Description |
---|
GeneralizedLinearModel(Vector weights,
double intercept) |
Modifier and Type | Method and Description |
---|---|
double |
intercept() |
RDD<Object> |
predict(RDD<Vector> testData)
Predict values for the given data set using the model trained.
|
double |
predict(Vector testData)
Predict values for a single data point using the model trained.
|
String |
toString()
Print a summary of the model.
|
Vector |
weights() |
public GeneralizedLinearModel(Vector weights, double intercept)
public double intercept()
public RDD<Object> predict(RDD<Vector> testData)
testData
- RDD representing data points to be predictedpublic double predict(Vector testData)
testData
- array representing a single data pointpublic String toString()
toString
in class Object
public Vector weights()