Improved shadow set based neighborhood density minimum uncertainty sample selection method
By improving the neighborhood density method of the shadow set, combining K-nearest neighbor counting and Gaussian kernel density estimation, and optimizing sample selection, the problem of redundant samples in noisy datasets is solved, thereby improving the training efficiency and generalization performance of the classifier.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTH CHINA UNIV OF WATER RESOURCES & ELECTRIC POWER
- Filing Date
- 2026-04-28
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to effectively remove redundant samples when processing noisy datasets, leading to low classifier efficiency and impacting the model's generalization ability and stability.
We employ a neighborhood density minimum uncertainty sample selection method based on an improved shadow set. By calculating the neighborhood density, fusing K-nearest neighbor counts and Gaussian kernel density estimation, and combining it with an adjustable balance factor optimization algorithm, we divide the dataset into core samples and boundary samples, and retain the boundary samples to train the classifier.
It effectively captures the local clustering and sparse distribution of samples in the feature space, optimizes the neighborhood density threshold, accurately separates key samples that form the classification decision boundary, improves the training efficiency and generalization performance of the classifier, and reduces the demand for computing resources.
Smart Images

Figure CN122432613A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data preprocessing technology, and in particular to a method for selecting samples with minimum uncertainty in neighborhood density based on improved shadow sets. Background Technology
[0002] In the era of big data, massive amounts of data provide abundant resources for training machine learning models, but also place a huge burden on data processing. Faced with large-scale datasets, models such as classifiers not only face the problem of significantly reduced computational efficiency, but are also more susceptible to uncertainties such as noise interference, information redundancy, and blurred data distribution boundaries or class boundaries. These factors work together to impair the model's generalization ability and stability, leading to overfitting and decision boundary shifts.
[0003] To improve data quality, reduce training overhead, and optimize model performance, sample selection is widely used as a key data preprocessing strategy. Its core objective is to select the most representative samples and eliminate redundant and noisy data, thereby constructing a refined, high-quality training set and ultimately improving computational efficiency and classification accuracy. Current sample selection methods mainly include schemes based on sampling, clustering, density analysis, or hybrid strategies. Among these, sampling-based methods are widely used due to their simplicity and practicality, but their inherent randomness severely limits their ability to consistently capture high-quality samples. To reduce this arbitrariness, researchers have attempted to integrate clustering methods. However, while traditional clustering methods based on similarity partitioning help capture data structure, effectively balancing the influence weights of different cluster centers on the formation of the final decision boundary and properly managing related hyperparameters remain significant challenges in practical applications. With the development of fuzzy set theory, the concept of data membership has been introduced into sample selection, giving rise to some new methods aimed at addressing data uncertainty. Nevertheless, if the control of uncertainties such as boundary ambiguity is inadequate—for example, if the membership definition or utilization is imprecise—these methods still struggle to avoid model overfitting or sample redundancy, ultimately affecting the model's accuracy and stability. Summary of the Invention
[0004] In view of this, the present invention proposes a neighborhood density minimum uncertainty sample selection method based on improved shadow sets to solve the problem of low classifier efficiency caused by redundant samples in noisy datasets in the prior art.
[0005] The specific technical solution of this invention is as follows: The improved shadow set neighborhood density minimum uncertainty sample selection method includes: calculating the neighborhood density for each sample in the dataset, which integrates K-nearest neighbor counts and Gaussian kernel density estimation to capture the local clustering and sparse distribution of samples in the feature space; applying an improved shadow set balance factor optimization algorithm to determine the optimal threshold by establishing an objective function and minimizing the function, where the objective function quantifies the information loss of neighborhood density during the partitioning process, and an adjustable balance factor is introduced to balance the loss between certain and uncertain regions; partitioning the dataset into core samples and boundary samples based on the optimal threshold, with core samples removed and boundary samples retained; and training a classifier model using the retained boundary samples.
[0006] Specifically, calculating the neighborhood density includes: calculating the K nearest neighbor count for each sample, which is obtained by determining the K nearest neighbor set of the sample and checking the mutual K nearest neighbor relationships to reflect how tightly the samples are clustered within the cluster; calculating the Gaussian kernel density estimate for each sample, which uses a Gaussian kernel function, where the bandwidth parameter is based on the distance of the sample to its K nearest neighbor and is normalized to emphasize the relative density; and adding and normalizing the K nearest neighbor count and the Gaussian kernel density estimate to obtain the normalized neighborhood density matrix.
[0007] Specifically, calculating the K nearest neighbor count includes: for each sample, determining the set of its K nearest neighbors based on Euclidean distance; counting the number of mutual K nearest neighbors of a sample by checking whether sample pairs are each other's K nearest neighbors; this number is used to quantify the density of samples in local regions and to identify high-density clusters and sparse regions.
[0008] Specifically, calculating the Gaussian kernel density estimate includes: using a Gaussian kernel function, the form of which is based on the Euclidean distance between samples; setting the bandwidth parameter to the distance from a sample to its Kth nearest neighbor to achieve local adaptability; calculating the local kernel density estimate for each sample, summing only its K nearest neighbors; and normalizing the estimate to emphasize the relative density differences between samples.
[0009] Specifically, optimizing the optimal threshold includes: establishing an improved objective function for the shadow set, which includes a first term and a second term. The first term quantifies the information loss eliminated by increasing high-neighbor density samples to 1 and decreasing low-neighbor density samples to 0, while the second term quantifies the cumulative uncertainty retained within the shadow region. An adjustable balance factor is introduced to control the trade-off between the first and second terms. The optimal threshold is determined by minimizing this objective function, thereby achieving dynamic optimization of the three-branch partitioning of neighborhood density.
[0010] Specifically, the balance factor, as an adjustable parameter, controls the balance between information loss in the defined region and fuzziness preservation in the uncertain region by adjusting its value; adjusting the balance factor reduces membership loss and achieves a fuzzy balance state in the shadow set mapping process.
[0011] Specifically, partitioning the dataset includes: dividing the neighborhood density into groups with a density greater than 100%. Samples with high density are identified as core dense regions, their neighborhood density is mapped to 1, and they are removed; samples with a neighborhood density less than 1 are removed. The samples are identified as sparse boundary region samples, and their neighborhood density is mapped to 0 and retained; samples with neighborhood density within the optimal threshold range are regarded as fuzzy region samples, and their neighborhood density remains unchanged and is retained; this division is based on the property that neighborhood density maintains the core-boundary structure.
[0012] Specifically, the method further includes: randomly splitting the dataset into a training subset and a test subset before calculating the neighborhood density; training an initial classifier model using the training subset and evaluating performance metrics based on the test subset; and adjusting the balancing factor and recalculating the optimal threshold and split if the number of boundary samples is inappropriate after the sample split.
[0013] Specifically, the neighborhood density of all samples in the dataset constitutes a neighborhood density matrix, which is normalized to the range of 0 to 1 to replace the membership matrix of the traditional fuzzy set. This normalization enables the neighborhood density to be used to construct the three-branch mapping of the shadow set and maintains the comparability of the spatial location information of the samples.
[0014] Specifically, training a classifier using the reserved boundary samples includes: training a new classifier model based on the boundary sample dataset; evaluating the model's performance metrics on a test subset; and comparing the performance with the initial model to verify the effectiveness of the sample selection.
[0015] The beneficial effects of this invention are as follows: 1. By fusing neighbor-to-neighbor counting and Gaussian kernel density estimation, the local clustering and sparsity of samples in the feature space are effectively captured, overcoming the limitations of traditional fuzzy membership in representing spatial location information of samples and improving the accuracy of data quality assessment.
[0016] 2. An adjustable balance factor is introduced to improve the objective function, breaking through the traditional fixed threshold limitation of shadow sets, realizing adaptive optimization of the neighborhood density three-segment threshold, minimizing information loss in the partitioning process, and establishing flexible boundaries to handle uncertain data.
[0017] 3. By combining neighborhood density measurement and improved shadow set mechanism, a minimum uncertainty sample selection algorithm is constructed. Based on the data distribution characteristics, the optimal splitting threshold is identified, and low-density boundary samples that are crucial to the formation of the classification decision boundary are accurately separated. At the same time, redundant high-density core samples are removed, thereby improving the training efficiency and generalization performance of the classifier.
[0018] 4. By optimizing the shadow set mapping process, a fuzzy balance is achieved, balancing the loss of information in deterministic regions with the preservation of fuzziness in uncertain regions. This improves the adaptability to noisy data and ensures the stability of the algorithm in complex datasets.
[0019] 5. It accurately extracts boundary data and retains key decision elements, significantly reducing the number of training samples and computational resource requirements while maintaining model performance. It is suitable for demanding scenarios such as medical diagnosis and financial risk assessment. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a visual flowchart of the Neighborhood Density Minimum Uncertainty Sample Selection (NDMUSS) algorithm of the present invention, wherein (a) shows the original data; (b) shows the neighborhood density matrix D of each training sample in the 75% training subset; and (c) shows the determination of the optimal threshold. (d) demonstrates the iterative process; (e) shows the process of dividing the dataset into boundary samples and core samples; in (e), the D value is greater than... The sample points were identified as core data and removed, while those with a D value lower than [a certain value] were removed. The samples are preserved as boundary data; (f) shows the decision boundary obtained by training a Gaussian kernel SVM on 75% of the training set; in contrast, (g) and (h) show the decision boundaries generated by Gaussian kernel SVM models trained on datasets extracted from the original shadow set and the improved shadow set, respectively. Detailed Implementation
[0022] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0023] This invention proposes a neighborhood density-minimum uncertainty sample selection method based on improved shadow sets. Its core objective is to address the common problem of redundant samples in noisy datasets by employing an innovative sample selection mechanism to accurately identify and retain sparse boundary samples crucial to the final classifier's performance, while efficiently eliminating redundant samples. This significantly improves the classifier's training efficiency and generalization performance, while reducing computational and storage overhead. This method is particularly suitable for applications with high requirements for data quality and computational efficiency, such as medical diagnosis and financial risk assessment.
[0024] In simple terms, this invention calculates the K nearest neighbor number and Gaussian kernel density estimate for each sample, and uses their sum to construct the K-neighborhood density matrix. Subsequently, the membership degree in the shadow set is replaced with the neighborhood density, and an improved shadow set-based uncertainty balance optimization algorithm is applied to determine the optimal threshold. Greater than The sample size was defined as core data, while the sample size below that was defined as core data. The samples are considered boundary data. Finally, these boundary data are extracted to form a refined dataset, which is used to train the classifier.
[0025] The core of this invention lies in: 1. Introducing Neighborhood Density to Replace Traditional Membership: A neighborhood density metric that integrates K-Nearest Neighbor (KMNN) counting with Gaussian kernel density estimation (GKDE) is proposed. This metric can more effectively capture the local clustering and sparse distribution of samples in the feature space, overcoming the limitations of traditional fuzzy membership in characterizing the criticality of sample spatial location information.
[0026] 2. Improved Shadow Set Balancing Factor Optimization Threshold: Breaking through the limitations of traditional fixed thresholds for shadow sets, an adjustable balancing factor is introduced to establish an improved objective function for shadow sets, achieving dynamic optimization of the three-branch partitioning threshold for neighborhood density. This optimization process minimizes the information loss of neighborhood density during partitioning (i.e., a generalization of "membership loss"), establishing a flexible and adaptive boundary between core data and boundary data.
[0027] 3. A neighborhood density minimum uncertainty sample selection framework is proposed: The neighborhood density metric mentioned above is combined with an improved shadow set threshold optimization mechanism to construct a complete neighborhood density minimum uncertainty sample selection algorithm (NDMUSS). This algorithm can efficiently identify the optimal splitting threshold based on the actual distribution of the data, accurately separate low-density (sparse) boundary samples that are crucial to the formation of the classification decision boundary, and at the same time remove redundant high-density core samples.
[0028] Specifically, in this invention, the shadow set is constructed from a fuzzy set through a fuzzy-coarse transformation, aiming to handle higher levels of uncertainty than traditional fuzzy sets. It approximates fuzziness by dividing fuzzy membership degrees into three distinct regions: a definite non-membership region, a shadow region, and a definite membership region. In this three-branch partition, membership values below a lower threshold α are reduced to 0, membership values above a higher threshold β are increased to 1, and values within the interval [α, β] constitute the shadow region representing uncertainty. The uncertainty in the shadow set is quantified by the number of uncertain instances within the shadow region. For a given fuzzy set, the shadow thresholds α and β determine the structure of the shadow set and are calculated by optimizing the following objective function regarding the change in uncertainty: (1) The change in uncertainty, V(α, β), is composed of the decrease in uncertainty within the defined region and the increase in uncertainty within the uncertain shaded region. By balancing the trade-off between the decrease and increase in uncertainty, V(α, β) can also be viewed as a measure of the fuzzy membership loss during the construction of the shadow set. The optimal threshold parameters α and β are determined by minimizing the membership loss, thereby achieving an appropriate balance between the uncertain shaded region and the defined region.
[0029] (2) The concept of K-neighbor density integrates K-nearest neighbors (KMNN) and Gaussian kernel density estimation (GKDE). To establish this concept, we first introduce the relevant concepts of K-nearest neighbors (KMNN). Given a dataset... For any data point The number of its K nearest neighbors is defined as: (3) Among them, dist Point and The Euclidean distance between them, and dist Indicates from point The Euclidean distance to its Kth nearest neighbor. Based on the definition of K nearest neighbors, the concept of K mutual nearest neighbors can be derived. Specifically, for any two data points in set X... and ,if exist Among the K nearest neighbors, at the same time Also there If two points are among each other's K nearest neighbors, then these two points are considered K mutual nearest neighbors. The number of K mutual nearest neighbors can be represented using set notation: (4) in Point The set of K nearest neighbors. The number of K nearest neighbors effectively reflects the density of clustering within a cluster, enabling the identification of high-density clusters and visually revealing distribution characteristics and density variations between sparse and dense regions. Based on this, during sample selection, points in high-density regions that contribute little to classification information and thus have minimal impact on the classification hyperplane can be detected.
[0030] Kernel density estimation (KDE) is a widely used nonparametric probability density estimation method and a fundamental tool in data analysis. This study uses KDE to evaluate the distribution density of training samples, employing a Gaussian kernel due to its favorable mathematical properties and ability to preserve the original distribution of the data. When multiple samples share the same nearest neighbor, the Gaussian kernel assigns higher density values to samples with the largest neighborhood kernel density, thereby improving the detection of dense regions. This makes it possible to effectively identify and remove samples that contribute little to classification. The Gaussian kernel function and the corresponding Gaussian kernel density estimation (GKDE) formula are as follows: (5) (6) in express The norm of , where d represents the dimension of the data sample. Parameter It is a bandwidth parameter, and It is a d-dimensional scaling factor. To introduce local adaptability, the bandwidth is defined as... ,in It is the distance from point x to its Kth nearest neighbor: (7) For each The summation is limited to its K nearest neighbors, thus yielding: (8) However, in actual calculations and implementations, data is usually normalized, resulting in features having local unit variance. Therefore, this invention employs unit bandwidth. Furthermore, to ensure consistency when using local K-nearest neighbors instead of global nearest neighbors, the same K value is used for all points. Under these assumptions, the formula simplifies to: (9) To emphasize the comparison of relative density rather than absolute density values, the final Gaussian kernel density estimation function is expressed as: (10) in Point Its Kth nearest neighbor The Euclidean distance between them.
[0031] Finally, by combining and A new K-neighborhood density is obtained. The formula is as follows: (11) In classification tasks, key samples—those that significantly influence decisions during training—directly shape the model's decision boundary. Empirical studies show that dense samples near class centers rarely contain key instances, while sparse samples near class boundaries are more likely to be key samples. This is because key samples are primarily located in inter-class transition regions, which typically exhibit lower neighborhood density. Therefore, by calculating sample neighborhood density and prioritizing low-density points, potential key samples can be effectively identified, thereby improving training efficiency and the classifier's generalization ability.
[0032] For heterogeneous datasets, shadow set models have been widely used to manage uncertainty. The neighborhood density fuzzy balance method builds upon this framework, aiming to overcome the limitations of membership in representing fuzziness. Compared to traditional shadow sets, this algorithm uses only a single threshold. To divide the region. In a fuzzy set, membership degrees below a threshold Samples above the threshold are mapped to 0. The samples are mapped to 1, while those in the interval are mapped to 1. Samples within this range are then assigned to the shaded region, representing uncertainty. Therefore, determining this optimal threshold... Constructing the shadow set is crucial. Pedrycz proposes an optimization method based on fuzzy balance to achieve an overall equilibrium between the increase and decrease of membership degrees, thereby minimizing... The value obtained from this. Considered the optimal threshold To further improve the applicability of shadow sets to classifying uncertain data, a parameter is introduced. Let's rephrase the objective function: (12) The first term of the objective function quantifies the membership loss for the defined region, while the second term captures the membership loss for the uncertain region. Parameters It serves as a balancing factor to weigh these two parts of the loss.
[0033] In cluster analysis, neighborhood density describes the degree to which a point is concentrated within a specific region. A higher neighborhood density value indicates a greater likelihood that a point belongs to a particular category. Using equation (11), the K-neighborhood density of each point is calculated. The neighborhood densities of all samples in the dataset constitute a neighborhood density matrix. Then, this matrix is normalized to the range [0, 1] to replace the membership matrix of the fuzzy set, thus enabling the mapping through three branches. To construct the shadow set, where It is a set of density matrices. This represents the three-branch mapping relationship of the density matrix. It is the threshold for three-part segmentation.
[0034] Theorem 1: Neighborhood density preserves core-boundary structure. Let... Indicates the traditional degree of membership. Let represent its normalized neighborhood density. Then there exists a monotonic mapping. , making .
[0035] Proof: Assume the dataset contains three classes of samples: core samples Boundary samples and noise samples According to the definition of membership degree in equation (12), we have: , , .
[0036] Regarding neighborhood density : Core samples: The samples in the sample have many nearest neighbors and high kernel density, therefore .
[0037] Boundary samples: The samples in the sample have fewer mutual neighbors (because samples from different classes do not recognize each other), resulting in a lower density. The value is relatively small.
[0038] Noise sample: The samples in the sample showed low values in both aspects, therefore .
[0039] Therefore, there exists a monotonic mapping. , making Proof complete.
[0040] Theorem 2: Asymptotic equivalence of optimization problems. Let... Let V(ω) be the optimal solution to the primal optimization problem, and and set This is the optimal solution to the modified problem, and Under the condition of consistent neighborhood density estimation, as the sample size n → ∞, we have .
[0041] Proof: Assume the sample They are independent and identically distributed, and let the empirical distribution function be... According to the objective function in equation (12), by the law of large numbers, when hour: (13) for According to Theorem 1, and Since they are identically distributed, we have: (14) Therefore, the minimizers of the two objective functions converge to the same value: when hour: (15) Theorem 3: Consistency of Three-Branch Decisions. Under the condition of consistent decision risk, the three-branch mapping is equivalent to threshold-based mapping. The three decisions.
[0042] Proof: Three-branch mapping The definition of is: ,if (Boundary area).
[0043] ,if (Core area).
[0044] ,if (Fuzzy area).
[0045] Let the loss matrix of the three-way decision be: (16) The rows represent the true state (P: core, N: boundary, U: uncertainty), and the columns represent the decisions.
[0046] The optimal threshold obtained by minimizing Bayesian risk satisfy: (17) For neighborhood density, since It better reflects the true information value of the sample, and the above ratio is closer to the theoretical optimal value, thus proving the point.
[0047] Based on this mapping, the following neighborhood density fuzzy balance optimization method is proposed to select the threshold used to partition the density matrix: (18) In this restated objective function, the first term Quantification was achieved by using dense core samples (with high density) The membership degree of ) is increased to 1 and the sparse boundary samples (with low membership degree) are also improved. The total "loss" or uncertainty eliminated by reducing the membership degree of ) to 0. (Second term) The cumulative uncertainty retained within the shaded area is measured. Balance factor. This controls the trade-off between information loss in defined regions and ambiguity preservation in uncertain regions. Minimize The threshold for identifying the optimal balance trade-off This allows for the division of data into the most informative segments.
[0048] Determining the optimal threshold Subsequently, the data distribution was defined and processed as follows: Core dense area: density value greater than The data points were identified as core dense regions of a specific category. Within these regions, their density was increased to 1 using a mapping function, indicating a high degree of certainty in their category affiliation.
[0049] Fuzzy region: Density values are located in the interval Data points are treated as fuzzy regions. During the mapping process, their neighborhood density remains unchanged to reflect the fuzziness of their category affiliation.
[0050] Sparse boundary region: density value less than The data points are defined as sparse boundary regions. Their neighborhood density is mapped to 0, indicating that these points are far from the class core and are more likely to be located at the class boundary.
[0051] The core idea of the above formula is to achieve a fuzzy equilibrium state by optimizing the mapping process. Specifically, when the interval The threshold is considered optimal when the change in the internal fuzzy balance is minimized. Data points located in the core dense region have minimal impact on the decision boundary and are considered core data, thus being removed. In contrast, data points located in fuzzy regions and sparse boundary regions are considered boundary data and are retained.
[0052] Consider a given threshold Fuzzy set This threshold divides the fuzzy set into three regions: sparse regions. Shaded areas and dense areas Meanwhile, by further introducing a balance factor... The membership loss can be calculated using the two objective functions defined in equations (1) and (12) of the shadow set framework: ; ; It can be observed that the introduction of a balance factor Subsequently, the new shadow set formula achieves a lower membership loss. Furthermore, by adjusting... The value of can further reduce the membership loss, thereby improving the robustness of the partitioning process.
[0053] The process of the Neighborhood Density Minimum Uncertainty Sample Selection (NDMUSS) algorithm can be described as follows: Algorithm 1: To illustrate the algorithm, Figure 1 This application demonstrates its application in support vector machines. It generates a two-dimensional Gaussian distributed synthetic dataset containing 1000 samples per class. Features on the x and y axes are normalized to the [0, 1] interval.
[0054] By comparison Figure 1 (g) and Figure 1 (h) It can be observed that the Gaussian kernel SVM model trained using the boundary data selected by the method in this application performs similarly to the SVM model trained using 75% of the data. Although the decision boundaries obtained before and after the improvement of the shadow set are largely the same, the improved shadow set shows a significant advantage in accurately identifying and extracting boundary samples. The core advantage of this method lies in its ability to accurately extract boundary data, thereby preserving the key support vectors that determine the Gaussian kernel decision boundary. Experimental results further show that the boundary data retention rate of the traditional shadow set is 27%, while that of the improved shadow set is only 15%. Notably, when trained using only these 15% of the boundary samples and evaluated on the test set, the decision boundary generated by this method is almost identical to that obtained using 75% of the training data. This indicates that the proposed method significantly improves training efficiency without affecting model performance.
[0055] The beneficial effects of this invention are as follows: 1. Introduce an improved shadow set balance factor. This method enables dynamic adjustment of region division by partitioning the data. It overcomes the limitations of traditional shadow sets with fixed thresholds, establishing flexible boundaries between core and boundary data.
[0056] 2. By replacing the membership degree in the shadow set with neighborhood density, a minimum uncertainty balance method is proposed to integrate the improved shadow set and neighborhood density. This method can efficiently identify the optimal threshold based on the actual distribution of the sample data, thereby achieving effective data partitioning.
[0057] 3. The minimum uncertainty sample selection method based on the improved shadow set not only improves the quality of training samples, but also improves classification accuracy and computational efficiency, making it very suitable for large-scale classification tasks.
[0058] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for selecting samples with minimum uncertainty in neighborhood density based on improved shadow sets, characterized in that, include: For each sample in the dataset, a neighborhood density is calculated, which integrates K-nearest neighbor counts and Gaussian kernel density estimation to capture the local clustering and sparsity of the samples in the feature space. An improved shadow set balance factor optimization algorithm is applied, which determines the optimal threshold by establishing an objective function and minimizing the function. The objective function quantifies the information loss of neighborhood density during the partitioning process, and an adjustable balance factor is introduced to weigh the loss between certain and uncertain regions. Based on the optimal threshold, the dataset is divided into core samples and boundary samples, with core samples removed and boundary samples retained. The classifier model is trained using reserved boundary samples.
2. The neighborhood density minimum uncertainty sample selection method based on improved shadow sets as described in claim 1, characterized in that, Calculating the neighborhood density involves: calculating the K nearest neighbor count for each sample, which is obtained by determining the K nearest neighbor set of the sample and checking the mutual K nearest neighbor relationships to reflect how tightly the samples are clustered within the cluster; calculating the Gaussian kernel density estimate for each sample, which uses a Gaussian kernel function where the bandwidth parameter is based on the distance from the sample to its K nearest neighbor and is normalized to emphasize the relative density; and adding and normalizing the K nearest neighbor count and the Gaussian kernel density estimate to obtain the normalized neighborhood density matrix.
3. The neighborhood density minimum uncertainty sample selection method based on improved shadow sets as described in claim 2, characterized in that, The calculation of the K nearest neighbor count specifically includes: for each sample, determining the set of its K nearest neighbors based on Euclidean distance; counting the number of mutual K nearest neighbors of a sample by checking whether sample pairs are each other's K nearest neighbors; this number is used to quantify the density of samples in a local region and to identify high-density clusters and sparse regions.
4. The neighborhood density minimum uncertainty sample selection method based on improved shadow sets as described in claim 2, characterized in that, The calculation of Gaussian kernel density estimation specifically includes: using a Gaussian kernel function, the form of which is based on the Euclidean distance between samples; setting the bandwidth parameter to the distance from a sample to its Kth nearest neighbor to achieve local adaptability; calculating the local kernel density estimate for each sample, summing only its K nearest neighbors; and normalizing the estimate to emphasize the relative density differences between samples.
5. The method for selecting samples with minimum uncertainty in neighborhood density based on improved shadow sets as described in claim 1, characterized in that, Optimizing the optimal threshold involves: establishing an improved objective function for the shadow set, which includes a first term and a second term. The first term quantifies the information loss eliminated by increasing high-neighbor density samples to 1 and decreasing low-neighbor density samples to 0, while the second term quantifies the cumulative uncertainty retained within the shadow region. An adjustable balance factor is introduced to control the trade-off between the first and second terms. The optimal threshold is determined by minimizing this objective function, thereby achieving dynamic optimization of the three-branch partitioning of neighborhood density.
6. The neighborhood density minimum uncertainty sample selection method based on improved shadow sets as described in claim 5, characterized in that, The balance factor, as an adjustable parameter, controls the balance between information loss in the defined region and fuzziness preservation in the uncertain region by adjusting its value; adjusting the balance factor reduces membership loss and achieves a fuzzy balance state in the shadow set mapping process.
7. The neighborhood density minimum uncertainty sample selection method based on improved shadow sets as described in claim 1, characterized in that, The dataset partitioning process includes: identifying samples with neighborhood density greater than the optimal threshold as core dense region samples, mapping their neighborhood density to 1, and removing them; identifying samples with neighborhood density less than the optimal threshold as sparse boundary region samples, mapping their neighborhood density to 0, and retaining them; and treating samples with neighborhood density within the optimal threshold range as fuzzy region samples, keeping their neighborhood density unchanged, and retaining them. This partitioning is based on the property that neighborhood density preserves the core-boundary structure.
8. The method for selecting samples with minimum uncertainty in neighborhood density based on improved shadow sets as described in claim 1, characterized in that, The method further includes: randomly dividing the dataset into a training subset and a test subset before calculating the neighborhood density; training an initial classifier model using the training subset and evaluating performance metrics based on the test subset; and adjusting the balance factor and recalculating the optimal threshold and partitioning if the number of boundary samples is inappropriate after the sample partitioning.
9. The neighborhood density minimum uncertainty sample selection method based on improved shadow sets as described in claim 1, characterized in that, The neighborhood density of all samples in the dataset constitutes a neighborhood density matrix. The neighborhood density matrix is normalized to the range of 0 to 1 to replace the membership matrix of the traditional shadow set. This normalization enables the neighborhood density to be used to construct the three-branch mapping of the shadow set and maintains the comparability of the spatial location information of the samples.
10. The method for selecting samples with minimum uncertainty in neighborhood density based on improved shadow sets as described in claim 1, characterized in that, Training a classifier using reserved boundary samples involves: training a new classifier model based on the boundary sample dataset; evaluating the model's performance metrics on a test subset; and comparing its performance with the initial model to verify the effectiveness of the sample selection.