Skip to content

Optimization with non-linear mean function #1434

Answered by saitcakmak
qres asked this question in Q&A
Discussion options

You must be logged in to vote

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 like a * x with unknown a and allow training a with other hyper-parameters. To make this into f(a*x) with a known f, you can overwrite the forward call of the model, changing the mean_x = self.mean_module(x) to mean_x = f(self.mean_module(x)).

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by qres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants