dist.fun.inverse: Inverse exponential distance functions for topological k-NN classifier
Description
The function is used as distance-dependent weight \(w\) for k-NN voting.
Usage
dist.fun.inverse(x, sigma = 1.1)
Value
Distance-dependent weight.
Arguments
- x
Distance or numeric
vector or matrix of distances.
- sigma
Maximum distance to be considered. Default is 1.1.
Details
The function returns 1.0 for \(x = 0\), 0.0 for \(x \ge \sigma\) and
$$1 / (x+1)^(1/sigma)$$
for \(0 < x < \sigma\).