I have trained successfully a multi-output Gaussian Process model using an GPy.models.GPCoregionalizedRegression
model of the GPy
package. The model has ~25 inputs and 6 outputs.
The underlying kernel is an GPy.util.multioutput.ICM
kernel consisting of an RationalQuadratic kernel GPy.kern.RatQuad
and the GPy.kern.Coregionalize
Kernel.
I am now interested in the feature importance on each individual output. The RatQuad kernel provides an ARD=True
(Automatic Relevance Determination) keyword, which allows to get the feature importance of its output for a single output model (which is also exploited by the get_most_significant_input_dimension()
method of the GPy model).
However, calling the get_most_significant_input_dimension()
method on the GPy.models.GPCoregionalizedRegression
model gives me a list of indices I assume to be the most significant inputs somehow for all outputs.
How can I calculate/obtain the lengthscale values or most significant features for each individual output of the model?
The problem is the model itself. The intrinsic coregionalized model (ICM) is set up such, that all outputs are determined by a shared underlying "latent" Gaussian Process. Thus, calling
get_most_significant_input_dimension()
on aGPy.models.GPCoregionalizationRegression
model can only give you one set of input dimensions significant to all outputs together.The solution is to use a
GPy.util.multioutput.LCM
model kernel, which is defined as a sum of ICM kernels with a list of individual (latent) GP kernels. It works as followsA reshaping is of the data is needed (This is also necessary for the ICM model and thus independent of the scope of this questions, see here for details)
After converged optimization one can call
get_most_significant_input_dimension()
on an individual latent GPs (here output0
).or looping over all kernels