Changeset 9889:3a754edd2092 in orange
 Timestamp:
 02/07/12 10:00:07 (2 years ago)
 Branch:
 default
 rebase_source:
 0cb1d4cdf41fbe6831998da95d3927a2d9b1260d
 Location:
 docs/reference/rst/code
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

docs/reference/rst/code/distancestest.py
r9823 r9889 5 5 6 6 # Euclidean distance constructor 7 d2Constr = Orange.distance. instances.EuclideanConstructor()7 d2Constr = Orange.distance.Euclidean() 8 8 d2 = d2Constr(iris) 9 9 10 10 # Constructs 11 dPears = Orange.distance. instances.PearsonRConstructor(iris)11 dPears = Orange.distance.PearsonR(iris) 12 12 13 13 #reference instance 
docs/reference/rst/code/outlier2.py
r9823 r9889 3 3 bridges = Orange.data.Table("bridges") 4 4 outlier_det = Orange.preprocess.outliers.OutlierDetection() 5 outlier_det.set_examples(bridges, Orange.distance. instances.EuclideanConstructor(bridges))5 outlier_det.set_examples(bridges, Orange.distance.Euclidean(bridges)) 6 6 outlier_det.set_knn(3) 7 7 z_values = outlier_det.z_values() 
docs/reference/rst/code/svmcustomkernel.py
r9823 r9889 3 3 4 4 from Orange.classification.svm import SVMLearner, kernels 5 from Orange.distance .instances import EuclideanConstructor6 from Orange.distance .instances import HammingConstructor5 from Orange.distance import Euclidean 6 from Orange.distance import Hamming 7 7 8 8 iris = data.Table("iris.tab") 9 9 l1 = SVMLearner() 10 l1.kernel_func = kernels.RBFKernelWrapper(Euclidean Constructor(iris), gamma=0.5)10 l1.kernel_func = kernels.RBFKernelWrapper(Euclidean(iris), gamma=0.5) 11 11 l1.kernel_type = SVMLearner.Custom 12 12 l1.probability = True … … 15 15 16 16 l2 = SVMLearner() 17 l2.kernel_func = kernels.RBFKernelWrapper(Hamming Constructor(iris), gamma=0.5)17 l2.kernel_func = kernels.RBFKernelWrapper(Hamming(iris), gamma=0.5) 18 18 l2.kernel_type = SVMLearner.Custom 19 19 l2.probability = True … … 23 23 l3 = SVMLearner() 24 24 l3.kernel_func = kernels.CompositeKernelWrapper( 25 kernels.RBFKernelWrapper(Euclidean Constructor(iris), gamma=0.5),26 kernels.RBFKernelWrapper(Hamming Constructor(iris), gamma=0.5), l=0.5)25 kernels.RBFKernelWrapper(Euclidean(iris), gamma=0.5), 26 kernels.RBFKernelWrapper(Hamming(iris), gamma=0.5), l=0.5) 27 27 l3.kernel_type = SVMLearner.Custom 28 28 l3.probability = True
Note: See TracChangeset
for help on using the changeset viewer.