Changeset 10605:2ad79c723d30 in orange
 Timestamp:
 03/21/12 18:36:55 (2 years ago)
 Branch:
 default
 rebase_source:
 9d5ef63413e4b9281221b551d5a2dcbe12b366ca
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Orange/regression/linear.py
r10599 r10605 246 246 247 247 if self.ridge_lambda: 248 cov += self.ridge_lambda * numpy.eye(m + self.intercept) 248 stride = cov.shape[0] + 1 249 cov.flat[self.intercept * stride::stride] += self.ridge_lambda 249 250 250 251 # adds some robustness by computing the pseudo inverse; … … 257 258 if m > 0: 258 259 cov_x = numpy.cov(X, rowvar=0) 259 260 260 # standardized coefficients 261 261 std_coefficients = sqrt(cov_x.diagonal()) / sigma_y * coefficients … … 284 284 r2 = ssr / sst 285 285 r2adj = 1  (1  r2) * (n  1) / (n  m  1) 286 F = (ssr / m) / (sst  ssr / (n  m  1)) 286 F = (ssr / m) / (sst  ssr / (n  m  1)) if m else None 287 287 df = n  2 288 288 sigma_square = sse / (n  m  1)
Note: See TracChangeset
for help on using the changeset viewer.