|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.apache.spark.mllib.regression.IsotonicRegressionModel
public class IsotonicRegressionModel
:: Experimental ::
Regression model for isotonic regression.
param: boundaries Array of boundaries for which predictions are known. Boundaries must be sorted in increasing order. param: predictions Array of predictions associated to the boundaries at the same index. Results of isotonic regression and therefore monotone. param: isotonic indicates whether this is isotonic or antitonic.
Constructor Summary | |
---|---|
IsotonicRegressionModel(double[] boundaries,
double[] predictions,
boolean isotonic)
|
|
IsotonicRegressionModel(Iterable<Object> boundaries,
Iterable<Object> predictions,
Boolean isotonic)
A Java-friendly constructor that takes two Iterable parameters and one Boolean parameter. |
Method Summary | |
---|---|
double[] |
boundaries()
|
boolean |
isotonic()
|
static IsotonicRegressionModel |
load(SparkContext sc,
String path)
|
double |
predict(double testData)
Predict a single label. |
JavaDoubleRDD |
predict(JavaDoubleRDD testData)
Predict labels for provided features. |
RDD<Object> |
predict(RDD<Object> testData)
Predict labels for provided features. |
double[] |
predictions()
|
void |
save(SparkContext sc,
String path)
Save this model to the given path. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IsotonicRegressionModel(double[] boundaries, double[] predictions, boolean isotonic)
public IsotonicRegressionModel(Iterable<Object> boundaries, Iterable<Object> predictions, Boolean isotonic)
Method Detail |
---|
public static IsotonicRegressionModel load(SparkContext sc, String path)
public double[] boundaries()
public double[] predictions()
public boolean isotonic()
public RDD<Object> predict(RDD<Object> testData)
testData
- Features to be labeled.
public JavaDoubleRDD predict(JavaDoubleRDD testData)
testData
- Features to be labeled.
public double predict(double testData)
testData
- Feature to be labeled.
public void save(SparkContext sc, String path)
Saveable
This saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/
The model may be loaded using Loader.load
.
save
in interface Saveable
sc
- Spark context used to save model data.path
- Path specifying the directory in which to save this model.
If the directory already exists, this method throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |