generate_params: Generate parameter values of a PO2PLS model

View source: R/PO2PLS_functions.R

generate_paramsR Documentation

Generate parameter values of a PO2PLS model

Description

Generate parameter values of a PO2PLS model

Usage

generate_params(
  X,
  Y,
  r,
  rx,
  ry,
  alpha = 0.1,
  type = c("random", "o2m", "unit")
)

Arguments

X

Numerical data matrix or positive integer. This parameter should either be a dataset X or the number of desired X variables.

Y

Numerical data matrix or positive integer. This parameter should either be a dataset Y or the number of desired Y variables.

r

Positive integer. Number of joint PLS components. Must be positive!

rx

Non-negative integer. Number of orthogonal components in X. Can be 0

ry

Non-negative integer. Number of orthogonal components in Y. Can be 0

alpha

Numeric vector. The length should be either one or three, with each entry between 0 and 1. It represents the proportion of noise relative to the variation of X, Y, and U, respectively. If only one number is given, it is used for all three parts.

type

Character. Should be one of "random", "o2m" or "unit". Specifies which kind of parameters should be generated. If "o2m" is chosen, X and Y should be data matrices.

Details

A list of PO2PLS parameters are generated based on the value of type:

type="random"

Variance parameters are randomly sampled from a uniform distribution on 1 and 3 (1 and 4 for B).

type="o2m"

O2PLS is fitted to X and Y first using o2m from the OmicsPLS package, and the corresponding PO2PLS parameters are derived from the result.

type="unit"

The diagonal of each covariance matrix is a decreasing sequence from the number of components to one.

Value

A list with

W

X joint loadings

Wo

X specific loadings

C

Y joint loadings

Co

Y specific loadings

B

Regression matrix of U on T

SigT

Covariance matrix of T

SigTo

Covariance matrix of To

SigUo

Covariance matrix of Uo

SigH

Covariance matrix of H

sig2E

Variance of E

sig2F

Variance of F


selbouhaddani/PO2PLS documentation built on Feb. 23, 2024, 5:25 a.m.