mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-09 12:02:38 +02:00
Merge branch 'devel' into kurtCutajar-devel
This commit is contained in:
commit
84896ab97b
8 changed files with 10990 additions and 32 deletions
|
|
@ -195,11 +195,11 @@ class MRD(BayesianGPLVMMiniBatch):
|
|||
fracs = [fracs]*len(Ylist)
|
||||
elif init in "PCA_single":
|
||||
X = np.zeros((Ylist[0].shape[0], self.input_dim))
|
||||
fracs = []
|
||||
fracs = np.empty((len(Ylist), self.input_dim))
|
||||
for qs, Y in zip(np.array_split(np.arange(self.input_dim), len(Ylist)), Ylist):
|
||||
x,frcs = initialize_latent('PCA', len(qs), Y)
|
||||
x, frcs = initialize_latent('PCA', len(qs), Y)
|
||||
X[:, qs] = x
|
||||
fracs.append(frcs)
|
||||
fracs[:, qs] = frcs
|
||||
else: # init == 'random':
|
||||
X = np.random.randn(Ylist[0].shape[0], self.input_dim)
|
||||
fracs = X.var(0)
|
||||
|
|
@ -208,9 +208,7 @@ class MRD(BayesianGPLVMMiniBatch):
|
|||
X /= X.std()
|
||||
return X, fracs
|
||||
|
||||
def _init_Z(self, init="permute", X=None):
|
||||
if X is None:
|
||||
X = self.X
|
||||
def _init_Z(self, init, X):
|
||||
if init in "permute":
|
||||
Z = np.random.permutation(X.copy())[:self.num_inducing]
|
||||
elif init in "random":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue