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

    https://github.com/apache/spark/pull/5820#discussion_r29563744
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/Evaluator.scala ---
    @@ -36,5 +35,18 @@ abstract class Evaluator extends Identifiable {
        * @param paramMap parameter map that specifies the input columns and 
output metrics
        * @return metric
        */
    -  def evaluate(dataset: DataFrame, paramMap: ParamMap): Double
    +  def evaluate(dataset: DataFrame, paramMap: ParamMap): Double = {
    +    this.copy(paramMap).evaluate(dataset)
    +  }
    +
    --- End diff --
    
    One question. Why `Evaluator` returns type `Double`? For example, confusion 
matrix can be an evaluator as well, and it can not be represented by type 
`Double`. Also, in our use-case, we often evaluate the models by the histogram 
of recommended popular titles, so it will be `Array[Long]`. Why don't we have 
type `T` here, and we specify the type in the implementation? 


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