Post-correction-based high-entropy KNN clustering method and device, and medium

Through the post-correction-based high-entropy KNN clustering method, the reclassification is reclassified using initialization classification and similarity differential methods, which solves the problem that traditional KNN algorithms are difficult to achieve low entropy between classes and high entropy within classes, and achieves homogeneity between classes , different effects within the category meet the needs of high entropy clustering.

WO2024245413A1PCT designated stage expired Publication Date: 2024-12-05INSPUR GENERSOFT CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/096756
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-01
Filing Date
2024-05-31
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

Traditional KNN algorithms are difficult to achieve the effects of low entropy between classes and high entropy within classes, especially in the classification process of multiple types of products or data, and cannot meet the needs of homogeneity between classes and different within classes.

Method used

The high-entropy KNN clustering method based on post-correction is used to obtain a prior sample by initializing the classification, and the K prior samples closest to be selected as the comparison samples, and reclassified based on the different similarity until all samples complete high-entropy clustering.

Benefits of technology

It effectively realizes the effects of homogeneity between classes and different within classes, meets the needs of high-entropy clustering, ensures the accuracy of prior samples through traditional methods of the same similarity, and achieves high-entropy within classes through methods of different similarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024096756_05122024_PF_FP_ABST
    Figure CN2024096756_05122024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of electric digital data processing, and discloses a post-correction-based high-entropy KNN clustering method and device, and a medium. The method comprises: determining a set of samples needing to be clustered, and carrying out initial classification on a plurality of specified samples in the set of samples on the basis of the mode of a same similarity; selecting K prior samples closest to samples to be classified as comparison samples; on the basis of the mode of different similarities, obtaining category labels of the samples to be classified; and re-classifying the plurality of prior samples on the basis of the mode of different similarities. The accuracy of prior samples is effectively guaranteed, then on the basis of the mode of different similarities, the requirements of inter-class homogeneity and intra-class heterogeneity are effectively met, and finally, the prior samples are subjected to post-correction and re-classification, so that the high-entropy clustering process of all the samples can be achieved, and the requirements for high-entropy clustering are met.
Need to check novelty before this filing date? Find Prior Art

Description

A high entropy KNN clustering method, device and medium based on post-correction

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 1, 2023, with application number 202310636506.0 and invention name “A high entropy KNN clustering method, device and medium based on post-correction”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of electronic digital data processing, and in particular to a high entropy KNN clustering method, device and medium based on post-correction. Background Art

[0003] The K-Nearest Neighbor (KNN) algorithm is a supervised learning algorithm that determines the state of a sample based on the states of its K nearest neighbors and is commonly used for sample classification. Generally speaking, the KNN algorithm exhibits significant differences between classes and homogeneity within classes, resulting in high entropy between classes and low entropy within classes.

[0004] However, with the development of technology, some applications require homogeneity between classes but significant differences within them. For example, when classifying multiple types of products or data, it is sufficient to ensure that each type of product or data in each category meets a certain ratio. In this case, the classification process needs to ensure low entropy between classes and high entropy within classes, which is difficult to achieve using the traditional KNN algorithm.

[0005] Summary of the Invention

[0006] In order to solve the above problems, this application proposes a high entropy KNN clustering method based on post-correction, including:

[0007] Determine a sample set that needs to be clustered, and perform initial classification for a number of designated samples in the sample set based on the same similarity;

[0008] The sample that has completed the initial classification is used as a priori sample, and for the remaining samples to be classified in the sample set except the priori sample, K priori samples that are closest to the samples to be classified are selected as comparison samples; K is a preset positive integer value;

[0009] Based on the difference in similarity and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained until all the samples to be classified are classified;

[0010] Based on the difference in similarity, several prior samples are reclassified.

[0011] On the other hand, the present application also proposes a high entropy KNN clustering device based on post-correction, comprising:

[0012] at least one processor; and,

[0013] a memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the following operations:

[0015] Determine a sample set that needs to be clustered, and perform initial classification for a number of designated samples in the sample set based on the same similarity;

[0016] The sample that has completed the initial classification is used as a priori sample, and for the remaining samples to be classified in the sample set except the priori sample, K priori samples that are closest to the samples to be classified are selected as comparison samples; K is a preset positive integer value;

