Ignore:
Timestamp:
02/07/12 18:14:08 (2 years ago)
Author:
markotoplak
Branch:
default
rebase_source:
dcc1bddbbae14a1e234a7d18a813ea0fb1d2bb93
Message:

moved new_meta_ide from feature to feature.Descriptor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/classification/rules.py

    r9929 r9936  
    13351335        (newDomain, targetVal) = create_dichotomous_class(examples.domain, examples.domain.class_var, str(cl), negate=0) 
    13361336        newDomainmetas = newDomain.getmetas() 
    1337         newDomain.addmeta(Orange.feature.new_meta_id(), examples.domain.class_var) # old class as meta 
     1337        newDomain.addmeta(Orange.feature.Descriptor.new_meta_id(), examples.domain.class_var) # old class as meta 
    13381338        dichData = examples.select(newDomain) 
    13391339        if self.argument_id: 
     
    17311731    def __call__(self, rule, instances, weights, target_class): 
    17321732        if not weights: 
    1733             weights = Orange.feature.new_meta_id() 
     1733            weights = Orange.feature.Descriptor.new_meta_id() 
    17341734            instances.addMetaAttribute(weights, 1.) 
    17351735            instances.domain.addmeta(weights, Orange.feature.\ 
    17361736                Continuous("weights-" + str(weights)), True) 
    1737         newWeightsID = Orange.feature.new_meta_id() 
     1737        newWeightsID = Orange.feature.Descriptor.new_meta_id() 
    17381738        instances.addMetaAttribute(newWeightsID, 1.) 
    17391739        instances.domain.addmeta(newWeightsID, Orange.feature.\ 
     
    17561756    def __call__(self, rule, instances, weights, target_class): 
    17571757        if not weights: 
    1758             weights = Orange.feature.new_meta_id() 
     1758            weights = Orange.feature.Descriptor.new_meta_id() 
    17591759            instances.addMetaAttribute(weights, 1.) 
    17601760            instances.domain.addmeta(weights, Orange.feature.\ 
     
    17641764        except: 
    17651765            coverage = Orange.feature.Continuous("Coverage") 
    1766             instances.domain.addmeta(Orange.feature.new_meta_id(), coverage, True) 
     1766            instances.domain.addmeta(Orange.feature.Descriptor.new_meta_id(), coverage, True) 
    17671767            instances.addMetaAttribute(coverage, 0.0) 
    1768         newWeightsID = Orange.feature.new_meta_id() 
     1768        newWeightsID = Orange.feature.Descriptor.new_meta_id() 
    17691769        instances.addMetaAttribute(newWeightsID, 1.) 
    17701770        instances.domain.addmeta(newWeightsID, Orange.feature.\ 
     
    17871787    def __init__(self, examples, weight_id, target_class, apriori, argument_id): 
    17881788        self.best_rule = [None] * len(examples) 
    1789         self.prob_attribute = Orange.feature.new_meta_id() 
     1789        self.prob_attribute = Orange.feature.Descriptor.new_meta_id() 
    17901790        self.apriori_prob = apriori[target_class] / apriori.abs 
    17911791        examples.addMetaAttribute(self.prob_attribute, self.apriori_prob) 
Note: See TracChangeset for help on using the changeset viewer.