You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by thunterdb <gi...@git.apache.org> on 2017/03/07 23:58:10 UTC

[GitHub] spark pull request #13440: [SPARK-15699] [ML] Implement a Chi-Squared test s...

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

    https://github.com/apache/spark/pull/13440#discussion_r104812468
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/tree/impurity/Impurity.scala ---
    @@ -50,6 +50,50 @@ trait Impurity extends Serializable {
       @Since("1.0.0")
       @DeveloperApi
       def calculate(count: Double, sum: Double, sumSquares: Double): Double
    +
    +  /**
    +   * :: DeveloperApi ::
    +   * Compute a test-statistic p-value quality measure from left and right split populations
    +   * @param calcL impurity calculator for the left split population
    +   * @param calcR impurity calculator for the right split population
    +   * @return The p-value for the null hypothesis; that left and right split populations
    +   * represent the same distribution
    +   * @note Unless overridden this method will fail with an exception, for backward compatability
    +   */
    +  @Since("2.0.0")
    +  @DeveloperApi
    +  def calculate(calcL: ImpurityCalculator, calcR: ImpurityCalculator): Double =
    --- End diff --
    
    scala: do not add a default implementation, it causes issues with java compatibility


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