DaMiR.EnsL_Train: Train a Binary Classifier using 'Staking' Learning strategy.

Description Usage Arguments Details Value Author(s) Examples

View source: R/Classif_2_Classes_Training.R

Description

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.

Usage

1
2
3
4
5
6
7
DaMiR.EnsL_Train(
  data,
  classes,
  variables,
  fSample.tr.w = 0.7,
  cl_type = c("RF", "SVM", "LDA", "LR", "NB", "NN", "PLS")
)

Arguments

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 nrow(data) elements. Each element represents the class label for each observation. Two different class labels are allowed. Note. this argument should not be set when 'data' is a SummarizedExperiment object

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")

Details

This function implements the training step of DaMiR.EnsembleLearning2cl function

Value

A list containing:

Author(s)

Mattia Chiesa, Luca Piacentini

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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"))

BioinfoMonzino/DaMiRseq documentation built on Aug. 22, 2021, 3:11 p.m.