bdm.dMap: Class density maps

Description Usage Arguments Details Value Examples

View source: R/bdm_dMap.R

Description

Compute the class density maps of a set of classes on the embedding grid. This function returns a fuzzy mapping of the set of classes on the grid cells. The classes can be whatever set of classes of interest and must be given as a vector of point-wise discrete labels (either numeric, string or factor).

Usage

1
bdm.dMap(bdm, threads = 2, type = "SOCK", data = NULL, layer = 1)

Arguments

bdm

A bdm instance as generated by bdm.init().

threads

The number of parallel threads (in principle only limited by hardware resources, i.e. number of cores and available memory)

type

The type of cluster: 'SOCK' (default) for intra-node parallelization, 'MPI' for inter-node parallelization (message passing interface parallel environment).

data

A vector of discret covariates or class labels. The covariate values can be of any factorizable type. By default (data=NULL) the function computes the density maps based on the clustering labels (i.e. equivalent to data=bdm.labels(bdm))

layer

The number of the t-SNE layer (1 by default).

Details

bdm.dMap() computes the join distribution P(V=v_{i},C=c_{j}) where V={v_{1},…,v_{l}} is the discrete covariate and C={c_{1},…, c_{g}} are the grid cells of the paKDE raster. That is, this function recomputes the paKDE but keeping track of the covariate (or class) label of each data-point. This results in a fuzzy distribution of the covariate (class) at each cell.

Usually, figuring out the join distribution P(V=v_{i},C=c_{j}) entails an intensive computation. Thus bdm.dMap() performs the computation and stores the result in a dedicated element named $dMap. Afterwards the class density maps can be visualized with the bdm.dMap.plot() function.

Value

A copy of the input bdm instance with element $dMap, a matrix with a soft clustering of the grid cells.

Examples

1
2
3
4
5
6
# --- load example dataset
bdm.example()
## Not run: 
exMap <- bdm.dMap(exMap, threads = 4)

## End(Not run)

bigMap documentation built on July 8, 2020, 6:41 p.m.