0

I'm currently working on a project where I'm using Gaussian Process Regression with GPyTorch to model the velocity and acceleration of a vehicle.

My data consists of three columns: time, velocity and acceleration.

Since acceleration is the derivative of velocity, I'm fitting both velocity and its derivative (acceleration) using GPyTorch as shown here.

Here's a simplified overview of my code:

import torch
import gpytorch

# Extract necessary columns
train_x = torch.tensor(data['time'].values, dtype=torch.float32).unsqueeze(-1)
train_vx = torch.tensor(data['vel'].values, dtype=torch.float32).unsqueeze(-1)
train_ax = torch.tensor(data['accel'].values, dtype=torch.float32).unsqueeze(-1)
train_y = torch.cat([train_vx, train_ax], dim=-1)

# Defining GP model with derivatives
class GPModelWithDerivatives(gpytorch.models.ExactGP):
    # ... (model definition) ...

likelihood = gpytorch.likelihoods.MultitaskGaussianLikelihood(num_tasks=2)
model = GPModelWithDerivatives(train_x, train_y, likelihood)

This is working pretty well, but although MultitaskGaussianLikelihood will model the noise separately for vel and accel I've heard that it assumes the noise level is about the same in each, and for my data, this is definitely not the case, with the acceleration data being much noisier than the velocity data.

Is there a way to specify different noise levels for the velocity and acceleration data within GPyTorch's MultitaskGaussianLikelihood class or any other suitable method?

pnadeau
  • 427
  • 5
  • 8

0 Answers0