[0017] Based on the difference in similarity and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained until all the samples to be classified are classified;

[0018] Based on the difference in similarity, several prior samples are reclassified.

[0019] The present application also proposes a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:

[0020] Determine a sample set that needs to be clustered, and perform initial classification for a number of designated samples in the sample set based on the same similarity;

[0021] The sample that has completed the initial classification is used as a priori sample, and for the remaining samples to be classified in the sample set except the priori sample, K priori samples that are closest to the samples to be classified are selected as comparison samples; K is a preset positive integer value;

[0022] Based on the difference in similarity and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained until all the samples to be classified are classified;

[0023] Based on the difference in similarity, several prior samples are reclassified.

[0024] The high entropy KNN clustering method based on post-correction proposed in this application can bring the following beneficial effects:

[0025] The prior samples are obtained through the traditional method of the same similarity, which effectively guarantees the accuracy of the prior samples. Then, based on the method of different similarities, the requirements of homogeneity between classes and differences within classes are effectively achieved. Finally, the prior samples are post-corrected and reclassified to achieve a high-entropy clustering process for all samples, meeting the needs for high-entropy clustering. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0027] FIG1 is a schematic diagram of a process of a high entropy KNN clustering method based on post-correction in an embodiment of the present application;

[0028] FIG2 is a schematic diagram of initialization classification in an embodiment of the present application;

[0029] FIG3 is a schematic diagram of the results of the traditional KNN clustering algorithm in an embodiment of the present application;

[0030] FIG4 is a schematic diagram of classification in different similarity manners in the first case in an embodiment of the present application;

[0031] FIG5 is a schematic diagram of classification in different similarity manners in the second case in an embodiment of the present application;

[0032] FIG6 is a schematic diagram of classification in different similarity manners in the third case in an embodiment of the present application;

[0033] FIG7 is a schematic diagram of classification results in different similarity modes according to an embodiment of the present application;

[0034] FIG8 is a schematic diagram of a priori sample post-correction in an embodiment of the present application;

[0035] FIG9 is a schematic diagram of a high entropy KNN clustering device based on post-correction in an embodiment of the present application. DETAILED DESCRIPTION

[0036] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0037] The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0038] As shown in FIG1 , the embodiment of the present application provides a high entropy KNN clustering method based on post-correction, including:

[0039] S101: Determine a sample set that needs to be clustered, and perform initial classification for a number of designated samples in the sample set based on the same similarity.

[0040] Unlike traditional KNN clustering, the purpose of high entropy KNN clustering in this paper is different. In the pre-acquired data set, several data are selected, which can be product data, image data, audio data, etc.

[0041] Clustering is performed on a set of data samples. The goal is no longer to group data of the same or similar categories into a single cluster, but rather to ensure that data of different categories meet a preset ratio within the resulting clusters. For example, using product data as an example, if the ratio of product quality within each resulting cluster meets a preset ratio (5:3:2 for high-quality, good, and poor quality products), this goal is achieved.

[0042] When initializing the classification, several designated samples are selected from the sample set. The designated samples here are samples with identifiable characteristics (also called significant characteristics). For example, taking product data as an example, some products are of very good quality, or have very obvious defects, and they can be considered to have identifiable characteristics. Or, when identifying image data, if the designated object is clearly present in the image, or if the designated object is clearly absent, it is considered to have identifiable characteristics. Generally speaking, the number of designated samples selected is small compared to the sample set.

[0043] For each specified sample, the K samples closest to it are selected, and the category label with the most occurrences among these K samples is used as the category label for the specified sample. As shown in Figure 2, a total of 12 specified samples were selected and divided into two categories, marked with different icons in the figure. In this case, these specified samples were obtained by using the same similarity method, which conforms to the clustering process and results of the traditional KNN clustering process.

[0044] S102: The sample that has completed the initialization classification is used as a priori sample, and for the remaining samples to be classified in the sample set except the priori sample, K priori samples that are closest to the samples to be classified are selected as comparison samples; K is a preset positive integer value.

