Changeset 9119:998805a03104 in orange
 Timestamp:
 10/18/11 19:51:15 (3 years ago)
 Branch:
 default
 Convert:
 c7e1e3f9b25be88f534b808c7db73de59a165412
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

orange/Orange/regression/pls.py
r9114 r9119 61 61 from Orange.regression.earth import data_label_mask 62 62 from numpy import dot, zeros 63 from numpy.linalg import svd, inv63 from numpy.linalg import svd, pinv 64 64 65 65 def normalize_matrix(X): … … 74 74 """ 75 75 muX, sigmaX = numpy.mean(X, axis=0), numpy.std(X, axis=0) 76 sigmaX[sigmaX == 0] = 1. 76 77 return (XmuX)/sigmaX, muX, sigmaX 77 78 … … 383 384 # U = Y C(Q'C)^1 = YC* (W* : q x k matrix) 384 385 self.xRotations = dot(self.W, 385 inv(dot(self.P.T, self.W)))386 pinv(dot(self.P.T, self.W))) 386 387 if Y.shape[1] > 1: 387 388 self.yRotations = dot(self.C, 388 inv(dot(self.Q.T, self.C)))389 pinv(dot(self.Q.T, self.C))) 389 390 else: 390 391 self.yRotations = numpy.ones(1)
Note: See TracChangeset
for help on using the changeset viewer.