|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectorg.apache.spark.mllib.regression.GeneralizedLinearModel
public abstract class GeneralizedLinearModel
:: DeveloperApi :: 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.
| Constructor Summary | |
|---|---|
GeneralizedLinearModel(Vector weights,
double intercept)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GeneralizedLinearModel(Vector weights,
double intercept)
| Method Detail |
|---|
public Vector weights()
public double intercept()
public RDD<Object> predict(RDD<Vector> testData)
testData - RDD representing data points to be predicted
public double predict(Vector testData)
testData - array representing a single data point
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||