View source: R/featureSelection.R
featureSelection | R Documentation |
featureSelection function calculates the optimal order of DEGs to achieve the best result in the posterior machine learning process by using mRMR algorithm or Random Forest. Furthermore, the ranking is returned and can be used as input of the parameter vars_selected in the machine learning functions.
featureSelection( data, labels, vars_selected, mode = "mrmr", disease = "", maxGenes = ncol(data) )
data |
The data parameter is an expression matrix or data.frame that contains the genes in the columns and the samples in the rows. |
labels |
A vector or factor that contains the labels for each samples in data parameter. |
vars_selected |
The genes selected to use in the feature selection process. It can be the final DEGs extracted with the function |
mode |
The algorithm used to calculate the genes ranking. The possibilities are three: mrmr, rf and da. |
disease |
The name of a disease in order to calculate the Disease Association ranking by using the DEGs indicated in the vars_selected parameter. |
maxGenes |
Integer that indicated the maximum number of genes to be returned. |
A vector that contains the ranking of genes.
dir <- system.file("extdata", package="KnowSeq") load(paste(dir,"/expressionExample.RData",sep = "")) featureRanking <- featureSelection(t(DEGsMatrix),labels,rownames(DEGsMatrix),mode='mrmr')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.