accuracy: Test the robustness of clusters

View source: R/AssessMe.R

accuracyR Documentation

Test the robustness of clusters

Description

This function serves to explore the robustness of clusters of the cluster partition based on enriched genes, unique enriched genes, outlier genes, feature genes as well as, if assessed, shared enriched but differentially expressed genes.

Usage

accuracy(
  accuracy_list = NULL,
  giveassessment = NULL,
  data = NULL,
  cpart = NULL,
  clustsize = NULL,
  crossvali = 50,
  ntree = 200,
  loreg = F,
  set.name = NULL
)

Arguments

accuracy_list

list of accuracy computations/n-fold cross validations, can be utilized in a for loop in order to combine different n-cross-validations for different assessments in one list. Otherwise different n-cross-validations can be combined later to a list which is subjected to the accuracy_plot function.

data

count data (un-normalized) from which cells are sampled for cross validation. If NULL, count data is derived from giveassessment.

cpart

cluster partition. Default = NULL and partition retrieved from giveassessment.

clustsize

cluster size to be included for cross-validation. Default = NULL and cluster size is inferred from giveassessment.

crossvali

n number of subsampling to be done for cross-validation(n fold crossvalidation). Default = 50.

ntree

number of trees to grow for random forest based reclassification. Default = 200.

loreg

logical. If T, perform n-fold crossvalidation based on multionomial logistic regression. Default = F.

set.name

set name of list object for n-fold crossvalidation within accuracy list. Default = NULL.

giveassesment

assessment object from cluster_assessment function.

features

vector of features to be utilized for cross-validation. Default = NULL.

Value

accuracy list with objects/lists for different accuracy computations e.g. for different cluster partitions. Every object representing a list with n-fold crossvalidation objects with fractions of reclassified/re-labelled cells matching the original cluster label with re-classification based on different gene lists derived from giveassessment.

Examples

accuracy_list <- accuracy(giveassessment = assess_seuratRC$Sres.1, data = entero@assays$RNA@counts)
accuracy_list <- accuracy(accuracy_list = accuracy_list,giveassessment = assess_seuratRC$Sres.6, data = entero@assays$RNA@counts)

PatZeis/AssessMe documentation built on Nov. 19, 2022, 6:03 a.m.