Changeset 8144:36b755f8c5a6 in orange


Ignore:
Timestamp:
08/04/11 10:09:07 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
dbb7ba6c21feec386c963448fafbbf21dc48ecfc
Message:

Don't overwrite y when scaling it for forward pass.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/Orange/regression/earth.py

    r8141 r8144  
    135135         
    136136        if self.scale_resp: 
    137             y = y - numpy.mean(y, axis=0) 
    138             y = y / numpy.std(y, axis=1) 
     137            sy = y - numpy.mean(y, axis=0) 
     138            sy = sy / numpy.std(sy, axis=1) 
     139        else: 
     140            sy = y 
    139141             
    140              
    141         # TODO: y scaling 
    142         n_terms, used, bx, dirs, cuts = forward_pass(x, y, 
     142        n_terms, used, bx, dirs, cuts = forward_pass(x, sy, 
    143143            degree=self.degree, terms=self.terms, penalty=self.penalty, 
    144144            thresh=self.thresh, fast_k=self.fast_k, fast_beta=self.fast_beta, 
     
    671671        bagged_imp[attr] = tuple(scores) 
    672672     
    673     bagged_imp = sorted(bagged_imp.items(), key=lambda t:t[1][0], 
     673    bagged_imp = sorted(bagged_imp.items(), key=lambda t: (t[1][0],t[1][1]), 
    674674                        reverse=True)     
    675675    if used_only: 
Note: See TracChangeset for help on using the changeset viewer.