PartitionsSelection: Co-data selection in a Group-regularized ridge regression...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/PartitionsSelection.R

Description

This function implements a procedure to optimize the use of co-data in a GRridge model. Although there is no harm to include as much as co-data in a GRridge model, ordering and selecting co-data can optimized the performance of a GRridge model. This procedure is similar with forward feature selection in a classical regression model

Usage

1
2
PartitionsSelection(highdimdata, response, partitions, 
                    monotoneFunctions, optl=NULL, innfold=NULL) 

Arguments

highdimdata

Matrix or numerical data frame. Contains the primary data of the study. Columns are samples, rows are features.

response

Factor, numeric, binary or survival. Response values. The number of response values should equal ncol(highdimdata).

partitions

List of lists. Each list component contains a partition of the variables, which is again a list.

monotoneFunctions

Vector. Monotone functions from each partition. This argument is necesarily specified. If the jth component of monotone equals TRUE, then the group-penalties are forced to be monotone. If monotone=NULL monotony is not imposed for any partition.

optl

Global penalty parameter lambda

innfold

Integer. The fold for cross-validating the global regularization parameter lambda and for computing cross-validated likelihoods. Defaults LOOCV.

Value

A list containing (i) the indeces of the selected and ordered partitions and (ii) the optimum lambda penalty from the ridge regression.

Author(s)

Putri W. Novianti

See Also

Creating partitions: CreatePartition. Group-regularized ridge regression: grridge.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# # Load data objects
# data(dataWurdinger)
# 
# # Transform the data set to the square root scale
# dataSqrtWurdinger <- sqrt(datWurdinger_BC)
# 
# #Standardize the transformed data
# datStdWurdinger <- t(apply(dataSqrtWurdinger,1,function(x){(x-mean(x))/sd(x)}))
# 
# # A list of gene names in the primary RNAseq data
# genesWurdinger <- as.character(annotationWurdinger$geneSymbol)
# 
# # co-data 1: a partition based on immunologic signature pathway
# # The initial gene sets (groups) are merged into five new groups, using the "mergeGroups" function
# immunPathway <- coDataWurdinger$immunologicPathway
# parImmun <- immunPathway$newClust
 
# # co-data 2: a partition based on a list of platelets expressed genes
# plateletsExprGenes <- coDataWurdinger$plateletgenes
# # The genes are grouped into either "NormalGenes" or "Non-overlapGenes"
# is <- intersect(plateletsExprGenes,genesWurdinger)
# im <- match(is, genesWurdinger)
# plateletsGenes <- replicate(length(genesWurdinger),"Non-overlapGenes")
# plateletsGenes[im] <- "NormalGenes"
# plateletsGenes <- as.factor(plateletsGenes)
# parPlateletGenes <- CreatePartition(plateletsGenes)
# 
# # co-data 3: a partition based on chromosomal location. 
# # A list of chromosomal location based on {\tt biomaRt} data bases.
# ChromosomeWur0 <- as.vector(annotationWurdinger$chromosome)
# ChromosomeWur <- ChromosomeWur0
# idC <- which(ChromosomeWur0=="MT" | ChromosomeWur0=="notBiomart" |
#                ChromosomeWur0=="Un")
# ChromosomeWur[idC] <- "notMapped"
# table(ChromosomeWur)
# parChromosome <- CreatePartition(as.factor(ChromosomeWur))
# 
# partitionsWurdinger <- list(immunPathway=parImmun,
#                             plateletsGenes=parPlateletGenes,
#                             chromosome=parChromosome)
# 
# #A list of monotone functions from the corresponding partitions
# monotoneWurdinger <- c(FALSE,FALSE,FALSE)
# 
# # Start ordering and selecting partitions
# optPartitions <- PartitionsSelection(datStdWurdinger, respWurdinger, 
#                                      partitions=partitionsWurdinger,
#                                      monotoneFunctions=monotoneWurdinger)

markvdwiel/GRridge documentation built on May 21, 2019, 12:25 p.m.