Changeset 10616:0ef88f0d8128 in orange


Ignore:
Timestamp:
03/22/12 17:46:20 (2 years ago)
Author:
Lan Zagar <lan.zagar@…>
Branch:
default
Message:

Do not compute whole cov matrix to get standard deviations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/regression/linear.py

    r10615 r10616  
    134134    from Orange import statc as stats 
    135135 
    136 from numpy import dot, sqrt 
     136from numpy import dot, sqrt, std 
    137137from numpy.linalg import inv, pinv 
    138138 
     
    255255        mu_y, sigma_y = numpy.mean(y), numpy.std(y) 
    256256        if m > 0: 
    257             cov_x = numpy.cov(X, rowvar=0) 
    258257            # standardized coefficients 
    259             std_coefficients = sqrt(cov_x.diagonal()) / sigma_y * coefficients 
     258            std_coefficients = std(X, axis=0, ddof=1) / sigma_y * coefficients 
    260259        else: 
    261260            std_coefficients = None 
Note: See TracChangeset for help on using the changeset viewer.