create_oilmm_from_data#
- gpjax.models.create_oilmm_from_data(dataset, num_latent_gps, key, kernel=None, mean_function=None)[source]#
Create OILMM with data-informed initialization of mixing matrix.
Initializes U to the top M eigenvectors and S to the top M eigenvalues of the empirical covariance matrix of the outputs. Near-zero eigenvalues are clamped to 1e-6 for numerical stability. This can provide better initialization than random, especially when outputs have clear correlation structure.
- Parameters:
dataset (Dataset) – Training data with y [N, P]
num_latent_gps (int) – Number of latent GPs (m)
key (Array) – JAX PRNG key
kernel (AbstractKernel) – Kernel for latent GPs (default: RBF)
mean_function (tp.Any) – Mean function (default: Zero)
- Returns:
OILMMModel with U initialized to top M eigenvectors and S to top M eigenvalues
- Return type:
Example
>>> import gpjax as gpx >>> import jax.numpy as jnp >>> import jax.random as jr >>> X = jnp.linspace(0, 1, 50).reshape(-1, 1) >>> y = jnp.column_stack([jnp.sin(X), jnp.cos(X)]) >>> data = gpx.Dataset(X=X, y=y) >>> model = gpx.models.create_oilmm_from_data( ... dataset=data, ... num_latent_gps=2, ... key=jr.key(42) ... )
Expand for references to
gpjax.models.create_oilmm_from_data