mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-09 12:02:38 +02:00
pca initializer more robust to lower dimensions
This commit is contained in:
parent
f469ce8f41
commit
ec6f8c5f3b
1 changed files with 2 additions and 1 deletions
|
|
@ -38,7 +38,8 @@ class GPLVM(GP):
|
||||||
def initialise_latent(self, init, input_dim, Y):
|
def initialise_latent(self, init, input_dim, Y):
|
||||||
Xr = np.random.randn(Y.shape[0], input_dim)
|
Xr = np.random.randn(Y.shape[0], input_dim)
|
||||||
if init == 'PCA':
|
if init == 'PCA':
|
||||||
Xr[:, :Y.shape[1]] = PCA(Y, input_dim)[0]
|
PC = PCA(Y, input_dim)[0]
|
||||||
|
Xr[:PC.shape[0], :PC.shape[1]] = PC
|
||||||
return Xr
|
return Xr
|
||||||
|
|
||||||
def getstate(self):
|
def getstate(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue