I'm wondering if I can get away with one cov mat for spicy buffalo... checking.


In [73]:
from pearce.emulator import OriginalRecipe, ExtraCrispy, SpicyBuffalo
from pearce.mocks import cat_dict
import numpy as np
from os import path

In [74]:
import matplotlib
#matplotlib.use('Agg')
from matplotlib import pyplot as plt
%matplotlib inline
import seaborn as sns
sns.set()

In [75]:
#xi gg
training_file = '/scratch/users/swmclau2/xi_zheng07_cosmo_lowmsat/PearceRedMagicXiCosmoFixedNd.hdf5'
#test_file = '/scratch/users/swmclau2/xi_zheng07_cosmo_test2/PearceRedMagicXiCosmoTest.hdf5'
#xi gm training_file = '/scratch/users/swmclau2/xi_gm_cosmo/PearceRedMagicXiGMCosmoFixedNd.hdf5' test_file = '/scratch/users/swmclau2/xi_gm_cosmo_test/PearceRedMagicXiGMCosmoFixedNdTest.hdf5'

In [76]:
em_method = 'gp'
split_method = 'random'

In [77]:
a = 1.0
z = 1.0/a - 1.0

In [78]:
fixed_params = {'z':z, 'cosmo': 0}#, 'r':24.06822623}

In [79]:
np.random.seed(0)
emu = SpicyBuffalo(training_file, method = em_method, fixed_params=fixed_params,
                 custom_mean_function = 'linear', downsample_factor = 1.0)


<type 'numpy.ndarray'> 18000 (18000, 5)

In [80]:
emu0 = emu._emulators[5]
emu1 = emu._emulators[7]

In [81]:
x0, y0 = emu.x[5], emu.y[5]
x1, y1 = emu.x[7], emu.y[7]

In [82]:
x0.shape, x1.shape


Out[82]:
((1000, 4), (1000, 4))

In [83]:
np.all(x0 == x1)


Out[83]:
True

In [84]:
y0.shape, y1.shape


Out[84]:
((1000,), (1000,))

In [85]:
np.all(x0==x1)


Out[85]:
True

In [86]:
emu0._x.shape


Out[86]:
(1000, 4)

In [87]:
emu0.predict(y0, np.zeros((1, x0.shape[1])), return_cov = False)


Out[87]:
array([ 0.05295054])

In [88]:
emu0.predict(y1, np.zeros((1, x0.shape[1])), return_cov = False)


Out[88]:
array([ 0.0243183])

In [89]:
emu1.predict(y0, np.zeros((1, x0.shape[1])), return_cov = False)


Out[89]:
array([ 0.05296291])

In [90]:
emu1.predict(y1, np.zeros((1, x0.shape[1])), return_cov = False)


Out[90]:
array([ 0.02432987])

In [ ]: