DaMiR.EnsL_Test: Test Binary Classifiers

Description Usage Arguments Details Value Author(s) Examples

View source: R/Classif_2_Classes_Test.R

Description

This function tests the models learned by the DaMiR.EnsL_Train function, on a test set

Usage

1
DaMiR.EnsL_Test(data, classes, EnsL_model)

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

EnsL_model

A list with the models trained by DaMiR.EnsL_Train function.

Details

This function implements the test step of DaMiR.EnsembleLearning2cl function

Value

A dataframe containing the predictions on the testset

Author(s)

Mattia Chiesa, Luca Piacentini

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# use example data:
data(selected_features)
data(df)
set.seed(1)
# only 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:
#  Tr_res <- DaMiR.EnsL_Train(
#  selected_features,classes=df$class, fSample.tr.w=0.6, iter=3,
# cl_type=c("RF","LR"))
# DaMiR.EnsembleLearning2cl_Test(selected_features,
#classes=df$class,Tr_res)

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