Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected ln value for the constant in front of an ExpSquaredKernel #57

Closed
mar-ses opened this issue Mar 2, 2017 · 1 comment
Closed

Comments

@mar-ses
Copy link

mar-ses commented Mar 2, 2017

Hello, I defined an ExpSquaredKernel like so:

	A_xy_i = 10**(-4.5)
	var_x_i = 18**(-1)
	var_y_i = 18**(-1)

	k_spatial = A_xy_i * kernels.ExpSquaredKernel(metric=[var_x_i, var_y_i], ndim=3, axes=[0,1])

But when I print the values I get this:

In [1]: k_spatial.get_vector()
Out[1]: array([-11.46024521,  -2.89037176,  -2.89037176])

Which doesn't agree with the following:

In [2]: A_xy_i

Out[2]: 3.1622776601683795e-05

In [4]: np.log(A_xy_i)

Out[4]: -10.361632918473205

This happens every time I define a constant in front of the ExpSquaredKernel. I didn't change the vector value either this is immediately after the definition. Is this supposed to happen? What is the actual conversion from the amplitude to the constant vector?

Using 1.0-dev branch.

@dfm
Copy link
Owner

dfm commented Mar 2, 2017

The parameter for a constant kernel in multiple dimensions is actually value/ndim:

In [1]: np.log(10**(-4.5)/3.)
Out[1]: -11.460245207141314

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants