In the field of Case-Based Reasoning (CBR), the standard approach to solving new problems involves retrieving and adapting similar past cases. While k-Nearest Neighbour (k-NN) retrieval is highly effective in data-rich environments, it often falters when faced with "sparse" case bases—scenarios where examples are infrequent and widely distributed. Researchers Brian Knight and Fei Ling Woon address this limitation by introducing a novel framework that bridges the gap between simple retrieval and complex adaptation through the use of solution-space metrics.
The Challenge of Sparse Categorical Data
Traditional CBR systems typically rely on problem-space similarity to select a solution. However, when data is sparse, the nearest neighbors might be significantly different from the target problem. For continuous numerical data, mathematicians have long employed Shepard’s Interpolation to "fill in the gaps." For instance, if we know the temperature at two points, we can estimate the temperature at a point in between.
Categorical (nominal) data, however, lacks this inherent mathematical structure. If a system only knows about "Species A" and "Species C," a standard k-NN algorithm is forced to choose one or the other, even if the target problem logically falls into a middle category like "Species B."
The Generalised Shepard Nearest Neighbour (GSNN) Algorithm
The authors propose the Generalised Shepard Nearest Neighbour (GSNN) algorithm to enable interpolation within categorical datasets. The core innovation lies in an error function, $I(y)$, which incorporates two distinct metrics:
- Problem-space distance ($d_x$): Measuring the similarity between the new input and stored cases.
- Solution-space distance ($d_y$): Quantifying the "difference" between possible answers.
Instead of a simple majority vote among neighbors, GSNN identifies the solution $y$ that minimizes the total weighted error across the $k$ nearest neighbors. To apply this to nominal values, the authors define distances between classes based on their characteristics.
As shown in the Iris dataset example (Figure 3), defining these distances allows the algorithm to understand the relationship between categories—recognizing, for example, that Versicolour sits mathematically between Setosa and Virginica. This enables the system to predict a "middle" category even if that specific category is not the most frequent neighbor.
Experimental Evaluation
The researchers evaluated GSNN using both the classic Iris benchmark and synthetic sparse datasets. The synthetic data consisted of varying densities (100, 400, and 900 cases) with both regular and random structures. A complex trigonometric function was used to generate 21 distinct nominal values, creating a challenging environment for testing interpolation capabilities.
Key Results and Performance
The study compared GSNN against standard k-NN and Distance-Weighted Nearest Neighbour (DWNN). The results consistently demonstrated GSNN's superiority, particularly as the case base became more disorganized or sparse.
As illustrated in Figure 1, for a random case base of 400 samples with $k=2$, GSNN achieved an error score of 506, significantly outperforming k-NN (643) and DWNN (573). The data also highlights that GSNN performs optimally when $k > 1$, confirming that interpolating across a neighborhood is more effective than relying on a single closest match.
Conclusion and Future Work
The introduction of solution-space metrics transforms categorical data from "all or nothing" choices into a nuanced mathematical landscape. By allowing for interpolation, GSNN provides a robust framework for reasoning in sparse environments where traditional methods fail.
The primary requirement for this approach is a meaningful solution-space metric, which may be subjective in certain domains. Future research will explore methods for automatically determining these metrics and applying GSNN to optimize case base selection and numerical modeling where data collection is costly.
Summary updated