Changeset 9316:a2a767dcb110 in orange


Ignore:
Timestamp:
12/06/11 15:00:14 (2 years ago)
Author:
markotoplak
Branch:
default
Convert:
b504569e0ebe917f42bdeb057920c231ab7373a5
Message:

ScoreFeature: correct atttribute parameter setting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/ensemble/forest.py

    r9312 r9316  
    398398        for attr in range(len(instances.domain.attributes)): 
    399399           attrnum[instances.domain.attributes[attr].name] = attr             
    400     
     400 
     401        if "attributes" in self.learner.__dict__: 
     402            self.learner.attributes = len(instances.domain.attributes)**0.5 if self.attributes == None else self.attributes 
     403 
    401404        # build the forest 
    402405        classifiers = []   
     
    477480                else Orange.feature.scoring.MSE() 
    478481 
     482        #ats = self.attributes if self.attributes else int(sqrt(len(candidates))) 
     483        ats = self.attributes 
     484 
    479485        bcopy.split = SplitConstructor_AttributeSubset(\ 
    480             bcopy.split, self.attributes, self.rand) 
     486            bcopy.split, ats, self.rand) 
    481487 
    482488        return bcopy(examples, weight=weight) 
Note: See TracChangeset for help on using the changeset viewer.