flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thvasilo <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2157] [ml] [WIP] Create evaluation fram...
Date Wed, 08 Jul 2015 16:34:34 GMT
Github user thvasilo commented on a diff in the pull request:

    https://github.com/apache/flink/pull/871#discussion_r34168710
  
    --- Diff: flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/pipeline/Predictor.scala
---
    @@ -72,12 +74,36 @@ trait Predictor[Self] extends Estimator[Self] with WithParameters
{
         */
       def evaluate[Testing, PredictionValue](
           testing: DataSet[Testing],
    -      evaluateParameters: ParameterMap = ParameterMap.Empty)(implicit
    -      evaluator: EvaluateDataSetOperation[Self, Testing, PredictionValue])
    +      evaluateParameters: ParameterMap = ParameterMap.Empty)
    +      (implicit evaluator: EvaluateDataSetOperation[Self, Testing, PredictionValue])
         : DataSet[(PredictionValue, PredictionValue)] = {
         FlinkMLTools.registerFlinkMLTypes(testing.getExecutionEnvironment)
         evaluator.evaluateDataSet(this, evaluateParameters, testing)
       }
    +
    +  /** Calculates a numerical score for the [[Predictor]]
    +    *
    +    * By convention, higher scores are considered better, so even if a loss is used as
a performance
    +    * measure, it will be negated, so that that higher is better.
    +    * @param testing The evaluation DataSet, that contains the features and the true
value
    +    * @param evaluateOperation An EvaluateDataSetOperation that produces Double results
    +    * @tparam Testing The type of the features and true value, for example [[LabeledVector]]
    +    * @return A DataSet containing one Double that indicates the score of the predictor
    +    */
    +  def score[Testing](testing: DataSet[Testing])
    --- End diff --
    
    Then I would vote for generalizing, since having the `Predictor` only is very limiting,
we plan to have ANNs which might predict `Vector`s or multi-label class which do the same.
    
    So here's what I suggest: I remove the score function from this PR and open a new one
(hopefully by Friday) with a `ScoreOperation`


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

Mime
View raw message