Changeset 3677:8db49e3de744 in orange


Ignore:
Timestamp:
05/21/07 14:47:11 (7 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
bf9ec51bb6275648c8174c72515061a329352d05
Message:

no message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/orngSVM.py

    r3672 r3677  
    201201        for j in range(i+1, len(classes)): 
    202202            w={} 
    203             print i,j, j-1, i 
    204203            coefInd=j-1 
    205204            for svInd in apply(range, svRanges[i]): 
     
    214213            weights.append(w) 
    215214    return weights 
    216          
     215 
     216def exampleWeightedSum(example, weights): 
     217    sum=0 
     218    for attr, w in weights.items(): 
     219        sum+=float(example[attr])*w 
     220    return sum 
     221 
    217222import math 
    218223class KernelWrapper: 
Note: See TracChangeset for help on using the changeset viewer.