Moving imports, attempting to update RTD

This commit is contained in:
Alan Saul 2013-12-17 15:24:43 +00:00
parent 9f0c2ea1b7
commit 447f7ceaa2

View file

@ -9,11 +9,11 @@ from ..core import priors
from ..core import GP from ..core import GP
from ..likelihoods import Gaussian from ..likelihoods import Gaussian
from .. import util from .. import util
from ..util.linalg import pca
def initialise_latent(init, input_dim, Y): def initialise_latent(init, input_dim, Y):
Xr = np.random.randn(Y.shape[0], input_dim) Xr = np.random.randn(Y.shape[0], input_dim)
if init.lower() == 'pca': if init.lower() == 'pca':
from ..util.linalg import pca
PC = pca(Y, input_dim)[0] PC = pca(Y, input_dim)[0]
Xr[:PC.shape[0], :PC.shape[1]] = PC Xr[:PC.shape[0], :PC.shape[1]] = PC
return Xr return Xr