In [81]:
%matplotlib inline
from pymc.gp import *
import numpy as np
import matplotlib.pylab as plt

Mean function

The mean function of a GP can be interpreted as a "prior guess" at the form of the true function.

In [82]:
# Generate mean
def quadfun(x, a, b, c):
    return (a*x**2 + b*x + c)

M = Mean(quadfun, a=1., b=0.5, c=2.)
In [83]:
x = np.arange(-1,1,0.1)
plt.plot(x, M(x), 'k-')
Out[83]:
[<matplotlib.lines.Line2D at 0x10aa95940>]

Covariance function

The behavior of individual realizations from the GP is governed by the covariance function. The Matèrn class of functions is a flexible choice.

In [97]:
from pymc.gp.cov_funs import matern
import numpy as np
C = Covariance(eval_fun=matern.euclidean, diff_degree=1.4, amp=0.4, scale=1, rank_limit=1000)

plt.subplot(1,2,2)
plt.contourf(x, x, C(x,x).view(np.ndarray), origin='lower', extent=(-1,1,-1,1), cmap=plt.cm.bone)
plt.colorbar()

plt.subplot(1,2,1)
plt.plot(x, C(x,0).view(np.ndarray), 'k-')
plt.ylabel('C(x,0)')
Out[97]:
<matplotlib.text.Text at 0x10c4d3ef0>
In [98]:
# Returns the diagnonal
C(x)
Out[98]:
array([ 0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
        0.16,  0.16])
In [99]:
np.diag(C(x,x))
Out[99]:
matrix([[ 0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,  0.16,
          0.16,  0.16]])

Drawing realizations from a GP

In [103]:
# Generate realizations
f_list = [Realization(M, C) for i in range(3)]

# Plot mean and covariance
x = np.arange(-1,1,0.01)
plot_envelope(M, C, x)

# Add realizations
for f in f_list:
    plt.plot(x, f(x))

Non-parametric Regression

Under a GP prior for an unknown function f, when the observation error is normally distributed, the posterior us another GP with new mean and covariance functions.

In [110]:
M = Mean(quadfun, a=1., b=0.5, c=2.)
C = Covariance(eval_fun=matern.euclidean, diff_degree=1.4, amp=0.4, scale=1, rank_limit=1000)

obs_x = np.array([-.5, .5])
V = np.array([0.002, 0.002])
data = np.array([3.1, 2.9])

observe(M=M, C=C, obs_mesh=obs_x, obs_V=V, obs_vals=data)

# Generate realizations from posterior
f_list = [Realization(M,C) for i in range(3)]

The function observe informs the mean and covariance functions that values on obs_mesh with observation variance V. Making observations with no error is called conditioning. This is useful when, for example, forcing a rate function to be zero when a population's size is zero.

In [111]:
plot_envelope(M, C, mesh=x)
for f in f_list:
    plt.plot(x, f(x))

Salmon Example

In [112]:
class salmon:
    """
    Reads and organizes data from csv files,
    acts as a container for mean and covariance objects,
    makes plots.
    """
    def __init__(self, name, data):

        # Read in data

        self.name = name

        self.abundance = data[:,0].ravel()
        self.frye = data[:,1].ravel()

        # Specify priors

        # Function for prior mean
        def line(x, slope):
            return slope * x

        self.M = Mean(line, slope = np.mean(self.frye / self.abundance))

        self.C = Covariance( matern.euclidean,
                                diff_degree = 1.4,
                                scale = 100. * self.abundance.max(),
                                amp = 200. * self.frye.max())

        observe(self.M,self.C,obs_mesh = 0, obs_vals = 0, obs_V = 0)

        self.xplot = np.linspace(0,1.25 * self.abundance.max(),100)



    def plot(self):
        """
        Plot posterior from simple nonstochetric regression.
        """
        plt.figure()
        plot_envelope(self.M, self.C, self.xplot)
        for i in range(3):
            f = Realization(self.M, self.C)
            plt.plot(self.xplot,f(self.xplot))

        plt.plot(self.abundance, self.frye, 'k.', markersize=4)
        plt.xlabel('Female abundance')
        plt.ylabel('Frye density')
        plt.title(self.name)
        plt.axis('tight')
