Changeset 3697:99182f2b4fea in orange


Ignore:
Timestamp:
05/27/07 18:49:48 (7 years ago)
Author:
Gregor <Gregor@…>
Branch:
default
Convert:
9105784daeefeeb26ba180c756af32f0ad3ac109
Message:

getLookupTableIndex

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/orngCI.py

    r3526 r3697  
    301301    return newVar, meas 
    302302 
     303  def getLookupTableIndex(self, valArray): 
     304    if len(valArray) == 1: 
     305      return valArray[0] 
     306    elif len(valArray) == 2: 
     307      return clsfr.noOfValues1 * valArray[0] + valArray[1] 
     308    elif len(valArray) == 3: 
     309      return ((clsfr.noOfValues1 * valArray[0]) + valArray[1]) * clsfr.noOfValues2 + valArray[2] 
     310    elif len(valArray) > 3: 
     311      tmp = 0 
     312      for i in range(len(clsfr.noOfValues)-1): 
     313        tmp = (tmp + valArray[i]) * clsfr.noOfValues[i] 
     314      return tmp + valArray[-1] 
    303315 
    304316###################################################### 
Note: See TracChangeset for help on using the changeset viewer.