org.apache.spark.mllib.regression
IsotonicRegressionModel
Companion object IsotonicRegressionModel
class IsotonicRegressionModel extends Serializable with Saveable
Regression model for isotonic regression.
- Annotations
- @Since( "1.3.0" )
- Alphabetic
- By Inheritance
- IsotonicRegressionModel
- Saveable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
IsotonicRegressionModel(boundaries: Iterable[Double], predictions: Iterable[Double], isotonic: Boolean)
A Java-friendly constructor that takes two Iterable parameters and one Boolean parameter.
A Java-friendly constructor that takes two Iterable parameters and one Boolean parameter.
- Annotations
- @Since( "1.4.0" )
-
new
IsotonicRegressionModel(boundaries: Array[Double], predictions: Array[Double], isotonic: Boolean)
- boundaries
Array of boundaries for which predictions are known. Boundaries must be sorted in increasing order.
- predictions
Array of predictions associated to the boundaries at the same index. Results of isotonic regression and therefore monotone.
- isotonic
indicates whether this is isotonic or antitonic.
- Annotations
- @Since( "1.3.0" )
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
boundaries: Array[Double]
- Annotations
- @Since( "1.3.0" )
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
isotonic: Boolean
- Annotations
- @Since( "1.3.0" )
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
predict(testData: Double): Double
Predict a single label.
Predict a single label. Using a piecewise linear function.
- testData
Feature to be labeled.
- returns
Predicted label. 1) If testData exactly matches a boundary then associated prediction is returned. In case there are multiple predictions with the same boundary then one of them is returned. Which one is undefined (same as java.util.Arrays.binarySearch). 2) If testData is lower or higher than all boundaries then first or last prediction is returned respectively. In case there are multiple predictions with the same boundary then the lowest or highest is returned respectively. 3) If testData falls between two values in boundary array then prediction is treated as piecewise linear function and interpolated value is returned. In case there are multiple values with the same boundary then the same rules as in 2) are used.
- Annotations
- @Since( "1.3.0" )
-
def
predict(testData: JavaDoubleRDD): JavaDoubleRDD
Predict labels for provided features.
Predict labels for provided features. Using a piecewise linear function.
- testData
Features to be labeled.
- returns
Predicted labels.
- Annotations
- @Since( "1.3.0" )
-
def
predict(testData: RDD[Double]): RDD[Double]
Predict labels for provided features.
Predict labels for provided features. Using a piecewise linear function.
- testData
Features to be labeled.
- returns
Predicted labels.
- Annotations
- @Since( "1.3.0" )
-
val
predictions: Array[Double]
- Annotations
- @Since( "1.3.0" )
-
def
save(sc: SparkContext, path: String): Unit
Save this model to the given path.
Save this model to the given path.
This saves:
- human-readable (JSON) model metadata to path/metadata/
- Parquet formatted data to path/data/
The model may be loaded using
Loader.load
.- 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.
- Definition Classes
- IsotonicRegressionModel → Saveable
- Annotations
- @Since( "1.4.0" )
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()