Learn R Programming

MXM (version 0.4.3)

SES: Feature selection algorithm for identifying multiple minimal, statistically-equivalent and equally-predictive feature signatures.

Description

SES algorithm follows a forward-backward filter approach for feature selection in order to provide minimal, highly-predictive, statistically-equivalent, multiple feature subsets of a high dimensional dataset. See also Details.

Usage

SES(target = NULL, dataset = NULL, max_k = 3, threshold = 0.05, test = NULL,
 user_test = NULL, hash = FALSE, hashObject = NULL)

Arguments

target
The class variable. Provide either a string, an integer value, a vector, a factor, an ordered factor or a Surv object. See also Details.
dataset
The data-set; provide either a data frame or a matrix (columns = variables , rows = samples). All variables must be continuous. Alternatively, provide an ExpressionSet (in which case rows are samples and columns are features, see bioconductor for
max_k
The maximum conditioning set to use in the conditional indepedence test (see Details). Integer, default value is 3.
threshold
Threshold (suitable values in [0,1]) for assessing p-values significance. Default value is 0.05.
test
The conditional independence test to use. Default value is NULL. Available conditional independence tests:
  • "testIndFisher": Fisher conditional independence test for continous targets.
  • "testIndLogistic": Conditional Independence Test ba
user_test
A user-defined conditional independence test (provide a closure type object). Default value is NULL. If this is defined, the "test" argument is ignored.
hash
A boolean variable which indicates whether (TRUE) or not (FALSE) to store the statistics calculated during SES execution in a hash-type object. Default value is FALSE. If TRUE a hashObject is produced.
hashObject
A List with the hash objects generated in a previous run of SES. Each time SES runs with "hash=TRUE" it produces a list of hashObjects that can be re-used in order to speed up next runs of SES. Important: the generated hashObjects should be used only

Value

  • The output of the algorithm is an object of the class 'SESoutput' including:
  • selectedVarsThe selected variables, i.e., the signature of the target variable.
  • selectedVarsOrderThe order of the selected variables according to increasing pvalues.
  • queuesA list containing a list (queue) of equivalent features for each variable included in selectedVars. An equivalent signature can be built by selecting a single feature from each queue.
  • signaturesA matrix reporting all equivalent signatures (one signature for each row).
  • hashObjectThe hashObject caching the statistic calculted in the current run.
  • pvaluesFor each feature included in the dataset, this vector reports the strength of its association with the target in the context of all other variables. Particularly, this vector reports the max p-values foudn when the association of each variable with the target is tested against different conditional sets. Lower values indicate higher association.
  • statsThe statistics corresponding to "pvalues" (higher values indicates higher association).
  • max_kThe max_k option used in the current run.
  • thresholdThe threshold option used in the current run.
  • runtimeThe run time of the algorithm. A numeric vector. The first element is the user time, the seond element is the system time and the third element is the elapsed time.
  • summary(x=SESoutput)Summary view of the SESoutput object.
  • plot(object=SESoutput, mode="all")Plots the generated pvalues (using barplot) of the current SESoutput object in comparison to the threshold. Argument mode can be either "all" or "partial" for the first 500 pvalues of the object.

Details

This function implements the Statistically Equivalent Signature (SES) algorithm as presented in "Tsamardinos, Lagani and Pappas, HSCBB 2012" (http://www.mensxmachina.org/publications/discovering-multiple-equivalent-biomarker-signatures/) For faster computations in the internal SES functions, install the suggested package "gRbase". The max_k option: the maximum size of the conditioning set to use in the conditioning independence test. Larger values provide more accurate results, at the cost of higher computational times. When the sample size is small (e.g., <50 samples)="" the="" max_k="" parameter="" should="" be="" <="5," otherwise="" conditional="" independence="" test="" may="" not="" able="" to="" provide="" reliable="" results.="" if="" dataset="" contains="" missing="" (na)="" values,="" they="" will="" automatically="" replaced="" by="" current="" variable="" (column)="" mean="" value="" with="" an="" appropriate="" warning="" user="" after="" execution.="" target="" is="" a="" single="" integer="" or="" string,="" it="" has="" corresponds="" column="" number="" name="" of="" feature="" in="" dataset.="" any="" other="" case="" that="" contained="" 'test'="" argument="" defined="" as="" null="" "auto"="" and="" user_test="" then="" algorithm="" selects="" best="" based="" on="" type="" data.="" particularly:=""
  • if target is a factor, the multinomial logistic test is used
  • if target is a ordered factor, the ordered logit regression is used in the logistic test
  • if target is a numerical vector, the fisher conditional independence test is used
  • if target is a Surv object, the Survival conditional independence test is used
  • Conditional independence test functions to be pass through the user_test argument should have the same signature of the included test. See "?testIndFisher" for an example.

    References

    I. Tsamardinos, V. Lagani and D. Pappas (2012) Discovering multiple, equivalent biomarker signatures. In proceedings of the 7th conference of the Hellenic Society for Computational Biology & Bioinformatics - HSCBB12.

    See Also

    testIndFisher, testIndLogistic, gSquare, censIndLR

    Examples

    Run this code
    set.seed(123)
    #require(gRbase) #for faster computations in the internal functions
    require(hash)
    
    #simulate a dataset with continuous data
    dataset <- matrix(nrow = 1000 , ncol = 300)
    dataset <- apply(dataset, 1:2, function(i) runif(1, 1, 100))
    
    #define a simulated class variable 
    target = 3*dataset[,10] + 2*dataset[,200] + 3*dataset[,20] + runif(1, 0, 1);
    
    #define some simulated equivalences
    dataset[,15] = dataset[,10]
    dataset[1,10] = dataset[1,10] + 0.2
    dataset[,250] = dataset[,200] 
    dataset[,230] = dataset[,200] 
    
    require("hash", quietly = TRUE)
    {
    #run the SES algorithm
    sesObject <- SES(target , dataset , max_k=5 , threshold=0.2 , test="testIndFisher", 
    hash = TRUE, hashObject=NULL);
    #print summary of the SES output
    summary(sesObject);
    #plot the SES output
    plot(sesObject, mode="all");
    #get the queues with the equivalences for each selected variable
    sesObject@queues
    #get the generated signatures
    sesObject@signatures;
    #get the run time
    # > sesObject@runtime;
    # user  system elapsed 
    # 0.35    0.00    0.35
    
    
    #re-run the SES algorithm with the same or different configuration 
    #under the hash-based implementation of retrieving the statistics
    #in the SAME dataset (!important)
    hashObj <- sesObject@hashObject;
    sesObject2 <- SES(target , dataset , max_k=2 , threshold=0.01 , test="testIndFisher",
    hash = TRUE, hashObject=hashObj);
    #retrieve the results: summary, plot, sesObject2@...)
    summary(sesObject2)
    #get the run time
    # > sesObject2@runtime;
    # user  system elapsed
    # 0.01    0.00    0.01
    }

    Run the code above in your browser using DataLab