Changeset 3583:25ccebacd27b in orange


Ignore:
Timestamp:
04/24/07 23:19:56 (7 years ago)
Author:
janezd <janez.demsar@…>
Branch:
default
Convert:
2961b2c3fa52570df91bf8b5dabdac686c7ffb00
Message:
  • fixed a problem with chi-square of an attribute measured on a single example
File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/measures.cpp

    r3284 r3583  
    803803      df_in += 1.0; 
    804804 
    805   if (df_in == 0.0) 
    806     return 0.0; 
     805  if (df_in <= 0.0) 
     806    return computeProbabilities ? 1.0 : 0.0; 
    807807 
    808808  float chisq = 0.0; 
     
    823823  } 
    824824 
    825   if (df_out == 0.0) 
    826     return 0.0; 
     825  if (df_out <= 0.0) 
     826    return computeProbabilities ? 1.0 : 0.0; 
    827827 
    828828  return computeProbabilities ? chisqprob(chisq, df_in * df_out) : chisq; 
Note: See TracChangeset for help on using the changeset viewer.