MimeSys: Multiview Learner Function

View source: R/MimeSys.R

MimeSysR Documentation

Multiview Learner Function

Description

This function generates synthetic multi-view data and performs various analyses, including plotting correlations and activity patterns.

Usage

MimeSys(
  mainDir = "/Users/siddheshkulkarni/Desktop",
  subDir = "plots_simulated_data",
  seed.number = 1234,
  sim_params = list(M = 3, p_m = c(500, 700, 1000), n = 100, K0 = 10, nPatternJ = 5, J0_m
    = c(5, 6, 7), K0_m = c(5, 7, 10), S0_m = c(6, 7, 8), nu2_0 = 0.1, pi2_0 = 0.1, snr_m
    = c(1, 1, 1), snr_y = 1, decaying_loadings = FALSE, decaying_type = "sqrt", pJ_zero =
    0.6, pJ_sign = 0.4, pJ_zeroEntr = 0.5, pS_zero = 0.6, pS_sign = 0.4, pS_zeroEntr =
    0.5, fixed_act_pattern = "YES"),
  user_params = list(use_jive = TRUE, user_data = Data, snr_data = 1, Heatmap_indicator =
    "YES"),
  Activity_pattern_plot = TRUE,
  Empirical_correlation_plot = TRUE,
  Crossprd_plot = TRUE,
  Data_save = TRUE
)

Arguments

mainDir

Character. The main directory where plots and data will be saved.

subDir

Character. The subdirectory within mainDir for saving plots and data.

seed.number

Numeric. Seed for random number generation.

Activity_pattern_plot

Logical. Whether to save the activity pattern plot.

Crossprd_plot

Logical. Whether to save crossproduct plots.

Data_save

Logical. Whether to save the generated data.

M

Integer. Number of views.

p_m

Integer vector. Number of features per view.

n

Integer. Train set size.

nTest

Integer. Test set size.

params

List. A list of parameters including:

  • fixed_act_pattern Logical. Whether to use a fixed activity pattern.

  • K0 Integer. Number of factors.

  • nPatternJ Integer. Number of joint patterns.

  • J0_m Integer vector. Number of groups in the joint component per view.

  • K0_m Integer vector. Number of factors in view-specific components.

  • S0_m Integer vector. Number of groups in view-specific components.

  • nu2_0 Numeric. Variability in the joint loadings.

  • pi2_0 Numeric. Variability in the view-specific loadings.

  • snr_m Numeric vector. Signal-to-noise ratio for each view.

  • snr_y Numeric. Signal-to-noise ratio for the response.

  • decaying_loadings Logical. Whether to enforce loadings decay.

  • decaying_type Character. Type of decay ('sqrt' or 'log').

  • pJ_zero Numeric. Probability of group-wise zero in joint component.

  • pJ_sign Numeric. Probability of group-wise sign-switch in joint component.

  • pJ_zeroEntr Numeric. Probability of entry-wise zero in joint component.

  • pS_zero Numeric. Probability of group-wise zero in specific components.

  • pS_sign Numeric. Probability of group-wise sign-switch in specific components.

  • pS_zeroEntr Numeric. Probability of entry-wise zero in specific components.

Emprical_correlation_plot

Logical. Whether to save the empirical correlation plot.

Value

A list containing the generated data and various parameters used in the simulation.

Examples

mainDir <- tempdir()
subDir <- 'plots_simulated_data'
seed.number <- 1234
M <- 2
p_m <- c(500, 700)
n <- 100
nTest <- 100
params <- list(
  fixed_act_pattern = TRUE,
  K0 = 10,
  nPatternJ = 5,
  J0_m = c(4, 5),
  K0_m = c(5, 6),
  S0_m = c(4, 5),
  nu2_0 = 0.1,
  pi2_0 = 0.1,
  snr_m = NULL,
  snr_y = 1,
  decaying_loadings = FALSE,
  decaying_type = 'sqrt',
  pJ_zero = 0.6,
  pJ_sign = 0.4,
  pJ_zeroEntr = 0.5,
  pS_zero = 0.6,
  pS_sign = 0.4,
  pS_zeroEntr = 0.5
)
Activity_pattern_plot <- TRUE
Emprical_correlation_plot <- TRUE
Crossprd_plot <- TRUE
Data_save <- TRUE
Data <- MimeSys(mainDir, subDir, seed.number, M, p_m, n, nTest, params, Activity_pattern_plot, Emprical_correlation_plot, Crossprd_plot, Data_save)


himelmallick/MimESys documentation built on April 13, 2025, 9:06 p.m.