Changeset 9143:76d3d7679efd in orange


Ignore:
Timestamp:
10/29/11 19:18:30 (2 years ago)
Author:
mocnik <mocnik@…>
Branch:
default
Convert:
1664ba779a290ec1d4e776494bebb8bdaeba30fe
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/evaluation/reliability.py

    r9131 r9143  
    492492         
    493493        # Calculate the bagging variance 
    494         bagged_values = [c(example, Orange.core.GetValue).value for c in self.classifiers] 
     494        bagged_values = [c(example, Orange.core.GetValue).value for c in self.classifiers if c is not None] 
    495495         
    496496        k = sum(bagged_values) / len(bagged_values) 
     
    570570         
    571571        LCV = LCVer / LCVdi if LCVdi != 0 else 0 
    572          
     572        if math.isnan(LCV): 
     573            LCV = 0.0 
    573574        return [ Estimate(LCV, ABSOLUTE, LCV_ABSOLUTE) ] 
    574575 
     
    682683        new_examples = examples.translate(new_domain) 
    683684         
    684         X, _, _ = examples.to_numpy() 
     685        X, _, _ = new_examples.to_numpy() 
    685686        example_avg = numpy.average(X, 0) 
    686687         
Note: See TracChangeset for help on using the changeset viewer.