Changeset 56 for pycodebattler/trunk


Ignore:
Timestamp:
12/19/10 00:40:41 (13 years ago)
Author:
atzm
Message:

parameter tuning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pycodebattler/trunk/pycodebattler/score.py

    r55 r56  
    148148        return int(score) or 1 
    149149 
    150     def colon_score(self, coefficient=2): 
     150    def colon_score(self, coefficient=1.5): 
    151151        colon_bytes = self.token_bytes([token.COLON]) or 1 
    152         score = self.uncommented_bytes() 
    153         score /= (score / colon_bytes) or 1 
     152        score = self.uncommented_bytes() / colon_bytes 
    154153        score *= coefficient 
    155154        score *= self.compressibility() 
    156155        return int(score) or 1 
    157156 
    158     def name_score(self, coefficient=36): 
     157    def name_score(self, coefficient=48): 
    159158        name_bytes = self.token_bytes([token.NAME]) or 1 
    160159        score = self.uncommented_bytes() 
Note: See TracChangeset for help on using the changeset viewer.