localDensity: Computes the local density of points in a data matrix

Description Usage Arguments Value

View source: R/ClusterX.R

Description

This function calculate the local density for each point in the matrix. With a rowise implementation of the pairwise distance calculation, makes the local density estimation faster and memory efficient. A big benifit is the aviliability for big data. Parallel computing is supported for fast calculation. The computation can either be done using a simple summation of the points with the distance cutoff for each observation, or by applying a gaussian kernel scaled by the distance cutoff (more robust for low-density data)

Usage

1
localDensity(data, dc, gaussian = FALSE, ifParallel = FALSE)

Arguments

data

Numeric matrix of data or data frame.

dc

A numeric value specifying the distance cutoff.

gaussian

Logical value decide if a gaussian kernel be used to estimate the density (defaults to TRUE).

ifParallel

A boolean decides if run parallelly

Value

A vector of local density values with index matching the row names of data.


JinmiaoChenLab/ClusterX documentation built on May 7, 2019, 10:52 a.m.