mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-30 14:35:15 +02:00
lines that call matplotlib were commented
This commit is contained in:
parent
bb0e2a6237
commit
064a57f851
1 changed files with 9 additions and 5 deletions
|
|
@ -307,12 +307,14 @@ def ppca_missing_data_at_random(Y, Q, iters=100):
|
||||||
Sigma = np.zeros((N, Q, Q))
|
Sigma = np.zeros((N, Q, Q))
|
||||||
Sigma2 = np.zeros((N, Q, Q))
|
Sigma2 = np.zeros((N, Q, Q))
|
||||||
mu = np.zeros(D)
|
mu = np.zeros(D)
|
||||||
|
"""
|
||||||
if debug:
|
if debug:
|
||||||
import matplotlib.pyplot as pylab
|
import matplotlib.pyplot as pylab
|
||||||
fig = pylab.figure("FIT MISSING DATA");
|
fig = pylab.figure("FIT MISSING DATA");
|
||||||
ax = fig.gca()
|
ax = fig.gca()
|
||||||
ax.cla()
|
ax.cla()
|
||||||
lines = pylab.plot(np.zeros((N,Q)).dot(W))
|
lines = pylab.plot(np.zeros((N,Q)).dot(W))
|
||||||
|
"""
|
||||||
W2 = np.zeros((Q,D))
|
W2 = np.zeros((Q,D))
|
||||||
|
|
||||||
for i in range(iters):
|
for i in range(iters):
|
||||||
|
|
@ -358,6 +360,7 @@ def ppca_missing_data_at_random(Y, Q, iters=100):
|
||||||
nu2 /= N
|
nu2 /= N
|
||||||
nu4 = (((Ycentered - X.dot(W))**2).sum(0) + W.T.dot(Sigma.sum(0).dot(W)).sum(0)).sum()/N
|
nu4 = (((Ycentered - X.dot(W))**2).sum(0) + W.T.dot(Sigma.sum(0).dot(W)).sum(0)).sum()/N
|
||||||
import ipdb;ipdb.set_trace()
|
import ipdb;ipdb.set_trace()
|
||||||
|
"""
|
||||||
if debug:
|
if debug:
|
||||||
#print Sigma[0]
|
#print Sigma[0]
|
||||||
print "nu:", nu, "sum(X):", X.sum()
|
print "nu:", nu, "sum(X):", X.sum()
|
||||||
|
|
@ -368,6 +371,7 @@ def ppca_missing_data_at_random(Y, Q, iters=100):
|
||||||
ax.set_ylim(pred_y.min(), pred_y.max())
|
ax.set_ylim(pred_y.min(), pred_y.max())
|
||||||
fig.canvas.draw()
|
fig.canvas.draw()
|
||||||
time.sleep(.3)
|
time.sleep(.3)
|
||||||
|
"""
|
||||||
return np.asarray_chkfinite(X), np.asarray_chkfinite(W), nu
|
return np.asarray_chkfinite(X), np.asarray_chkfinite(W), nu
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue