mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
[logging]
This commit is contained in:
parent
8213b5011c
commit
35b778b45f
6 changed files with 27 additions and 27 deletions
|
|
@ -8,7 +8,7 @@ from base_plots import gpplot, x_frame1D, x_frame2D
|
|||
from ...util.misc import param_to_array
|
||||
from ...models.gp_coregionalized_regression import GPCoregionalizedRegression
|
||||
from ...models.sparse_gp_coregionalized_regression import SparseGPCoregionalizedRegression
|
||||
|
||||
from scipy import sparse
|
||||
|
||||
def plot_fit(model, plot_limits=None, which_data_rows='all',
|
||||
which_data_ycols='all', fixed_inputs=[],
|
||||
|
|
@ -61,11 +61,14 @@ def plot_fit(model, plot_limits=None, which_data_rows='all',
|
|||
|
||||
if hasattr(model, 'has_uncertain_inputs') and model.has_uncertain_inputs():
|
||||
X = model.X.mean
|
||||
X_variance = param_to_array(model.X.variance)
|
||||
X_variance = model.X.variance
|
||||
else:
|
||||
X = model.X
|
||||
X, Y = param_to_array(X, model.Y)
|
||||
if hasattr(model, 'Z'): Z = param_to_array(model.Z)
|
||||
#X, Y = param_to_array(X, model.Y)
|
||||
Y = model.Y
|
||||
if sparse.issparse(Y): Y = Y.todense().view(np.ndarray)
|
||||
|
||||
if hasattr(model, 'Z'): Z = model.Z
|
||||
|
||||
#work out what the inputs are for plotting (1D or 2D)
|
||||
fixed_dims = np.array([i for i,v in fixed_inputs])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue