xMLglmnet: Function to integrate predictor matrix in a supervised manner...

Description Usage Arguments Value Note See Also Examples

View source: R/xMLglmnet.r

Description

xMLglmnet is supposed to integrate predictor matrix in a supervised manner via machine learning algorithm glmnet. It requires three inputs: 1) Gold Standard Positive (GSP) targets; 2) Gold Standard Negative (GSN) targets; 3) a predictor matrix containing genes in rows and predictors in columns, with their predictive scores inside it. It returns an object of class 'pTarget'.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
xMLglmnet(
df_predictor,
GSP,
GSN,
family = c("binomial", "gaussian"),
type.measure = c("auc", "mse"),
nfold = 3,
alphas = seq(0, 1, 0.1),
standardize = TRUE,
lower.limits = -Inf,
verbose = TRUE,
RData.location = "http://galahad.well.ox.ac.uk/bigdata",
guid = NULL,
...
)

Arguments

df_predictor

a data frame containing genes (in rows) and predictors (in columns), with their predictive scores inside it. This data frame must has gene symbols as row names

GSP

a vector containing Gold Standard Positive (GSP)

GSN

a vector containing Gold Standard Negative (GSN)

family

response family type. It can be one of "binomial" for two-class logistic model or "gaussian" for gaussian model

type.measure

loss to use for cross-validation. It can be one of "auc" for two-class logistic model, "mse" for the deviation from the fitted mean to the response using gaussian model

nfold

an integer specifying the number of folds for cross validataion

alphas

a vector specifying a range of alphas. Alpha is an elasticnet mixing parameter, with 0<=alpha<=1. By default, seq(0,1,by-0.1)

standardize

logical specifying whether to standardise the predictor. If yes (by default), the predictor standardised prior to fitting the model. The coefficients are always returned on the original scale

lower.limits

vector of lower limits for each coefficient (by default, '-Inf'; all should be non-positive). A single value provided will apply to every coefficient

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to TRUE for display

RData.location

the characters to tell the location of built-in RData files. See xRDataLoader for details

guid

a valid (5-character) Global Unique IDentifier for an OSF project. See xRDataLoader for details

...

additional parameters. Please refer to 'glmnet::cv.glmnet' for the complete list.

Value

an object of class "pTarget", a list with following components:

Note

none

See Also

xPredictROCR, xPredictCompare, xSymbol2GeneID

Examples

1
2
3
4
5
RData.location <- "http://galahad.well.ox.ac.uk/bigdata"
## Not run: 
pTarget <- xMLglmnet(df_prediction, GSP, GSN)

## End(Not run)

Pi documentation built on Nov. 26, 2020, 2:01 a.m.