[0045] The K value should not be too large or too small. Generally speaking, it is related to the sample size of the sample set. In this case, the sample size corresponding to the sample set is determined. Based on the sample size, the corresponding K value and the number of designated samples to be selected during the classification process are determined. The ratio of the K value to the sample size is a positive integer within [0.03, 0.09], and the K value is an odd number. When the sample size is 100, the K value can be 3, 5, 7, or 9. The number of designated samples to be selected needs to be higher than the maximum value of the K value selection range to facilitate the selection of comparative samples.

[0046] S103: Based on the different similarities and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained until all the samples to be classified are classified.

[0047] As shown in Figure 3, according to the traditional KNN clustering algorithm, when clustering is still performed in a similarity-equal manner, the final result is still very different between classes and homogeneous within classes. At this time, the class is still in a low entropy state, which does not meet the requirements of this article.

[0048] Based on this, we use the method of similarity difference to determine the category labels that appear in the corresponding comparison sample for each sample to be classified, as well as the number of occurrences of each category label. Among all the category labels, the category label with the least number of occurrences is selected as the category label of the sample to be classified.

[0049] As shown in Figures 4, 5, and 6, let the K value be 3. For the convenience of description, the icons in the hollow boxes represent the first category, the icons with a cross in the box represent the second category, and the icons in the solid boxes represent the undetermined category. In Figure 4, among the three samples closest to sample 1, the number of the first category is 1 and the number of the second category is 2. The number of the first category is smaller, so sample 1 is the first category. In Figure 5, for sample 2, the number of the first category and the second category are 2 and 1 respectively, so sample 2 is the second category. In Figure 6, for sample 3, the number of the first category and the second category are 3 and 0 respectively, so the category of sample 3 is the second category. Similarly, it can be concluded that the category of sample 4 is the first category.

[0050] At this point, the final effect can be shown in Figure 7, achieving the effect of homogeneity between classes and great differences within classes. At this time, the class is in a high entropy state, which meets the requirements.

[0051] S104: Reclassify a number of prior samples based on the difference in similarity.

[0052] In the above, the samples to be classified have been clustered according to different similarities. However, the initial a priori samples were still clustered according to the same similarity, which does not meet the requirements. In this case, for each a priori sample, the K most recent a priori samples are selected from the classified samples to be classified (because the a priori samples do not meet the requirements, when selecting the comparison file, they are selected from the classified samples to be classified). Similarly, the category labels that appear in the comparison samples are determined, as well as the corresponding number of occurrences of each category label. Among all category labels, the category label with the least number of occurrences is selected as the category label obtained after reclassifying the a priori sample.

[0053] As shown in Figure 8, the circled samples are prior samples. After comparing them with the three closest comparison samples in terms of similarity difference, it is found that their categories need to be changed, so they are changed from the first category to the second category. Therefore, the prior samples are reclassified through post-correction, and the clustering of the similarity difference of all samples is completed, so that all samples in the sample set finally meet the requirements.

[0054] The prior samples are obtained through the traditional method of the same similarity, which effectively guarantees the accuracy of the prior samples. Then, based on the method of different similarities, the requirements of homogeneity between classes and differences within classes are effectively achieved. Finally, the prior samples are post-corrected and reclassified to achieve a high-entropy clustering process for all samples, meeting the needs for high-entropy clustering.

[0055] In one embodiment, it is described above that the closest sample needs to be selected as a comparison sample. When calculating the distance between samples, the number of dimensions contained in each sample in the sample set is determined, and the distance between the sample to be classified and all other prior samples is calculated based on the number of dimensions, so as to select the K prior samples with the closest distance as comparison samples.

[0056] The number of dimensions usually includes one-dimensional to three-dimensional data. For example, text data contains one-dimensional data of text, 2D plane images contain two-dimensional data of pixels on the x-axis and y-axis, and product data contains three-dimensional data of appearance, function, and price.

[0057] When the samples in the sample set are one-dimensional, through d i =|x i -x1|Get the distance between the sample to be classified and the prior sample, where d i is the distance between the sample to be classified and the i-th prior sample, x i is the coordinate of the i-th prior sample, and x1 is the coordinate of the sample to be classified.

[0058] When the samples in the sample set are two-dimensional, Get the distance between the sample to be classified and the prior sample, where d i is the distance between the sample to be classified and the i-th prior sample, (x i ,y i ) is the coordinate of the i-th prior sample, (x1, y1) is the coordinate of the sample to be classified;

