vkappa. Nearest neighbor rule in weighting measurements for pattern recognition