Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/7952#discussion_r36355056
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/regression/IsotonicRegression.scala ---
@@ -123,22 +180,49 @@ class IsotonicRegression(override val uid: String)
*
* For detailed rules see
[[org.apache.spark.mllib.regression.IsotonicRegressionModel.predict()]].
*
- * @param parentModel A
[[org.apache.spark.mllib.regression.IsotonicRegressionModel]]
- * model trained by
[[org.apache.spark.mllib.regression.IsotonicRegression]].
+ * @param oldModel A
[[org.apache.spark.mllib.regression.IsotonicRegressionModel]]
+ * model trained by
[[org.apache.spark.mllib.regression.IsotonicRegression]].
*/
+@Experimental
class IsotonicRegressionModel private[ml] (
override val uid: String,
- private[ml] val parentModel: MLlibIsotonicRegressionModel)
- extends RegressionModel[Double, IsotonicRegressionModel]
- with IsotonicRegressionParams {
+ private val oldModel: MLlibIsotonicRegressionModel)
+ extends Model[IsotonicRegressionModel] with IsotonicRegressionBase {
- override def featuresDataType: DataType = DoubleType
+ /** @group setParam */
+ def setFeaturesCol(value: String): this.type = set(featuresCol, value)
- override protected def predict(features: Double): Double = {
- parentModel.predict(features)
- }
+ /** @group setParam */
+ def setPredictionCol(value: String): this.type = set(predictionCol,
value)
+
+ /** @group setParam */
+ def setFeatureIndex(value: Int): this.type = set(featureIndex, value)
+
+ /** Boundaries in increasing order for which predictions are known. */
+ def boundaries: Vector = Vectors.dense(oldModel.boundaries)
+
+ /**
+ * Predictions associated to the boundaries at the same index, monotone
because of isotonic
--- End diff --
"associated to" --> "associated with"
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]