getClusterDensity: Obtain the mean density of each cluster.

View source: R/AssignMutations.R

getClusterDensityR Documentation

Obtain the mean density of each cluster.

Description

This function takes the cluster_locations and for each cluster it walks from the cluster peak along CCF space until the median density drops below the supplied minimum in both directions. After obtaining the CCF space that a cluster takes up we calculate the mean density in that space. Finally across all cluster densities we normalise to obtain the fraction of total density that each cluster represents

Usage

getClusterDensity(clustering_density, cluster_locations,
  min.window.density)

Arguments

clustering_density

Posterior density estimate of where clusters are

cluster_locations

Estimated cluster locations within the density

min.window.density

Minimum stepsize used

Value

A vector with for each cluster the fraction of density

Author(s)

sd11, dw9


Wedge-Oxford/dpclust documentation built on July 6, 2024, 2:02 p.m.