Changeset 9486:295a82be88d1 in orange


Ignore:
Timestamp:
08/19/11 09:42:38 (3 years ago)
Author:
wencanluo <wencanluo@…>
Branch:
default
Convert:
f5c2b72b23996acc449472f45ec3edc8a04cf180
Message:

Add a warning for ConfusionMatrix, CalibrationPlot, LiftCurve methods when they are used in multi-label data

Location:
orange/OrangeWidgets/Evaluate
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/Evaluate/OWCalibrationPlot.py

    r8042 r9486  
    330330 
    331331        self.dres = dres 
    332  
     332         
     333        self.warning(0) 
     334        if self.dres and len(dres.results) > 0 and dres.results[0].multilabel_flag == 1: 
     335            text = "there is no consensus on how to apply it in multi-class problems" 
     336            self.warning(0, text) 
     337            return 
     338         
    333339        self.graphs = [] 
    334340        if self.dres <> None: 
  • orange/OrangeWidgets/Evaluate/OWConfusionMatrix.py

    r8042 r9486  
    107107            return 
    108108 
     109        self.warning(0) 
     110        if len(res.results) > 0 and res.results[0].multilabel_flag == 1: 
     111            text = "there is no consensus on how to apply it in multi-class problems" 
     112            self.warning(0, text) 
     113            return 
     114         
    109115        self.matrix = orngStat.confusionMatrices(res, -2) 
    110116 
  • orange/OrangeWidgets/Evaluate/OWLiftCurve.py

    r8042 r9486  
    343343            self.openContext("", dres) 
    344344            return 
    345  
     345         
     346        self.warning(0) 
     347        if len(dres.results) > 0 and dres.results[0].multilabel_flag == 1: 
     348            text = "there is no consensus on how to apply it in multi-class problems" 
     349            self.warning(0, text) 
     350            return 
     351         
    346352        self.defaultPerfLinePValues = [] 
    347353        if self.dres <> None: 
Note: See TracChangeset for help on using the changeset viewer.