gllim_inverse_map: Inverse Mapping from gllim or bllim parameters

View source: R/gllim_inverse_map.R

gllim_inverse_mapR Documentation

Inverse Mapping from gllim or bllim parameters

Description

This function computes the prediction of a new response from the estimation of the GLLiM model, returned by the function gllim. Given an observed X, the prediction of the corresponding Y is obtained by setting Y to the mean of the distribution p(Y | X).

Usage

gllim_inverse_map(y,theta,verb=0)

Arguments

y

An D x N matrix of input observations with variables in rows and subjects on columns

theta

An object returned by the gllim function corresponding to the learned GLLiM model

verb

Verbosity: print out the progression of the algorithm. If verb=0, there is no print, if verb=1, the progression is printed out. Default is 0.

Details

This function computes the prediction of a new response from the estimation of GLLiM or a BLLiM model, returned by functions gllim and bllim. Indeed, if the inverse conditional density p(X | Y) and the marginal density p(Y) are defined according to a GLLiM model (or BLLiM) (as described on xLLiM-package and gllim), the forward conditional density p(Y | X) can be deduced.

Under GLLiM and BLLiM model, it is recalled that the inverse conditional p(X | Y) is a mixture of Gaussian regressions with parameters (\pi_k,c_k,\Gamma_k,A_k,b_k,\Sigma_k)_{k=1}^K. Interestingly, the forward conditional p(Y | X) is also a mixture of Gaussian regressions with parameters (\pi_k,c_k^*,\Gamma_k^*,A_k^*,b_k^*,\Sigma_k^*)_{k=1}^K. These parameters have a closed-form expression depending only on (\pi_k,c_k,\Gamma_k,A_k,b_k,\Sigma_k)_{k=1}^K.

Finally, the forward density (of interest) has the following expression:

p(Y | X=x) = \sum_{k=1}^K \frac{\pi_k N(x; c_k^*,\Gamma_k^*)}{\sum_j \pi_j N(x; c_j^*,\Gamma_j^*)} N(y; A_k^*x + b_k^*,\Sigma_k^*)

and a prediction of a new vector of responses is computed as:

E (Y | X=x) = \sum_{k=1}^K \frac{\pi_k N(x; c_k^*,\Gamma_k^*)}{\sum_j \pi_j N(x; c_j^*,\Gamma_j^*)} (A_k^*x + b_k^*)

where x is a new vector of observed covariates.

When applied on a BLLiM model (returned by function bllim), the prediction function gllim_inverse_map accounts for the block structure of covariance matrices of the model.

Value

Returns a list with the following elements:

x_exp

An L x N matrix of predicted responses by posterior mean. If L_w latent factors are added to the model, the first Lt rows (1:Lt) are predictions of responses and rows (L_t+1):L (recall that L=L_t+L_w) are estimations of latent factors.

alpha

Weights of the posterior Gaussian mixture model

Author(s)

Emeline Perthame (emeline.perthame@inria.fr), Florence Forbes (florence.forbes@inria.fr), Antoine Deleforge (antoine.deleforge@inria.fr)

References

[1] A. Deleforge, F. Forbes, and R. Horaud. High-dimensional regression with Gaussian mixtures and partially-latent response variables. Statistics and Computing, 25(5):893–911, 2015.

[2] E. Devijver, M. Gallopin, E. Perthame. Nonlinear network-based quantitative trait prediction from transcriptomic data. Submitted, 2017, available at https://arxiv.org/abs/1701.07899.

[3] E. Perthame, F. Forbes, and A. Deleforge. Inverse regression approach to robust nonlinear high-to-low dimensional mapping. Journal of Multivariate Analysis, 163(C):1–14, 2018. https://doi.org/10.1016/j.jmva.2017.09.009

Converted to R from the Matlab code of the GLLiM toolbox available on: https://team.inria.fr/perception/gllim_toolbox/

See Also

xLLiM-package,gllim

Examples

data(data.xllim)

## Setting 5 components in the model
K = 5

## the model can be initialized by running an EM algorithm for Gaussian Mixtures (EMGM)
r = emgm(data.xllim, init=K); 
## and then the gllim model is estimated
responses = data.xllim[1:2,] # 2 responses in rows and 100 observations in columns
covariates = data.xllim[3:52,] # 50 covariates in rows and 100 observations in columns
mod = gllim(responses,covariates,in_K=K,in_r=r);

## Charge testing data
data(data.xllim.test)
## Prediction on a test dataset
pred = gllim_inverse_map(data.xllim.test,mod)
## Predicted responses
print(pred$x_exp)

## Can also be applied on an object returned by bllim function 
## Learn the BLLiM model
# mod = bllim(responses,covariates,in_K=K,in_r=r);
## Prediction on a test dataset
# pred = gllim_inverse_map(data.xllim.test,mod)
## Predicted responses
# print(pred$x_exp)

xLLiM documentation built on Nov. 2, 2023, 5:17 p.m.