Changeset 8971:92b5a12ca00a in orange


Ignore:
Timestamp:
09/15/11 12:49:12 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
fd1d1db553d5bb9c661f749f374fbcc795f94238
Message:

Commented out BagOfWords test case. It needs data in a sparse format - it is currently useless.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testing/unittests/tests/test_svm.py

    r8735 r8971  
     1import Orange 
    12from Orange.classification.svm import SVMLearner, MeasureAttribute_SVMWeights, LinearLearner, RFE 
    23from Orange.classification.svm.kernels import BagOfWords, RBFKernelWrapper 
     
    2627    LEARNER = SVMLearner(name="svm-sig", kernel_type=SVMLearner.Sigmoid) 
    2728     
    28      
    29 @datasets_driven(datasets=datasets) 
    30 class BagOfWordsSVMTestCase(testing.LearnerTestCase): 
    31     LEARNER = SVMLearner(name="svm-bow", kernel_type=SVMLearner.Custom, kernelFunc=BagOfWords()) 
     29 
     30#def to_sparse(data): 
     31#    domain = Orange.data.Domain([], data.domain.class_var) 
     32#    domain.add_metas(dict([(Orange.core.newmetaid(), v) for v in data.domain.attributes])) 
     33#    return Orange.data.Table(domain, data) 
     34# 
     35#def sparse_data_iter(): 
     36#    for name, (data, ) in testing.datasets_iter(datasets): 
     37#        yield name, (to_sparse(data), ) 
     38#     
     39## This needs sparse datasets.  
     40#@testing.data_driven(data_iter=sparse_data_iter()) 
     41#class BagOfWordsSVMTestCase(testing.LearnerTestCase): 
     42#    LEARNER = SVMLearner(name="svm-bow", kernel_type=SVMLearner.Custom, kernelFunc=BagOfWords()) 
    3243     
    3344     
Note: See TracChangeset for help on using the changeset viewer.