Description Usage Arguments Value Note See Also Examples
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'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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 |
guid |
a valid (5-character) Global Unique IDentifier for an OSF
project. See |
... |
additional parameters. Please refer to 'glmnet::cv.glmnet' for the complete list. |
an object of class "pTarget", a list with following components:
model
: an object of class "cv.glmnet" as a best model
priority
: a data frame of nGene X 5 containing gene
priority information, where nGene is the number of genes in the input
data frame, and the 5 columns are "GS" (either 'GSP', or 'GSN', or
'NEW'), "name" (gene names), "rank" (ranks of the priority scores),
"priority" (priority score; rescaled into the 5-star ratings), and
"description" (gene description)
predictor
: a data frame, which is the same as the input
data frame but inserting an additional column 'GS' in the first column
cvm2alpha
: a data frame of nAlpha X 2 containing mean
cross-validated error, where nAlpha is the number of alpha and the two
columns are "min" (lambda.min) and "1se" (lambda.1se)
nonzero2alpha
: a data frame of nAlpha X 2 containing the
number of non-zero coefficients, where nAlpha is the number of alpha
and the two columns are "min" (lambda.min) and "1se" (lambda.1se)
importance
: a data frame of nPredictor X 1 containing the
predictor importance/coefficient info
performance
: a data frame of 1+nPredictor X 2 containing
the supervised/predictor performance info predictor importance info,
where nPredictor is the number of predictors, two columns are "ROC"
(AUC values) and "Fmax" (F-max values)
gp
: a ggplot object for the ROC curve
call
: the call that produced this result
none
xPredictROCR
, xPredictCompare
,
xSymbol2GeneID
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.