tune_network: tune two network

Description Usage Arguments Value Examples

Description

Tune two network for better prediction.

Usage

1
2
3
4
tune_network(y, x, L1, L2, adaptl2 = T, nfolds = 5, cvwhich, foldseed,
  stratify = T, lam0, bets, intercept = T, standardize = T,
  fam = "Gaussian", type1se = T, measdev = T, maxiter = 10000,
  cri = 0.001, parallel = F)

Arguments

y

outcome

x

predictors matrix

L1

Laplacian matrix for the first network

L2

Laplacian matrix for the second network

adaptl2

whether to adapt the sign for quadratic penalty, default to be TRUE

nfolds

number of folds used in cross validation, default to be five

cvwhich

fold assignment, start from zero, if missing do random cross validation

foldseed

the random seed for cross validation design

stratify

whether to do stratified cross validation for Logistic or Cox model, default to be TRUE

lam0

The tuning parameters for quadratic penalty. If not defined, tuned by default

bets

The candidate weight for the first network, must be between 0 and 1, default to be 0, 0.1,..., 1

intercept

whether to include intercept. Ignore for Cox regression

standardize

whether to standardize predictors

fam

family for the outcome, can be "Gaussian", "Logistic", and "Cox"

type1se

whether to use one standard error or maximum rule, default to be one standard error rule

measdev

Whether to use deviance to tune, default to be deviance. If not, use mean absolue error, area under ROC curve, or concordance index for Gaussian, Logistic, and Cox

maxiter

maximum number of iterations, default to be 500

cri

stoppint criterion, default to be 0.001

parallel

whether to do parallel computing at each fold

Value

est

estimated mixed Laplacian matrix

weight

weights for the two Laplacian matrix

Examples

1
2
3
4
5
6
7
8
data(sampledata)
data(L0)
data(L1)
y <- sampledata$Y_Gau
x <- sampledata[, -(1:3)]
Ltune <- tune_network(y, x, L0, L1, adaptl2 = FALSE)
weight <- Ltune@weight
Lest <- Ltune@est

glmaag documentation built on May 10, 2019, 9:04 a.m.