[0059] When the samples in the sample set are three-dimensional, Get the distance between the sample to be classified and the prior sample, where d i is the distance between the sample to be classified and the i-th prior sample, (x i ,y i , z i ) is the coordinate of the i-th prior sample, and (x1, y1, z1) is the coordinate of the sample to be classified.

[0060] Of course, the number of dimensions can also include more dimensions, in which case a similar formula can be derived to calculate the distance between samples.

[0061] As shown in FIG9 , the present application also proposes a high entropy KNN clustering device based on post-correction, comprising:

[0062] at least one processor; and,

[0063] a memory communicatively connected to the at least one processor; wherein,

[0064] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the following operations:

[0065] Determine a sample set that needs to be clustered, and perform initial classification for a number of designated samples in the sample set based on the same similarity;

[0066] The sample that has completed the initial classification is used as a priori sample, and for the remaining samples to be classified in the sample set except the priori sample, K priori samples that are closest to the samples to be classified are selected as comparison samples; K is a preset positive integer value;

[0067] Based on the difference in similarity and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained until all the samples to be classified are classified;

[0068] Based on the difference in similarity, several prior samples are reclassified.

[0069] The present application also proposes a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:

[0070] Determine a sample set that needs to be clustered, and perform initial classification for a number of designated samples in the sample set based on the same similarity;

[0071] The sample that has completed the initial classification is used as a priori sample, and for the remaining samples to be classified in the sample set except the priori sample, K priori samples that are closest to the samples to be classified are selected as comparison samples; K is a preset positive integer value;

[0072] Based on the difference in similarity and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained until all the samples to be classified are classified;

[0073] Based on the difference in similarity, several prior samples are reclassified.

[0074] The various embodiments in this application are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device and medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant portions, refer to the descriptions of the method embodiments.

[0075] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects to their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0076] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0077] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.

[0078] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0080] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0081] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0082] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0083] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0084] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A high entropy KNN clustering method based on post-correction, wherein: include: Determine a sample set that needs to be clustered, and initialize classification for a number of designated samples in the sample set based on the same similarity; wherein, in a pre-acquired data set, select a number of data as the sample set, and the number of data is product data; the designated samples are samples with identifiable characteristics, and the identifiable characteristics include excellent product quality and defective products; The sample that has completed the initialization classification is used as a priori sample, and for the remaining samples to be classified in the sample set except the priori sample, K priori samples that are closest to the samples to be classified are selected as comparison samples; K is a preset positive integer value; Based on the difference in similarity and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained until all the samples to be classified are classified; Based on the difference in similarity, several prior samples are reclassified so that the proportion of product quality in each cluster finally obtained meets the preset proportion; Initializing classification for a number of designated samples in the sample set based on the same similarity, specifically including: Determining a number of designated samples that have been selected from the sample set; For each specified sample, select the K samples closest to the specified sample, and use the category label with the largest number of occurrences among the K samples as the category label of the specified sample; Based on the different similarities and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained, specifically including: Determine the category labels that appear in the comparison sample, and the number of occurrences of each category label that appears; Among all the category labels, the category label with the least number of occurrences is selected as the category label of the sample to be classified.

2. The method according to claim 1, wherein: Based on the difference in similarity, several prior samples are reclassified, including: For each priori sample, select the nearest K classified samples from the classified samples as comparison samples; Determine the category labels that appear in the comparison sample, and the number of occurrences of each category label that appears; Among all the category labels, the category label with the least number of occurrences is selected as the category label obtained after the prior sample is reclassified.

3. The method according to claim 1, wherein: After determining the sample set that needs to be clustered, the method further includes: Determining a sample capacity corresponding to the sample set; The corresponding K value and the number of selected samples in the classification process are determined according to the sample capacity, wherein the ratio range of the K value to the sample capacity is a positive integer within [0.03, 0.09], the K value is an odd number, and the number of selected samples is higher than the maximum value of the K value selection range.

4. The method according to claim 1, wherein: Select K prior samples that are closest to the sample to be classified as comparison samples, specifically including: Calculate the distance between the sample to be classified and all other prior samples according to the number of dimensions contained in each sample in the sample set; Select the K prior samples closest to each other as comparison samples.