In [113]:
sockeye_data = np.reshape([2986,9,
3424,12.39,
1631,4.5,
784,2.56,
9671,32.62,
2519,8.19,
1520,4.51,
6418,15.21,
10857,35.05,
15044,36.85,
10287,25.68,
16525,52.75,
19172,19.52,
17527,40.98,
11424,26.67,
24043,52.6,
10244,21.62,
30983,56.05,
12037,29.31,
25098,45.4,
11362,18.88,
24375,19.14,
18281,33.77,
14192,20.44,
7527,21.66,
6061,18.22,
15536,42.9,
18080,46.09,
17354,38.82,
17301,42.22,
11486,21.96,
20120,45.05,
10700,13.7,
12867,27.71,], (34,2))
In [114]:
# Instantiate salmon object with sockeye abundance
sockeye = salmon('sockeye', sockeye_data)

# Observe some data
observe(sockeye.M, sockeye.C, obs_mesh = sockeye.abundance, obs_vals = sockeye.frye, obs_V = .25*sockeye.frye)
In [115]:
sockeye.plot()

Multidimensional Function Approximation

A non-linear function to approximate:

In [116]:
def sinxfun(x=0,y=0):
    ''' for each (x,y) point, it returns d*sin(d), where d is the distance from the origin.'''
    d = np.sqrt(x**2+y**2)
    return d*np.sin(d)
In [117]:
x_mesh = np.arange(-10, 10, 0.1)
y_mesh = np.arange(-10, 10, 0.1)
xx, yy = np.meshgrid(x_mesh, y_mesh)
z_mesh = sinxfun(xx,yy)
In [118]:
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(xx, yy, z_mesh, cmap=plt.cm.Blues, vmin=-15, vmax=15)
Out[118]:
<mpl_toolkits.mplot3d.art3d.Poly3DCollection at 0x10c7215f8>

We define our GP using a mean function and a covariance function.

In [119]:
#assumed mean of gassian process = 0
def meanfun(xy):
    return np.zeros((len(xy),1))

M = Mean(meanfun)


#covariance is what was used in the example above
C = Covariance(eval_fun = matern.euclidean, 
               diff_degree = 10.4, 
               amp = 10.4, 
               scale = 10.)

Let's draw sample functions from the prior

In [120]:
xy = np.c_[xx.ravel(), yy.ravel()]

xy
Out[120]:
array([[-10. , -10. ],
       [ -9.9, -10. ],
       [ -9.8, -10. ],
       ..., 
       [  9.7,   9.9],
       [  9.8,   9.9],
       [  9.9,   9.9]])
In [121]:
r = Realization(M, C)

fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(xx, yy, np.reshape(r(xy), xx.shape),
                alpha=.3,
                cmap=plt.cm.Blues,
                vmin=-15,vmax=15)
ax.set_zlim(-15,15)
Out[121]:
(-15, 15)
In [122]:
r = Realization(M, C)

fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(xx, yy, np.reshape(r(xy), xx.shape),
                alpha=.3,
                cmap=plt.cm.Blues,
                vmin=-15,vmax=15)
ax.set_zlim(-15,15)
Out[122]:
(-15, 15)

Now suppose we observe some data (5 points)

In [123]:
# Observational variances
V = np.array([.002,.002]) 

xobs = np.random.uniform(-10,10, (2,5))
yobs = sinxfun(*xobs)
yobs
Out[123]:
array([-5.30449219, -0.51763162, -0.90444381,  1.54728181,  1.56982855])

Update prior mean and covariance functions

In [124]:
observe(M, C, 
        obs_mesh=xobs.T, 
        obs_V=V,  
        obs_vals=yobs)

r = Realization(M,C)
In [125]:
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(xx, yy, np.reshape(r(xy),xx.shape),
                alpha=.3,
                cmap=plt.cm.Blues,
                vmin=-15,vmax=15)
ax.set_zlim(-15,15)
ax.plot(xobs[0], xobs[1], yobs, '.r', markersize=10)
Out[125]:
[<mpl_toolkits.mplot3d.art3d.Line3D at 0x1030227f0>]

Now observe 500 points.

In [126]:
xobs = np.random.uniform(-10,10, (2,500))
yobs = sinxfun(*xobs)
In [127]:
observe(M, C, 
        obs_mesh=xobs.T, 
        obs_V=V,  
        obs_vals=yobs)

r = Realization(M,C)
In [128]:
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot_surface(xx, yy, np.reshape(r(xy),xx.shape),
                alpha=.3,
                cmap=plt.cm.Blues,
                vmin=-15,vmax=15)
