Changeset 4618:face7fa4085a in orange


Ignore:
Timestamp:
05/07/08 18:33:31 (6 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
d5aaa3032f2ca84289332a8cb8a5b593dd37c2eb
Message:
  • removed a warning about not using thresholds for non-binary classes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/bayes.cpp

    r3462 r4618  
    114114  PClassifier wclassifier(classifier); 
    115115 
    116   if (adjustThreshold) { 
    117     if (gen->domain->classVar.AS(TEnumVariable)->values->size() != 2) 
    118       raiseWarning("threshold can only be optimized for binary classes"); 
    119     else { 
    120       float optCA; 
    121       classifier->threshold = TThresholdCA()(wclassifier, gen, weight, optCA); 
    122     } 
     116  if (adjustThreshold && (gen->domain->classVar.AS(TEnumVariable)->values->size() == 2)) { 
     117    float optCA; 
     118    classifier->threshold = TThresholdCA()(wclassifier, gen, weight, optCA); 
    123119  } 
    124120 
Note: See TracChangeset for help on using the changeset viewer.