Skip to content

Fixed periodicity #2062

Answered by Balandat
adamjstewart asked this question in Q&A
Jul 12, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

You could just implement a new kernel that uses the forward logic from PeriodicKernel but gets rid of the period as a learnable parameter:

class FixedPeriodPeriodicKernel(Kernel):

    def __init__(
        self,
        period_length: Tensor,
        **kwargs,
    ):
        super().__init__(**kwargs)
        self.period_length = period_length

    def forward(self, x1, x2, diag=False, **params):
        return PeriodicKernel.forward(self, x1, x2, diag=False, **params)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@adamjstewart
Comment options

@adamjstewart
Comment options

Answer selected by adamjstewart
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