Abstract
Imputation of missing data is a common application in various classification problems where the feature training matrix has missingness. A widely used solution to this imputation problem is based on the lazy learning technique, $k$-nearest neighbor (kNN) approach. However, most of the previous work on missing data does not take into account the presence of the class label in the classification problem. Also, existing kNN imputation methods use variants of Minkowski distance as a measure of distance, which does not work well with heterogeneous data. In this paper, we propose a novel iterative kNN imputation technique based on class weighted grey distance between the missing datum and all the training data. Grey distance works well in heterogeneous data with missing instances. The distance is weighted by Mutual Information (MI) which is a measure of feature relevance between the features and the class label. This ensures that the imputation of the training data is directed towards improving classification performance. This class weighted grey kNN imputation algorithm demonstrates improved performance when compared to other kNN imputation algorithms, as well as standard imputation algorithms such as MICE and missForest, in imputation and classification problems. These problems are based on simulated scenarios and UCI datasets with various rates of missingness.
Introduction
Missing data presents a significant challenge in the field of machine learning, particularly for classification tasks. Most state-of-the-art algorithms, such as Support Vector Machines (SVM) or Random Forests, require complete datasets for training. While $k$-Nearest Neighbor (kNN) imputation is a popular "lazy learning" strategy to fill these gaps by identifying similar records, it often suffers from two critical limitations. First, standard kNN methods typically ignore the class label during the imputation process, treating feature reconstruction as a task isolated from the ultimate goal of classification. Second, traditional distance metrics like Euclidean or Minkowski distance are poorly suited for heterogeneous datasets containing a mix of categorical and continuous variables, especially when those variables themselves contain missing values.
To address these issues, this paper introduces Class-weighted Grey $k$-Nearest Neighbor (CGKNN). This novel approach integrates class-awareness and Grey Theory to provide a more robust and task-oriented imputation framework.
Methodology
The CGKNN algorithm is built upon three foundational pillars designed to optimize data recovery for classification accuracy:
1. Grey Relational Analysis (GRA)
Unlike standard distance metrics, CGKNN utilizes "Grey distance." Derived from Grey System Theory, this metric is specifically engineered for systems characterized by uncertainty or partially known information. Grey distance provides a normalized similarity score (ranging from 0 to 1) that naturally accommodates both categorical and continuous data types. Crucially, it handles missing instances gracefully during the distance calculation itself, rather than requiring pre-processing.
2. Mutual Information (MI) Weighting
In many real-world datasets, not all features are equally relevant to the target class. CGKNN incorporates Mutual Information (MI) to quantify the relevance between each feature and the class label. Features with higher MI scores are given greater weight during the neighbor selection process. This ensures that the "nearest neighbors" are chosen based on the attributes most likely to influence the final classification, effectively filtering out noise from irrelevant variables.
3. Iterative Refinement
CGKNN employs an iterative process to reach a stable solution. Missing values are initially filled using simple measures of central tendency (means for continuous data, modes for categorical). The algorithm then repeatedly applies the CGKNN logic, updating the missing values in each pass until the data converges. Typically, the algorithm achieves stability within 3 to 5 iterations.
Experimental Design
The performance of CGKNN was evaluated against six established imputation methods, including Multiple Imputation by Chained Equations (MICE) and missForest. Testing was conducted across two primary environments:
- Simulated Scenarios: The authors generated synthetic datasets to model Missing Completely at Random (MCAR) and Missing at Random (MAR) mechanisms. These simulations included "noise" variables to test the efficacy of the MI weighting.
- UCI Benchmarks: Three diverse datasets from the UCI Machine Learning Repository were used: Iris (continuous), Voting (categorical), and Hepatitis (mixed).
Key Results and Discussion
Imputation and Classification Accuracy
CGKNN consistently outperformed baseline methods across varying rates of missingness (5%, 10%, and 20%). In terms of Root Mean Square Error (RMSE), CGKNN achieved the lowest error rates, indicating superior reconstruction of the original data values.
More importantly, the method excelled in downstream Classification Accuracy (CA). When a Naive Bayes classifier was applied to the imputed data, CGKNN-imputed sets yielded significantly higher accuracy. For instance, on a MAR toy dataset with 20% missingness, CGKNN achieved an accuracy of 87.31%, compared to 77.32% for MICE.
Robustness to Noise
A standout feature of CGKNN is its ability to handle irrelevant data. In simulations involving 20 noise variables, the MI weighting successfully assigned near-zero weights to irrelevant features. This allowed the algorithm to maintain high performance where standard kNN methods, which treat all features equally, saw significant degradation.
Conclusion and Future Work
CGKNN represents a significant advancement in imputation for classification, demonstrating that "class-aware" imputation leads to more reliable models. By combining Grey Relational Analysis with Mutual Information weighting, the algorithm provides a robust solution for heterogeneous data and noisy environments.
Future research will focus on optimizing the selection of the $k$ parameter, which currently relies on computationally intensive cross-validation. Additionally, the authors aim to extend the framework to regression problems and explore its theoretical convergence properties more deeply. While highly effective for MCAR and MAR data, addressing Not Missing at Random (NMAR) scenarios remains an open challenge for future iterations of the algorithm.
Summary updated