susiepca.sim.generate_sim(seed: int, l_dim: int, n_dim: int, p_dim: int, z_dim: int, effect_size: float = 1.0) SimulatedData[source]
Create the function to generate a sparse data for PCA. Please note that to

illustrate how SuSiE PCA work, we build this simple and straitforward simulation where each latent component have exact l_dim number of non-overlapped single effects. Please make sure l_dim < p_dim/z_dim when generate simulation data using this function.

Parameters:
seed: int

Seed for “random” initialization

l_dim: int

Number of single effects in each factor

n_dim: int

Number of sample in the data

p_dim: int

Number of feature in the data

z_dim: int

Number of Latent dimensions

effect_size: float = 1.0

The effect size of features contributing to the factor. (default = 1).

Returns:

Tuple that contains simulated factors (N x K), W (factor loadings (K x P), and data X (data (N x P).

Return type:

SimulatedData


Last update: Feb 13, 2024