DaMiR.EnsL_Train {DaMiRseq} | R Documentation |
This function learn a meta learner by a 'Stacking' strategy. Users can provide heterogeneous features (other than genomic features) which will be taken into account during classification model building. A 'two-classes' classification task isaddressed.
DaMiR.EnsL_Train( data, classes, variables, fSample.tr.w = 0.7, cl_type = c("RF", "SVM", "LDA", "LR", "NB", "NN", "PLS") )
data |
A SummarizedExperiment object or a data frame/matrix of normalized expression data. Rows and Cols should be observations and features, respectively. |
classes |
A class vector with |
variables |
An optional data frame containing other variables (but without 'class' column). Each column represents a different covariate to be considered in the model |
fSample.tr.w |
Fraction of samples of training set to be used during weight estimation; default is 0.7 |
cl_type |
List of weak classifiers that will compose the meta-learners. "RF", "SVM", "LDA", "LR", "NB", "NN", "PLS" are allowed. Default is c("RF", "LR", "LDA", "NB", "SVM") |
This function implements the training step of DaMiR.EnsembleLearning2cl function
A list containing:
The models of each classifier used to build the Ensemble meta-learner with the median or the best accuracy (over the iteration) for the Ensemble classifier;
the weights associated to each weak classifier;
Mattia Chiesa, Luca Piacentini
# use example data: data(selected_features) data(df) set.seed(1) # For the example: # speed up the process setting a low 'iter' argument value; # for real data set use default 'iter' value (i.e. 100) or higher: # Classification_res <- DaMiR.EnsL_Train( # selected_features,classes=df$class, fSample.tr.w=0.6, iter=3, # cl_type=c("RF","LR"))