Open Junnian opened 4 years ago
This would be pretty hard to look in to without you uploading the actual sample data there, so it's hard to do more than guess. However, a few things:
BatchNorm1d
"feature extractor" to your model.with gpytorch.settings.cg_tolerance(0.0001):
around your likelihood,model = train(...)
call, and a with gpytorch.settings.eval_cg_tolerance(0.0001):
to your prediction settings.This would be pretty hard to look in to without you uploading the actual sample data there, so it's hard to do more than guess. However, a few things:
- Try wrapping the GridKernel in the ScaleKernel, rather than the other way around.
- It doesn't look like you are normalizing your data, which is usually a problem for gpytorch. Try either normalizing your data, or adding a small
BatchNorm1d
"feature extractor" to your model.- To rule out numerics issues with the grid kernel, try using tighter CG tolerance. Add a
with gpytorch.settings.cg_tolerance(0.0001):
around yourlikelihood,model = train(...)
call, and awith gpytorch.settings.eval_cg_tolerance(0.0001):
to your prediction settings.
thanks for your replay. please allow me to show my sample data
the train_data is a image, I extractor its Coordinate to make train_x,and the corresponding value is train_y. for example:
train_data is
array([[1, 2, 3],
[1, 2, 3],
[1, 2, 3]])
so the train_x is train_data`s indices
array([[0, 0],
[0, 1],
[0, 2],
[1, 0],
[1, 1],
[1, 2],
[2, 0],
[2, 1],
[2, 2]])
and the train_y is train_data`s value
array([1, 2, 3, 1, 2, 3, 1, 2, 3])
thanks for you again,I really did`nt have normal the data,I will try it
question
I want to use GPR interplotation ,there are two python pakage to use ,gpytorch and GPy. the GPy can automatically optimizes parameters ,so I can get a good interplotated image used GPy, but its speed is slow. I want to use gpytorch to do this faster, however I can`t find a good parameters manually,is this normal?How should I do?
example:
data
the train data:
the ture image:
the GPy interplotation result:
the gpytorch interplotation result:
code