ax.set_zlim(-15,15)
Out[128]:
(-15, 15)
In [131]:
M.reg_mat
Out[131]:
matrix([[ -5.10042611e-01],
        [  1.63595198e-01],
        [  4.02078334e-01],
        [ -3.71830623e-01],
        [  1.02012207e+00],
        [  4.26569157e-01],
        [  1.42298574e+00],
        [ -9.83026263e-01],
        [ -1.25825113e+00],
        [ -2.16806476e+00],
        [ -7.77846481e-01],
        [  1.37597204e+00],
        [ -1.93620046e+00],
        [  1.95689494e+00],
        [ -1.71429281e+00],
        [  2.34227442e+00],
        [ -3.40596695e+00],
        [ -8.89402139e+00],
        [ -1.49264480e+01],
        [ -9.79843190e+00],
        [  1.45600244e+01],
        [ -2.30339653e+01],
        [  1.33442839e+01],
        [  1.81779454e+01],
        [ -3.45880879e+00],
        [  1.45144792e+00],
        [ -1.33279958e+01],
        [  3.61795933e+01],
        [ -4.21953167e+01],
        [ -3.29147847e+01],
        [ -4.79584368e+00],
        [ -4.21627165e+01],
        [ -5.15416408e+01],
        [  3.55196409e+01],
        [ -1.19305871e+01],
        [ -2.26400534e+01],
        [ -4.34340061e+01],
        [ -7.38605066e+01],
        [ -2.22428829e+01],
        [ -6.74509030e+00],
        [  2.21615695e+01],
        [  7.07594049e+01],
        [  5.98659125e+01],
        [  2.28501877e+01],
        [ -2.13831937e+02],
        [ -4.14630400e+01],
        [  5.78497633e+01],
        [  1.89758746e+01],
        [  4.98648524e+01],
        [  1.52464233e+02],
        [  5.09930809e+01],
        [  1.91835388e+02],
        [  4.15209753e+01],
        [  2.13080196e+01],
        [ -2.56651983e+01],
        [ -4.36845825e+01],
        [ -4.36511422e+01],
        [  4.10392543e+00],
        [ -9.61695342e+01],
        [  1.11854749e+02],
        [ -9.14173969e+00],
        [ -7.62256937e+01],
        [ -2.29130378e+00],
        [ -1.33505206e+02],
        [  5.35154740e+00],
        [  7.78281628e+00],
        [  1.17716237e+02],
        [ -6.17754435e+01],
        [ -4.53233290e+01],
        [ -2.06013390e+01],
        [ -7.50431313e+01],
        [ -9.25173531e+01],
        [ -1.25427145e+02],
        [ -2.76129983e+01],
        [ -1.03941117e+01],
        [  1.39179141e+01],
        [ -5.80559449e+01],
        [  5.35911611e+01],
        [  1.72163293e+01],
        [ -7.49975026e+01],
        [  5.11906596e+01],
        [ -5.42664704e+01],
        [  5.42160399e+00],
        [  7.36725925e+01],
        [  4.11353710e+01],
        [  3.25370890e+01],
        [  6.13579065e+01],
        [  1.42289972e+02],
        [  3.53916172e+01],
        [ -2.47841783e+01],
        [ -3.71012948e+01],
        [  6.54191617e+01],
        [  2.17417218e+01],
        [  6.67218582e+01],
        [  3.63496883e+01],
        [ -2.04469542e+01],
        [  7.87220075e+01],
        [ -6.45383346e+01],
        [ -8.66134988e+00],
        [ -2.13610482e+01],
        [ -5.94908616e+01],
        [ -4.79844349e+01],
        [ -7.39705472e+01],
        [ -5.36424907e+01],
        [  3.41351054e+01],
        [ -2.02877358e+01],
        [ -3.09917888e+01],
        [ -1.86069593e+01],
        [  1.30894690e+00],
        [  4.48896934e+01],
        [  2.15322052e+01],
        [  1.65926826e+01],
        [ -8.75017811e+01],
        [ -1.57656426e+01],
        [  2.39716373e+01],
        [ -1.45318044e+01],
        [ -5.15484311e+01],
        [ -1.66014436e+01],
        [  1.56541467e+01],
        [ -2.88431476e+01],
        [  3.66065771e+01],
        [  4.11977973e+01],
        [ -7.31141408e+00],
        [ -3.91233814e+01],
        [ -3.63058540e+00],
        [  4.14542817e+01],
        [  6.72716138e+00],
        [  5.42791145e+00],
        [  2.09898326e+01],
        [  7.85558799e+00],
        [  3.67900888e+01],
        [ -2.48995269e+01],
        [  1.37959104e+01],
        [  1.18442042e+02],
        [ -4.77230435e+01],
        [ -7.93976686e+01],
        [  6.39850915e+01],
        [ -7.71547408e+00],
        [ -4.96692829e+01],
        [ -3.46620197e+01],
        [  1.02435674e+02],
        [  1.06952902e+01],
        [ -8.67927253e+01],
        [  7.13957634e+01],
        [ -6.55081497e+00],
        [ -7.35814643e+00],
        [  5.09903221e+00],
        [  1.36429276e+01],
        [ -7.22465548e+01],
        [ -1.78377042e+01],
        [  1.18351803e+01],
        [  6.40698390e+01],
        [ -2.81959106e+01],
        [ -1.73539581e+01],
        [ -8.70737602e+01],
        [ -1.89299652e+01],
        [ -1.35057127e+01],
        [  1.37338729e+01],
        [ -9.92579288e+00],
        [ -6.01070552e+01],
        [ -2.87611121e+01],
        [  5.43033396e+01],
        [  1.36253480e+01],
        [  8.84082447e+01],
        [ -1.27192092e+01],
        [  3.47885332e+01],
        [ -3.65165725e+01],
        [ -6.59678292e+01],
        [  1.69262938e+01],
        [  5.29764682e+01],
        [ -1.43967909e+01],
        [ -5.09455614e+01],
        [  3.35054809e+01],
        [ -4.15368264e+01],
        [  2.98998756e+01],
        [  3.25104779e+01],
        [  3.33448988e+01],
        [ -3.66162884e+01],
        [  9.34425319e+01],
        [ -3.64037300e+00],
        [ -1.94556513e+01],
        [  4.78181084e+01],
        [ -7.85078640e+01],
        [ -3.95159978e+00],
        [ -1.91126214e+01],
        [  2.04186530e+01],
        [ -7.42934973e+01],
        [  1.78889227e+01],
        [ -2.53641812e+01],
        [  4.96838685e+01],
        [  2.13106268e+01],
        [ -3.64141806e+00],
        [  3.48222075e+01],
        [ -4.84010724e+01],
        [ -2.69945098e+01],
        [ -5.71337242e+01],
        [  3.00960718e+01],
        [  4.72503705e+01],
        [ -3.41178825e+01],
        [ -7.83813169e+01],
        [ -6.70756657e+00],
        [ -3.53192190e+01],
        [ -7.45806042e+01],
        [  6.42802003e+01],
        [  3.71748148e+01],
        [  3.52919139e+01],
        [ -2.57558374e+01],
        [ -6.53829848e+01],
        [  7.76078657e+00],
        [  7.50970544e+01],
        [ -3.54205405e+01],
        [ -4.32303495e+01],
        [  5.75869648e+01],
        [  3.58609137e+01],
        [ -4.67009982e+01],
        [ -1.43458517e+01],
        [  4.22869846e+01],
        [  8.39646574e+00],
        [  3.93896878e+01],
        [  8.29238386e+01],
        [ -5.56493672e+01],
        [ -2.91259254e+01],
        [ -5.68216892e+01],
        [  1.28879410e+01],
        [  8.63836695e+00],
        [  2.23621981e+01],
        [ -2.34651312e+01],
        [ -3.27001860e+01],
        [  3.00532699e+01],
        [ -1.77363344e+01],
        [ -2.87655371e+01],
        [ -2.58778365e+01],
        [ -5.35342129e+01],
        [  7.75207038e+00],
        [  4.04082950e+01],
        [ -2.45639313e+01],
        [ -3.63002764e+00],
        [  3.03351792e+01],
        [  4.74083367e+01],
        [ -2.25181484e+01],
        [ -2.86366743e+01],
        [ -1.56588310e+01],
        [ -5.22738288e+01],
        [  2.03833706e+01],
        [ -4.10479170e+01],
        [ -2.87374894e+01],
        [  3.75804110e+01],
        [ -3.13185896e+01],
        [  3.18133086e+01],
        [ -5.95168805e+01],
        [  2.43154393e+01],
        [ -3.26041007e+01],
        [  6.23353067e+01],
        [ -3.74502300e+01],
        [ -3.26135334e+00],
        [ -6.81203458e+01],
        [  9.69652673e+00],
        [  1.46354930e+01],
        [ -1.33995479e+01],
        [ -2.16569005e+01],
        [  1.48668994e+01],
        [  1.09801191e+01],
        [ -3.07414803e+01],
        [ -6.73830757e+01],
        [  3.90735460e+00],
        [ -4.71989816e+01],
        [  3.26493403e+01],
        [ -1.72990402e+01],
        [ -6.60136619e+01],
        [ -3.73771223e+01],
        [  4.98537807e+01],
        [  2.80978171e+01],
        [  4.10142574e+01],
        [ -1.50632259e+01],
        [ -6.58296224e+01],
        [ -3.49304230e+01],
        [  6.50776236e+01],
        [  4.10161964e+01],
        [ -6.65546168e+00],
        [ -4.23467394e+01],
        [ -5.67822641e+01],
        [  2.39056590e+01],
        [  3.43152251e+01],
        [  4.33839262e-01],
        [ -6.90159721e+00],
        [ -7.29797037e+01],
        [ -1.76358869e+00],
        [  3.07548274e+01],
        [  1.69949212e+01],
        [  3.21914053e+01],
        [  1.01399026e+00],
        [  7.61271891e+01],
        [ -4.54104966e+01],
        [  4.19002401e+00],
        [ -6.60044277e+00],
        [  2.18471338e+00],
        [ -3.90196817e+01],
        [ -4.08354475e+01],
        [  4.56513785e+00],
        [ -3.34476382e+01],
        [ -2.75759759e+01],
        [ -3.33655220e+01],
        [  3.30138985e+01],
        [  1.43151662e+01],
        [  1.07050001e+02],
        [ -6.62308434e+00],
        [ -3.34190156e+01],
        [  3.94391647e+01],
        [  2.44559267e+01],
        [ -1.97556937e+01],
        [ -6.27605238e+01],
        [ -2.07403738e+01],
        [ -6.76443219e+01],
        [  6.70971686e+01],
        [ -3.63781707e+01],
        [  2.83364924e+01],
        [  1.42794631e+01],
        [ -7.06982346e+01],
        [  4.42785315e+01],
        [  5.40397677e+01],
        [ -5.50720040e+01],
        [  2.42336172e+00],
        [ -8.93839403e+00],
        [  7.09388015e+01],
        [ -2.32492615e+01],
        [  3.42941889e+01],
        [ -5.35267982e+01],
        [ -2.81801952e+01],
        [ -5.55489931e+01],
        [ -3.41414634e+01],
        [ -3.17004980e+01],
        [ -3.82111443e+00],
        [ -4.86353704e+01],
        [  2.84788725e+01],
        [  5.54101332e+01],
        [ -1.04278263e+01],
        [  1.49674647e+01],
        [  3.84684612e+01],
        [ -5.54741042e+01],
        [  8.14808371e+01],
        [  1.73959441e+01],
        [ -1.03456985e+01],
        [ -1.53713852e+01],
        [  3.53322662e+01],
        [  2.12162327e+01],
        [ -1.89219234e+01],
        [ -1.05695396e+02],
        [ -5.64581439e+01],
        [  1.78455752e+01],
        [ -3.68156409e+01],
        [  1.53054451e+01],
        [  4.53618055e+01],
        [  6.12624850e+01],
        [ -4.78778432e+01],
        [  4.24838141e+01],
        [  6.72560685e+00],
        [ -5.25563516e+01],
        [  5.65818117e+01],
        [ -4.16884357e+01],
        [ -1.24598061e+01],
        [  4.49929390e+01],
        [  1.08387826e+01],
        [  6.19310412e+01],
        [ -1.16862097e+01],
        [  1.46937040e+00],
        [ -6.56202995e+01],
        [ -3.70521208e+01],
        [ -2.37043705e+01],
        [ -2.00426533e+01],
        [  1.37095973e+01],
        [ -7.35188557e+00],
        [  2.91053850e+01],
        [  2.77220026e+00],
        [ -5.26059162e+01],
        [  2.10176914e+01],
        [  5.13470103e+01],
        [  1.06734619e+01],
        [ -3.54457838e+01],
        [ -3.74069517e+01],
        [  4.62366644e+01],
        [ -9.86743484e+00],
        [  6.22022702e+01],
        [  4.65015248e+01],
        [  2.86250338e+00],
        [ -4.75407024e+01],
        [  1.97120967e+01],
        [  1.10763085e+01],
        [  5.35123782e+01],
        [ -8.89787096e+00],
        [  1.25165772e+01],
        [  1.78642972e+01],
        [ -1.59735443e+01],
        [ -2.61086532e+01],
        [ -1.04699223e+02],
        [ -5.57444468e+01],
        [  6.73116744e+00],
        [ -1.64915255e+01],
        [  4.16055879e+01],
        [ -2.04189507e+01],
        [ -4.37092377e+01],
        [ -2.04439187e+01],
        [ -5.12696214e+01],
        [  4.49689468e+01],
        [ -4.49681882e+01],
        [ -6.50677579e+01],
        [ -5.08866398e+00],
        [  1.69361441e+01],
        [  3.64333035e+00],
        [  2.34612965e+01],
        [  2.15115406e+01],
        [  3.17213703e+01],
        [ -1.98776920e+00],
        [ -3.01447676e+01],
        [  3.78274546e+01],
        [ -6.43637275e+01],
        [  2.51822001e+01],
        [ -9.74631153e+00],
        [  9.50656537e+00],
        [ -3.10360826e+01],
        [ -2.91197666e+00],
        [ -1.15975352e+01],
        [ -1.19043968e+01],
        [ -3.39725433e+01],
        [ -5.85105154e+01],
        [  3.53385367e+01],
        [ -4.42016598e+01],
        [  3.58327205e+01],
        [ -2.38158925e-01],
        [ -3.22546262e+01],
        [  8.73445228e+00],
        [  8.43303750e+01],
        [  5.75157419e+00],
        [  5.00481803e+01],
        [ -3.86876565e+01],
        [  1.86509437e+01],
        [ -1.09390974e+02],
        [  5.78277324e+01],
        [  5.36466714e+01],
        [  3.37506260e+01],
        [ -3.36430469e+01],
        [  3.99756687e+01],
        [  1.52963426e+01],
        [ -3.18759717e+01],
        [ -8.50345311e+00],
        [  1.10595253e+01],
        [ -2.42571663e+01],
        [ -3.67093354e+01],
        [  9.14323957e+00],
        [  1.12833847e+01],
        [  2.53019922e+01],
        [ -1.64906522e+01],
        [  5.73496498e+01],
        [  1.25696747e+01],
        [ -5.66508572e+01],
        [  4.44785878e+01],
        [  5.53099217e+00],
        [ -3.62998905e+00],
        [  1.16932079e+01],
        [ -4.38767263e+01],
        [  5.13769464e+01],
        [ -4.08587044e+01],
        [  6.58376847e-01],
        [  5.19086780e+01],
        [ -1.20060503e+01],
        [  3.52731887e+01],
        [  5.80097437e+01],
        [  6.62860758e+01],
        [  3.88081618e+01],
        [  6.41889644e+01],
        [  2.14060198e+00],
        [  2.61474939e+01],
        [ -2.98263530e+01],
        [  4.25058278e+00],
        [ -3.39634903e+01],
        [ -2.43286514e+01],
        [ -4.25754175e+01],
        [ -3.60846679e+01],
        [ -3.75400973e+01],
        [ -5.69316095e+01],
        [ -3.56850412e+00],
        [  4.49706984e+01],
        [ -3.35343003e+00],
        [ -2.31431177e+01],
        [ -2.78295027e+01],
        [ -5.36429551e+00],
        [ -2.27912143e+01],
        [ -8.35773488e+00],
        [ -1.88613617e+01],
        [ -3.97617858e+00],
        [  2.93352471e+01],
        [ -1.94359728e+01],
        [ -3.67857530e+01],
        [  1.81318243e+01],
        [  1.79236606e+01],
        [ -7.79389327e+00],
        [ -7.90446541e+00],
        [ -1.18779995e+01],
        [ -2.69615214e+01],
        [ -2.75033756e+01],
        [  2.47960957e+01],
        [ -7.92238162e+00],
        [ -2.21234811e+01],
        [ -5.54287580e+00],
        [ -9.73807187e+00],
        [ -2.10528417e+01]])