Ignore:
Timestamp:
02/06/12 13:52:55 (2 years ago)
Author:
markotoplak
Branch:
default
Children:
9725:6c16952df555, 9752:cbd6f6f10f06
rebase_source:
be8730bf9f2e7e771332dfc8b3876c8a62826bd1
Message:

Renames in Orange.distance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/svm-custom-kernel.py

    r9663 r9724  
    33 
    44from Orange.classification.svm import SVMLearner, kernels 
    5 from Orange.distance import EuclideanConstructor 
    6 from Orange.distance import HammingConstructor 
     5from Orange.distance import Euclidean 
     6from Orange.distance import Hamming 
    77 
    88table = data.Table("iris.tab") 
    99l1 = SVMLearner() 
    10 l1.kernel_func = kernels.RBFKernelWrapper(EuclideanConstructor(table), gamma=0.5) 
     10l1.kernel_func = kernels.RBFKernelWrapper(Euclidean(table), gamma=0.5) 
    1111l1.kernel_type = SVMLearner.Custom 
    1212l1.probability = True 
     
    1515 
    1616l2 = SVMLearner() 
    17 l2.kernel_func = kernels.RBFKernelWrapper(HammingConstructor(table), gamma=0.5) 
     17l2.kernel_func = kernels.RBFKernelWrapper(Hamming(table), gamma=0.5) 
    1818l2.kernel_type = SVMLearner.Custom 
    1919l2.probability = True 
     
    2323l3 = SVMLearner() 
    2424l3.kernel_func = kernels.CompositeKernelWrapper( 
    25     kernels.RBFKernelWrapper(EuclideanConstructor(table), gamma=0.5), 
    26     kernels.RBFKernelWrapper(HammingConstructor(table), gamma=0.5), l=0.5) 
     25    kernels.RBFKernelWrapper(Euclidean(table), gamma=0.5), 
     26    kernels.RBFKernelWrapper(Hamming(table), gamma=0.5), l=0.5) 
    2727l3.kernel_type = SVMLearner.Custom 
    2828l3.probability = True 
Note: See TracChangeset for help on using the changeset viewer.