spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MLnick <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-13600] [MLlib] Use approxQuantile from ...
Date Mon, 14 Mar 2016 07:44:50 GMT
Github user MLnick commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11553#discussion_r55963977
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/feature/QuantileDiscretizer.scala ---
    @@ -49,6 +49,20 @@ private[feature] trait QuantileDiscretizerBase extends Params
     
       /** @group getParam */
       def getNumBuckets: Int = getOrDefault(numBuckets)
    +
    +  /**
    +   * Relative error (see approxQuantile documentation for description).  Must be >=
0.
    +   * default: 0.01
    +   * @group param
    +   */
    +  val relativeError = new DoubleParam(this, "relativeError", "The relative target precision
" +
    +    "for approxQuantile",
    +    ParamValidators.gtEq(0.0))
    +  setDefault(relativeError -> 0.01)
    --- End diff --
    
    @oliverpierson by using `setDefault` here, `getRelativeError` will always return the default...
if we want the formula to apply, we need to remove `setDefault` (note the tests may need to
be adjusted for the new default case, and we should add tests for default param calculation
and setting the param).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message