Skip to main content
QUICK REVIEW

[Paper Review] Dynamic Feature Scaling for K-Nearest Neighbor Algorithm

Chandrasekaran Anirudh Bhardwaj, Megha Mishra|arXiv (Cornell University)|Nov 13, 2018
Data Mining Algorithms and ApplicationsComputer Science18 references4 citations
TL;DR

This paper proposes a dynamic feature scaling method for the K-Nearest Neighbor (K-NN) algorithm that assigns individual feature weights based on out-of-bag error estimates from multiple decision trees, improving prediction accuracy by adapting feature importance beyond uniform scaling. The approach outperforms standard normalization techniques by learning feature-specific weights through ensemble model performance.

ABSTRACT

Nearest Neighbors Algorithm is a Lazy Learning Algorithm, in which the algorithm tries to approximate the predictions with the help of similar existing vectors in the training dataset. The predictions made by the K-Nearest Neighbors algorithm is based on averaging the target values of the spatial neighbors. The selection process for neighbors in the Hermitian space is done with the help of distance metrics such as Euclidean distance, Minkowski distance, Mahalanobis distance etc. A majority of the metrics such as Euclidean distance are scale variant, meaning that the results could vary for different range of values used for the features. Standard techniques used for the normalization of scaling factors are feature scaling method such as Z-score normalization technique, Min-Max scaling etc. Scaling methods uniformly assign equal weights to all the features, which might result in a non-ideal situation. This paper proposes a novel method to assign weights to individual feature with the help of out of bag errors obtained from constructing multiple decision tree models.

Motivation & Objective

  • To address the limitation of uniform feature scaling in K-NN, where all features are treated equally despite varying predictive importance.
  • To develop a data-driven method for assigning feature weights that reflect individual feature relevance to the target variable.
  • To improve K-NN performance by replacing static normalization with adaptive, model-informed feature scaling.
  • To reduce sensitivity to feature scale variation without relying on fixed normalization techniques like Z-score or Min-Max scaling.

Proposed method

  • The method trains multiple decision trees on bootstrap samples of the training data to compute out-of-bag (OOB) error rates for each feature.
  • Feature importance is derived from the OOB error reduction contributed by each feature across the ensemble of trees.
  • The OOB error-based importance scores are used to assign dynamic weights to features before applying distance metrics in K-NN.
  • Distance computation in K-NN is modified to incorporate these learned feature weights, effectively scaling features according to their predictive power.
  • The final K-NN prediction uses weighted distance metrics, where features with higher importance contribute more to neighbor selection.
  • The approach avoids reliance on global normalization by learning feature-specific scaling from model performance.

Experimental results

Research questions

  • RQ1Can feature weights derived from ensemble models improve K-NN performance compared to uniform scaling?
  • RQ2How does dynamic feature weighting based on OOB errors affect K-NN prediction accuracy?
  • RQ3Does the proposed method reduce sensitivity to feature scale variations in real-world datasets?
  • RQ4Can OOB error estimates reliably guide feature importance for K-NN without requiring labeled validation sets?

Key findings

  • The proposed dynamic feature scaling method significantly improves K-NN prediction accuracy compared to standard normalization techniques like Z-score and Min-Max scaling.
  • Feature weights derived from out-of-bag errors effectively capture predictive relevance, leading to better neighbor selection in distance computation.
  • The method reduces the impact of irrelevant or noisy features by down-weighting them based on their low contribution to model performance.
  • The approach demonstrates robustness to feature scale variations, as it adapts weights per feature rather than applying uniform scaling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.