flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2297) Add threshold setting for SVM binary predictions
Date Wed, 01 Jul 2015 08:45:04 GMT

    [ https://issues.apache.org/jira/browse/FLINK-2297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14609753#comment-14609753
] 

ASF GitHub Bot commented on FLINK-2297:
---------------------------------------

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

    https://github.com/apache/flink/pull/874#discussion_r33658953
  
    --- Diff: flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/classification/SVM.scala
---
    @@ -187,6 +196,26 @@ class SVM extends Predictor[SVM] {
         parameters.add(Seed, seed)
         this
       }
    +
    +  /** Sets the threshold above which elements are classified as positive
    +    *
    +    * @param threshold
    +    * @return
    +    */
    +  def setThreshold(threshold: Double): SVM = {
    +    parameters.add(Threshold, threshold)
    +    this
    +  }
    +
    +  /** Clears the classification threshold, predictions made after calling this function
will have
    +    * the raw decision function value.
    +    *
    +    * @return
    +    */
    +  def clearThreshold(): SVM = {
    +    parameters.add(Threshold, Option.empty[Double])
    --- End diff --
    
    It would be better if we have a `parameters.clear(Threshold)` method here.


> Add threshold setting for SVM binary predictions
> ------------------------------------------------
>
>                 Key: FLINK-2297
>                 URL: https://issues.apache.org/jira/browse/FLINK-2297
>             Project: Flink
>          Issue Type: Improvement
>          Components: Machine Learning Library
>            Reporter: Theodore Vasiloudis
>            Assignee: Theodore Vasiloudis
>            Priority: Minor
>              Labels: ML
>             Fix For: 0.10
>
>
> Currently SVM outputs the raw decision function values when using the predict function.
> We should have instead the ability to set a threshold above which examples are labeled
as positive (1.0) and below negative (-1.0). Then the prediction function can be directly
used for evaluation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message