Higher Rank Features

class vanguard.features.HigherRankFeatures(rank, **kwargs)[source]

Bases: Decorator

Make a GPController compatible with higher rank features.

GPyTorch assumes that input features are rank-1 (vectors) and a variety of RuntimeErrors are thrown from different places in the code if this is not true. This decorator modifies the gp model class to make it compatible with higher rank features.

Example:
>>> @HigherRankFeatures(2)
... class NewController(GPController):
...     pass
Parameters:
__init__(rank, **kwargs)[source]
Parameters:
  • rank (int) – The rank of the input features. Should be a positive integer.

  • kwargs (Any)