Optimization with non-linear mean function #1434
-
I am trying to optimize a model with a nonlinear, parametrized mean. E.g. something like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @qres. I think you can handle this case using a custom mean module in the GP. GPyTorch has a |
Beta Was this translation helpful? Give feedback.
Hi @qres. I think you can handle this case using a custom mean module in the GP. GPyTorch has a
LinearMean
(https://docs.gpytorch.ai/en/stable/means.html#gpytorch.means.LinearMean), which should support modeling functions likea * x
with unknowna
and allow traininga
with other hyper-parameters. To make this intof(a*x)
with a knownf
, you can overwrite theforward
call of the model, changing themean_x = self.mean_module(x)
tomean_x = f(self.mean_module(x))
.