Changeset 10189:362d9cc5ecac in orange


Ignore:
Timestamp:
02/13/12 12:29:49 (2 years ago)
Author:
anze <anze.staric@…>
Branch:
default
rebase_source:
ba599ded5e10091bdf233be57c2124307ee26824
Message:

Fixed some warnings in evaluation.testing.

Location:
Orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Orange/data/__init__.py

    r10053 r10189  
    22.. autoclass:: Table 
    33""" 
     4from Orange import core 
    45 
    5 from orange import ExampleTable as Table 
    6 from orange import Example as Instance 
    7 from orange import Value, StringValue, Domain 
    8  
    9 import outliers 
     6Table = core.ExampleTable 
     7Instance = core.Example 
     8Value = core.Value 
     9StringValue = core.StringValue 
     10Domain = core.Domain 
  • Orange/evaluation/testing.py

    r10059 r10189  
    561561 
    562562        :param learners: list of learners to be tested 
    563         :param examples: a dataset used for evaluation 
    564         :param folds: number of folds for cross-validation 
     563        :param learn_set: a dataset used for learning 
     564        :param test_set: a dataset used for evaluation 
    565565        :param proportions: proportions of train data to be used 
    566566        :param preprocessors: a list of preprocessors to be used on data. 
    567         :param callback: a function that is called after each classifier is computed. 
    568567        :return: list of :obj:`ExperimentResults` 
    569568        """ 
     
    666665                ex2 = Orange.data.Instance(example) 
    667666                if ex2.domain.class_var: ex2.setclass("?") 
    668                 if ex2.domain.class_vars: ex2.set_classes(["?" for cv in ex2.domain.class_vars]) 
     667                if ex2.domain.class_vars: ex2.set_classes(["?" for _ in ex2 
     668                .domain.class_vars]) 
    669669                result = classifier(ex2, Orange.core.GetBoth) 
    670670                results.append((e, c, result)) 
     
    689689 
    690690    def encode_PP(self, pps): 
    691         pps="" 
    692691        for pp in pps: 
    693             objname = getobjectname(pp[1], "") 
     692            objname = getobjectname(pp[1]) 
    694693            if len(objname): 
    695694                pps+="_"+objname 
Note: See TracChangeset for help on using the changeset viewer.