cpop_internals: CPOP internal functions

cpop1R Documentation

CPOP internal functions

Description

Step 1 of the CPOP method, aiming to select features agreed by both input data.

Step 1 of the CPOP method, for multiple alpha inputs

Step 2 of the CPOP method based on sign

Step 2 of the CPOP method based on scaled magnitude

Step 3 of the CPOP method

Usage

cpop1(
  z1,
  z2,
  y1,
  y2,
  w,
  family,
  n_iter = 20,
  alpha = 1,
  n_features = 50,
  s = "lambda.min",
  cpop1_method = "normal",
  ...
)

cpop1_iterate(
  z1,
  z2,
  y1,
  y2,
  w = NULL,
  family,
  s = "lambda.min",
  n_iter = 20,
  alpha = 1,
  n_features = 50,
  ...
)

cpop2_sign(
  z1,
  z2,
  y1,
  y2,
  family,
  cpop1_features,
  s = "lambda.min",
  nIter = 20,
  cpop2_break = TRUE,
  intercept,
  ...
)

cpop2_mag(
  z1,
  z2,
  y1,
  y2,
  family,
  cpop1_features,
  s = "lambda.min",
  nIter = 20,
  cpop2_break = FALSE,
  mag = 1,
  intercept,
  ...
)

cpop3(z1, z2, y1, y2, cpop2_result, family, intercept, ...)

Arguments

z1

A data matrix, columns are pairwise-differences between the original data columns.

z2

A data matrix, columns are pairwise-differences between the original data columns. Column names should be identical to z1.

y1

A vector of response variable. Must be of the same length as the number of rows of z1.

y2

A vector of response variable. Must be of the same length as the number of rows of z2.

w

A vector of weights to encourage selection of features agreed by both data. Default to NULL, in which case, the absolute difference between column-wise means are used.

family

see glmnet family

n_iter

Number of iterations for 'cpop1' and 'cpop2' functions.

alpha

The alpha parameter for elastic net models. See the 'alpha' argument in glmnet::glmnet.

n_features

Breaking the CPOP-Step 1 loop if a certain number of features is reached.

s

CV-Lasso lambda

cpop1_method
  • "normal" (default): meaning that the features selected by **both** data1 (consisted of z1 and y1) and data2 (consisted of z2 and y2) will be used to construct the final feature set in the first step of CPOP.

  • "after": In case that no predictive features were found to be commonly predictive in both data, features ever found by **both** data will be pooled to construct the final feature set in the first step of CPOP.

  • "either": In case that no predictive features were found to be commonly predictive in both data, features ever selected by **either** data will now be pooled

...

Extra parameter settings for cv.glmnet

cpop1_features

cpop1 result

nIter

Number of iterations

cpop2_break

Should cpop2 loop be broken the first time

intercept

default to FALSE

mag

a scaled threshold differential betas are removed

cpop2_result

cpop2 result

Value

A list. Consisted of a vector of features and a tibble of features selected in each step.

A vector of features

A vector of features

A vector


kevinwang09/CPOP documentation built on April 23, 2022, 11:05 a.m.