Tuesday 29 December 2020

How to apply gaussian process regression on series problems?

I have been working on a problem as follows, that I wish to perform regression on using Gaussian Process Regressor (GPR):
Input (X): [list1, list2, list3, ....] # All the lists (or arrays) may not be of the same size
Output(y): [value1, value2, value3, ....] # Equal and corresponding to the number of input lists

Code:

X = np.atleast_2d(X)
# X = X.reshape(124, 50, 3)   # 3D representation does not work for GPR
y = np.atleast_2d(y).reshape(-1,1)

# Gaussian process regressor
kernel = RBF(0.1, (10,10))
gp = gpr(kernel=kernel, n_restarts_optimizer=100, alpha = 0.04)
gp.fit(X,y)

But this code only works for one value of one list (within X) at a time, and not for one whole list as an input.

I have tried various representations and have also been able to achieve the representation of multiple features too, but this problem has been bothering me for a couple of weeks. I only need to know how to overcome the couple of hurdles below. I cannot perform the following operations:

  1. Enter 3D shaped data for GPR
  2. (Because of the above) Enter a time series as input and a value as the output

I have been able to implement the same using deep-learning neural networks, but due to the small amount of data that I have, I wanted to check the same for machine learning models. If it is not possible to use GPR, any suggestions on using other ML models like Support and Relevance Vector Machines would also be extremely helpful.



from How to apply gaussian process regression on series problems?

No comments:

Post a Comment