5. The method according to claim 4, wherein: Calculating the distance between the sample to be classified and all other prior samples includes: When the samples in the sample set are one-dimensional, through d i =|x i -x1|Get the distance between the sample to be classified and the prior sample, where d i is the distance between the sample to be classified and the i-th prior sample, x i is the coordinate of the i-th prior sample, and x1 is the coordinate of the sample to be classified; When the samples in the sample set are two-dimensional, Get the distance between the sample to be classified and the prior sample, where d i is the distance between the sample to be classified and the i-th prior sample, (x i ,y i ) is the coordinate of the i-th prior sample, (x1, y1) is the coordinate of the sample to be classified; When the samples in the sample set are three-dimensional, Get the distance between the sample to be classified and the prior sample, where d i is the distance between the sample to be classified and the i-th prior sample, (x i ,y i , z i ) is the coordinate of the i-th prior sample, and (x1, y1, z1) is the coordinate of the sample to be classified.

6. A high entropy KNN clustering device based on post-correction, wherein: include: at least one processor; as well as, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the following operations: Determine a sample set that needs to be clustered, and initialize classification for a number of designated samples in the sample set based on the same similarity; wherein, in a pre-acquired data set, select a number of data as the sample set, and the number of data includes product data; the designated samples are samples with identifiable characteristics, and the identifiable characteristics include excellent product quality and defective products; The sample that has completed the initialization classification is used as a priori sample, and for the remaining samples to be classified in the sample set except the priori sample, K priori samples that are closest to the samples to be classified are selected as comparison samples; K is a preset positive integer value; Based on the difference in similarity and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained until all the samples to be classified are classified; Based on the difference in similarity, several prior samples are reclassified so that the proportion of product quality in each cluster finally obtained meets the preset proportion; Initializing classification for a number of designated samples in the sample set based on the same similarity, specifically including: Determining a number of designated samples that have been selected from the sample set; For each specified sample, select the K samples closest to the specified sample, and use the category label with the largest number of occurrences among the K samples as the category label of the specified sample; Based on the difference in similarity, and the category label determined by the comparison sample in the initial classification Label, and obtain the category label of the sample to be classified, specifically including: Determine the category labels that appear in the comparison sample, and the number of occurrences of each category label that appears; Among all the category labels, the category label with the least number of occurrences is selected as the category label of the sample to be classified.

7. A non-volatile computer storage medium storing computer executable instructions, wherein: The computer executable instructions are configured to: Determine a sample set that needs to be clustered, and initialize classification for a number of designated samples in the sample set based on the same similarity; wherein, in a pre-acquired data set, select a number of data as the sample set, and the number of data includes product data; the designated samples are samples with identifiable characteristics, and the identifiable characteristics include excellent product quality and defective products; The sample that has completed the initialization classification is used as a priori sample, and for the remaining samples to be classified in the sample set except the priori sample, K priori samples that are closest to the samples to be classified are selected as comparison samples; K is a preset positive integer value; Based on the difference in similarity and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained until all the samples to be classified are classified; Based on the difference in similarity, several prior samples are reclassified so that the proportion of product quality in each cluster finally obtained meets the preset proportion; Initializing classification for a number of designated samples in the sample set based on the same similarity, specifically including: Determining a number of designated samples that have been selected from the sample set; For each specified sample, select the K samples closest to the specified sample, and use the category label with the largest number of occurrences among the K samples as the category label of the specified sample; Based on the different similarities and the category labels of the comparison samples determined in the initial classification, the category labels of the samples to be classified are obtained, specifically including: Determine the category labels that appear in the comparison sample, and the corresponding Number of occurrences; Among all the category labels, the category label with the least number of occurrences is selected as the category label of the sample to be classified.

Citation Information

Patent Citations

  • K-means clustering enhancement method

    CN106485285A

  • Mixed attribute data clustering method and device

    CN111209347A

  • Classification method, computer equipment and computer readable storage medium

    CN114491042A

  • Model training method and device and storage medium

    CN115130597A

  • A post-correction-based high-entropy KNN clustering method, device, and medium

    CN116361671B