filter_dtm
computes the Distance to measure filter.
filter_dtm(dist, k, p = 2, ...)
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. |
A matrix object of filter values.
Distance to measure filter function is defined as \(f(x_i;k) = \frac{1}{k}\sum_{j=2}^{k+1} d^p(x_i,x_{(j)})^{1/p}\).
tp_data = chicken_generator(1) tp_dist = dist(tp_data[,-1]) filter_dtm(dist = tp_dist, k=3)