You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have data that includes features of 2 pairs and their relationship as a label. These labels show if both pairs are equal to each other less than a threshold in any case or whichever is bigger than the threshold. If pair1 is bigger, label is 0. If they are equal the label is 1. If pair2 is bigger, the label is 2. So my data looks like below;
I want to create a custom likelihood for a gp solution. The thing is, I should be able to somehow get predictions for pair1 and pair2 separately from the same model and calculate the probabilities together with an appropriate loss. My problem is, I could not find any example or a solution for doing that. I created my model with ApproximateGP in the way below:
I can create the custom likelihood in a way like this:
class MyLikelihood(gpytorch.likelihoods.Likelihood):
def __init__(self):
super().__init__()
threshold...
def forward(self, function_samples, **kwargs):
....
prob calculations
find probabilities for labels 0, 1, 2 etc.
...
return probs
Here my problem is, how can I send the predictions from both pair1 and pair2 to create a custom likelihood and I am not sure about how to implement the loss part since I can not directly use a built-in function like VariationalELBO since they always get 1 kind of data, only 1 pair in my case. I can maybe call the model for 2 pairs separately like that:
and then pass the combination of means and covs to the likelihood as a MultivariateNormal but I am not sure how to do it right now. Any ideas about my problem?
Note: I already tried pairwise GP from botorch and but I think it was not exactly suited to my data.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have data that includes features of 2 pairs and their relationship as a label. These labels show if both pairs are equal to each other less than a threshold in any case or whichever is bigger than the threshold. If pair1 is bigger, label is 0. If they are equal the label is 1. If pair2 is bigger, the label is 2. So my data looks like below;
I want to create a custom likelihood for a gp solution. The thing is, I should be able to somehow get predictions for pair1 and pair2 separately from the same model and calculate the probabilities together with an appropriate loss. My problem is, I could not find any example or a solution for doing that. I created my model with ApproximateGP in the way below:
I can create the custom likelihood in a way like this:
Here my problem is, how can I send the predictions from both pair1 and pair2 to create a custom likelihood and I am not sure about how to implement the loss part since I can not directly use a built-in function like VariationalELBO since they always get 1 kind of data, only 1 pair in my case. I can maybe call the model for 2 pairs separately like that:
and then pass the combination of means and covs to the likelihood as a MultivariateNormal but I am not sure how to do it right now. Any ideas about my problem?
Note: I already tried pairwise GP from botorch and but I think it was not exactly suited to my data.
Beta Was this translation helpful? Give feedback.
All reactions