Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7952#discussion_r36355045
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/regression/IsotonicRegression.scala ---
    @@ -17,44 +17,106 @@
     
     package org.apache.spark.ml.regression
     
    +import org.apache.spark.Logging
     import org.apache.spark.annotation.Experimental
    -import org.apache.spark.ml.PredictorParams
    -import org.apache.spark.ml.param.{Param, ParamMap, BooleanParam}
    -import org.apache.spark.ml.util.{SchemaUtils, Identifiable}
    -import org.apache.spark.mllib.regression.{IsotonicRegression => 
MLlibIsotonicRegression}
    -import org.apache.spark.mllib.regression.{IsotonicRegressionModel => 
MLlibIsotonicRegressionModel}
    +import org.apache.spark.ml.{Estimator, Model}
    +import org.apache.spark.ml.param._
    +import org.apache.spark.ml.param.shared.{HasFeaturesCol, HasLabelCol, 
HasPredictionCol}
    +import org.apache.spark.ml.util.{Identifiable, SchemaUtils}
    +import org.apache.spark.mllib.linalg.{Vector, VectorUDT, Vectors}
    +import org.apache.spark.mllib.regression.{IsotonicRegression => 
MLlibIsotonicRegression, IsotonicRegressionModel => 
MLlibIsotonicRegressionModel}
     import org.apache.spark.rdd.RDD
    -import org.apache.spark.sql.types.{DoubleType, DataType}
    -import org.apache.spark.sql.{Row, DataFrame}
    +import org.apache.spark.sql.{DataFrame, Row}
    +import org.apache.spark.sql.functions.{col, lit, udf}
    +import org.apache.spark.sql.types.{DoubleType, StructType}
     import org.apache.spark.storage.StorageLevel
     
     /**
      * Params for isotonic regression.
      */
    -private[regression] trait IsotonicRegressionParams extends PredictorParams 
{
    +private[regression] trait IsotonicRegressionBase extends Params with 
HasFeaturesCol
    +  with HasLabelCol with HasPredictionCol with Logging {
     
       /**
        * Param for weight column name.
    -   * TODO: Move weightCol to sharedParams.
    -   *
        * @group param
        */
    +  // TODO: Move weightCol to sharedParams.
       final val weightCol: Param[String] =
    -    new Param[String](this, "weightCol", "weight column name")
    +    new Param[String](this, "weightCol",
    +      "weight column name. If this is not set or empty, we treat all 
weights as 1.0.")
     
       /** @group getParam */
       final def getWeightCol: String = $(weightCol)
     
       /**
    -   * Param for isotonic parameter.
    -   * Isotonic (increasing) or antitonic (decreasing) sequence.
    +   * Param for whether the output should be isotonic (increasing) or 
antitonic (decreasing).
        * @group param
        */
       final val isotonic: BooleanParam =
         new BooleanParam(this, "isotonic", "isotonic (increasing) or antitonic 
(decreasing) sequence")
    --- End diff --
    
    Currently, the built-in doc does not make it clear which option "true" 
corresponds to.  Clarify:
    ```
    whether the output sequence should be isotonic/increasing (true) or 
antitonic/decreasing (false)
    ```


---
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]

Reply via email to