public class IsotonicRegressionModel extends Object implements java.io.Serializable, Saveable
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 and Description | 
|---|
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. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
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. 
 | 
public IsotonicRegressionModel(double[] boundaries,
                               double[] predictions,
                               boolean isotonic)
public IsotonicRegressionModel(Iterable<Object> boundaries,
                               Iterable<Object> predictions,
                               Boolean isotonic)
boundaries - (undocumented)predictions - (undocumented)isotonic - (undocumented)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)
SaveableThis saves: - human-readable (JSON) model metadata to path/metadata/ - Parquet formatted data to path/data/
 The model may be loaded using Loader.load.