public abstract class GeneralizedLinearModel
extends Object
implements scala.Serializable
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.
|
Vector |
weights() |
public GeneralizedLinearModel(Vector weights, double intercept)
public Vector weights()
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 point