Ignore:
Timestamp:
02/07/12 13:16:54 (2 years ago)
Author:
markotoplak
Branch:
default
Message:

data.variable -> feature

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/classification/rules.py

    r9857 r9919  
    627627def create_dichotomous_class(domain, att, value, negate, removeAtt=None): 
    628628    # create new variable 
    629     newClass = Orange.data.variable.Discrete(att.name + "_", values=[str(value) + "_", "not " + str(value)]) 
     629    newClass = Orange.feature.Discrete(att.name + "_", values=[str(value) + "_", "not " + str(value)]) 
    630630    positive = Orange.data.Value(newClass, str(value) + "_") 
    631631    negative = Orange.data.Value(newClass, "not " + str(value)) 
     
    17331733            weights = Orange.data.new_meta_id() 
    17341734            instances.addMetaAttribute(weights, 1.) 
    1735             instances.domain.addmeta(weights, Orange.data.variable.\ 
     1735            instances.domain.addmeta(weights, Orange.feature.\ 
    17361736                Continuous("weights-" + str(weights)), True) 
    17371737        newWeightsID = Orange.data.new_meta_id() 
    17381738        instances.addMetaAttribute(newWeightsID, 1.) 
    1739         instances.domain.addmeta(newWeightsID, Orange.data.variable.\ 
     1739        instances.domain.addmeta(newWeightsID, Orange.feature.\ 
    17401740            Continuous("weights-" + str(newWeightsID)), True) 
    17411741        for instance in instances: 
     
    17581758            weights = Orange.data.new_meta_id() 
    17591759            instances.addMetaAttribute(weights, 1.) 
    1760             instances.domain.addmeta(weights, Orange.data.variable.\ 
     1760            instances.domain.addmeta(weights, Orange.feature.\ 
    17611761                Continuous("weights-" + str(weights)), True) 
    17621762        try: 
    17631763            coverage = instances.domain.getmeta("Coverage") 
    17641764        except: 
    1765             coverage = Orange.data.variable.Continuous("Coverage") 
     1765            coverage = Orange.feature.Continuous("Coverage") 
    17661766            instances.domain.addmeta(Orange.data.new_meta_id(), coverage, True) 
    17671767            instances.addMetaAttribute(coverage, 0.0) 
    17681768        newWeightsID = Orange.data.new_meta_id() 
    17691769        instances.addMetaAttribute(newWeightsID, 1.) 
    1770         instances.domain.addmeta(newWeightsID, Orange.data.variable.\ 
     1770        instances.domain.addmeta(newWeightsID, Orange.feature.\ 
    17711771            Continuous("weights-" + str(newWeightsID)), True) 
    17721772        for instance in instances: 
     
    17911791        examples.addMetaAttribute(self.prob_attribute, self.apriori_prob) 
    17921792        examples.domain.addmeta(self.prob_attribute, 
    1793             Orange.data.variable.Continuous("Probs")) 
     1793            Orange.feature.Continuous("Probs")) 
    17941794        self.argument_id = argument_id 
    17951795 
Note: See TracChangeset for help on using the changeset viewer.