The approach taken by Moore and Gair is to use the waveform differences between the NR and PN waveforms to train a Gaussian process. Here I investigate whether it is possible to by-pass the PN approximant, and predict a waveform using a Gaussian process trained only from the NR data.

For computational simplicity we will work with just the “S-series-v2” waveforms.

We can have a quick look at how the training set is distributed through parameter space, which should give us some idea of the range of waveforms the final GP should be able to replicate.

 /home/daniel/.virtualenvs/jupyter/local/lib/python2.7/site-packages/matplotlib/__init__.py:872: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.
warnings.warn(self.msg_depr % (key, alt_key))
/home/daniel/.virtualenvs/jupyter/local/lib/python2.7/site-packages/matplotlib/__init__.py:892: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.
warnings.warn(self.msg_depr % (key, alt_key))



This graph reveals that at least two of the parameters are redundant: they always have the same value, those are ph2 and th2L. (We could very nearly remove q as a parameter too, but it has a few values which don’t lie within its main range). So we can reduce the number of parameters we train with by two (which is good, it makes the computation easier!), and the distribution will look something like this:

We now train the GPR with the waveform data and the parameters of the waveform.

 0 483
1 483
2 483
3 483
4 483
5 483
6 483
7 483
8 483
9 483
10 483
11 483
12 483
13 483
14 483
15 483
16 483
17 483
18 483
{} failed. Continuing.
{} failed. Continuing.
21 483
22 483
23 483
24 483
25 483
26 483
27 483
28 483
29 483
{} failed. Continuing.
31 483
32 483
33 483
{} failed. Continuing.
35 483
36 483
37 483
{} failed. Continuing.
{} failed. Continuing.
{} failed. Continuing.
41 483
42 483
43 483
44 483
45 483
46 483
47 483
48 483
49 483
50 483
51 483
52 483
53 483
54 483
55 483
56 483
57 483
58 483
59 483
60 483
61 483
62 483
63 483
64 483
65 483
66 483
67 483
68 483
69 483
70 483
71 483
72 483
73 483
74 483
75 483
76 483
77 483
78 483
79 483
80 483
81 483
82 483
83 483
84 483
85 483
Training complete.
log Likelihood: 3.67600768525e+16
0 483
1 483
2 483
3 483
4 483
5 483
6 483
7 483
8 483
9 483
10 483
11 483
12 483
13 483
14 483
15 483
16 483
17 483
18 483
{} failed. Continuing.
{} failed. Continuing.
21 483
22 483
23 483
24 483
25 483
26 483
27 483
28 483
29 483
{} failed. Continuing.
31 483
32 483
33 483
{} failed. Continuing.
35 483
36 483
37 483
{} failed. Continuing.
{} failed. Continuing.
{} failed. Continuing.
41 483
42 483
43 483
44 483
45 483
46 483
47 483
48 483
49 483
50 483
51 483
52 483
53 483
54 483
55 483
56 483
57 483
58 483
59 483
60 483
61 483
62 483
63 483
64 483
65 483
66 483
67 483
68 483
69 483
70 483
71 483
72 483
73 483
74 483
75 483
76 483
77 483
78 483
79 483
80 483
81 483
82 483
83 483
84 483
85 483


---------------------------------------------------------------------------

Exception                                 Traceback (most recent call last)

<ipython-input-38-8e9c1ef5a405> in <module>()
1 predictor = gwpred.GPWaveform(cat, parameters = ['q', 'a1','a2', 'th1L', 'ph1', 'th12', 'thSL', 'thJL'], times=(-50, 50))
----> 2 skpredictor = gwpred.SKWaveform(cat, parameters = ['q', 'a1','a2', 'th1L', 'ph1', 'th12', 'thSL', 'thJL'], times=(-50, 50))

/scratch/aries/daniel/repositories/gwgpr/gwgpr/predict.py in __init__(self, catalogue, parameters, times)
125         self.gp = gp = gaussian_process.GaussianProcess()
126         #self.gp = gp = george.GP(kernel)
--> 127         self.gp.fit(self.train_x, self.train_y)
128         print("Training complete.")
129

/usr/lib/python2.7/dist-packages/sklearn/gaussian_process/gaussian_process.pyc in fit(self, X, y)
307         if (np.min(np.sum(D, axis=1)) == 0.
308                 and self.corr != correlation.pure_nugget):
--> 309             raise Exception("Multiple input features cannot have the same"
310                             " value.")
311

Exception: Multiple input features cannot have the same value.


We can now input a set of parameters and see the resulting waveform.

 3.67600768525e+16


---------------------------------------------------------------------------

MemoryError                               Traceback (most recent call last)

<ipython-input-39-7d6cee686a71> in <module>()
----> 1 predictor.optimise()

/scratch/aries/daniel/repositories/gwgpr/gwgpr/predict.py in optimise(self)
69         # Run the optimization routine.
70         p0 = self.gp.kernel.vector
---> 71         results = op.minimize(self.nll, p0, jac=self.grad_nll)
72
73         self.gp.kernel[:] = results.x

/usr/lib/python2.7/dist-packages/scipy/optimize/_minimize.pyc in minimize(fun, x0, args, method, jac, hess, hessp, bounds, constraints, tol, callback, options)
370         return _minimize_cg(fun, x0, args, jac, callback, **options)
371     elif meth == 'bfgs':
--> 372         return _minimize_bfgs(fun, x0, args, jac, callback, **options)
373     elif meth == 'newton-cg':
374         return _minimize_newtoncg(fun, x0, args, jac, hess, hessp, callback,

/usr/lib/python2.7/dist-packages/scipy/optimize/optimize.pyc in _minimize_bfgs(fun, x0, args, jac, callback, gtol, norm, eps, maxiter, disp, return_all, **unknown_options)
830     else:
831         grad_calls, myfprime = wrap_function(fprime, args)
--> 832     gfk = myfprime(x0)
833     k = 0
834     N = len(x0)

/usr/lib/python2.7/dist-packages/scipy/optimize/optimize.pyc in function_wrapper(*wrapper_args)
279     def function_wrapper(*wrapper_args):
280         ncalls[0] += 1
--> 281         return function(*(wrapper_args + args))
282
283     return ncalls, function_wrapper

59         # Update the kernel parameters and compute the likelihood.
60         self.gp.kernel[:] = p
62
63     def optimise(self):