filter_dtm: Distance to measure filter

View source: R/filters.R

filter_dtmR Documentation

Distance to measure filter

Description

filter_dtm computes the Distance to measure filter.

Usage

filter_dtm(dist, k, p = 2, ...)

Arguments

dist

The distance matrix.

k

A numeric scalar deciding the number of neighbors to be considered

p

An optional numeric scalar denoting the exponent.

...

Further arguments.

Details

Distance to measure filter function is defined as f(x_i;k) = \frac{1}{k}∑_{j=2}^{k+1} d^p(x_i,x_{(j)})^{1/p}.

Value

A matrix object of filter values.

Examples

tp_data = chicken_generator(1)
tp_dist = dist(tp_data[,-1])
filter_dtm(dist = tp_dist, k=3)

TianshuFeng/SemiMapper documentation built on Sept. 16, 2022, 10:26 p.m.