torch_openreml.predict

torch_openreml.predict(y, x, z, g, v)[source]

Compute conditional fitted values including random effects.

\[\hat{\symbf{y}} = \symbf{X}\hat{\boldsymbol{\beta}} + \symbf{Z}\hat{\symbf{b}}\]
Parameters:
  • y (torch.Tensor) – Response vector of shape (n,).

  • x (torch.Tensor) – Fixed-effect design matrix of shape (n, p).

  • z (torch.Tensor) – Random-effect design matrix of shape (n, q).

  • g (torch.Tensor) – Random-effect covariance matrix of shape (q, q), e.g. \(\symbf{G}(\boldsymbol{\theta})\) evaluated at fitted covariance parameters.

  • v (torch.Tensor) – Marginal covariance matrix of shape (n, n), e.g. \(\symbf{V}(\boldsymbol{\theta})\) evaluated at fitted covariance parameters.

Returns:

Conditional fitted values of shape (n,).

Return type:

torch.Tensor