Ignore:
Timestamp:
03/16/12 15:18:01 (2 years ago)
Author:
Lan Zagar <lan.zagar@…>
Branch:
default
rebase_source:
ff77db6e4645f7f5a2b9e7f08418d4126e550ad6
Message:

Better solution for intercept (see #1115).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/regression/linear.py

    r10436 r10557  
    239239            else: 
    240240                X = numpy.insert(A, 0, 1, axis=1) # adds a column of ones 
    241             m += 1 
    242241        else: 
    243242            X = A 
     
    260259            cov = pinv(dot(dot(X.T, W), X)) 
    261260        else: 
    262             cov = pinv(dot(dot(X.T, W), X) + self.ridge_lambda * numpy.eye(m)) 
     261            cov = pinv(dot(dot(X.T, W), X) +  
     262                       self.ridge_lambda * numpy.eye(m + self.intercept)) 
    263263            # TODO: find inferential properties of the estimators 
    264264            compute_stats = False  
Note: See TracChangeset for help on using the changeset viewer.