annotateClustersByMetric: Calculate the cluster ID from the optimal cluster per metric...

View source: R/metricsAnalysis.R

annotateClustersByMetricR Documentation

Calculate the cluster ID from the optimal cluster per metric for each individual. annotateClustersByMetric

Description

Return a named list, where each metric name is linked to a data frame containing the evaluated individuals, their score for the specified metric, and the cluster id in which each individual is classified. This cluster assignment is performed by calculating the optimal k value by evaluome.

Usage

annotateClustersByMetric(df, k.range, bs, seed)

Arguments

df

Input data frame. The first column denotes the identifier of the evaluated individuals. The remaining columns contain the metrics used to evaluate the individuals. Rows with NA values will be ignored.

k.range

Range of k values in which the optimal k will be searched

bs

Bootstrap re-sample param.

seed

Random seed to be used.

Value

A named list resulting from computing the optimal cluster for each metric. Each metric is a name in the named list, and its content is a data frame that includes the individuals, the value for the corresponding metric, and the cluster id in which the individual has been asigned according to the optimal cluster.

Examples

data("ontMetrics")
annotated_clusters=annotateClustersByMetric(ontMetrics, k.range=c(2,3), bs=20, seed=100)
annotated_clusters[['ANOnto']]

neobernad/evaluomeR documentation built on Nov. 12, 2024, 11:29 p.m.