mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 16:52:39 +02:00
Further edits on visualization code for faces example.
This commit is contained in:
parent
3fd0672092
commit
fce4dd7fde
9 changed files with 151 additions and 80 deletions
|
|
@ -145,7 +145,8 @@ def PCA(Y, Q):
|
|||
"""
|
||||
if not np.allclose(Y.mean(axis=0), 0.0):
|
||||
print "Y is not zero mean, centering it locally (GPy.util.linalg.PCA)"
|
||||
Y -= Y.mean(axis=0)
|
||||
|
||||
Y -= Y.mean(axis=0)
|
||||
|
||||
Z = linalg.svd(Y, full_matrices = False)
|
||||
[X, W] = [Z[0][:,0:Q], np.dot(np.diag(Z[1]), Z[2]).T[:,0:Q]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue