Nearest neighbor classification device and method
A nearest neighbor classification and nearest neighbor technology, applied in the information field, can solve problems such as poor robustness and noise sensitivity, and achieve the effect of improving accuracy and strong robustness
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0025] image 3 is a schematic diagram of the composition of the nearest neighbor classification device in Embodiment 1 of the present invention. Such as image 3 As shown, the device 300 includes:
[0026] An acquisition unit 301, configured to obtain K nearest neighbor samples of the test sample, where K is a positive integer;
[0027] A grouping unit 302, configured to group according to the categories of the K nearest neighbor samples, wherein each group corresponds to each category;
[0028] A first calculation unit 303, configured to calculate the weight of each group;
[0029] The second calculation unit 304 is used to calculate the probability density distribution of each group, and calculate the prior probability of the test sample for each group according to the probability density distribution of each group;
[0030] The third calculation unit 305 is used to calculate the score of the category corresponding to each group according to the weight of each group and...
Embodiment 2
[0075] The embodiment of the present invention also provides an electronic device, Figure 5 It is a schematic diagram of the composition of the electronic device of Embodiment 2 of the present invention. Such as Figure 5 As shown, the electronic device 500 includes a nearest neighbor classifying device 501, wherein the structure and function of the nearest neighbor classifying device 501 are the same as those described in Embodiment 1, and will not be repeated here.
[0076] Figure 6 It is a schematic block diagram of the system configuration of the electronic device according to Embodiment 2 of the present invention. Such as Figure 6 As shown, the electronic device 600 may include a central processing unit 601 and a memory 602; the memory 602 is coupled to the central processing unit 601. This diagram is exemplary; other types of structures may also be used, in addition to or in place of this structure, for telecommunications or other functions.
[0077] Such as Fi...
Embodiment 3
[0091] An embodiment of the present invention also provides a nearest neighbor classification method, which corresponds to the nearest neighbor classification device in Embodiment 1. Figure 7 It is a flowchart of the nearest neighbor classification method in Embodiment 3 of the present invention. Such as Figure 7 As shown, the method includes:
[0092] Step 701: Obtain the K nearest neighbor samples of the test sample, where K is a positive integer;
[0093] Step 702: grouping according to the category of the K nearest neighbor samples, where each group corresponds to each category;
[0094] Step 703: Calculate the weight of each group;
[0095] Step 704: Calculate the probability density distribution of each group, and calculate the prior probability of the test sample for each group according to the probability density distribution of each group;
[0096] Step 705: Calculate the score of the category corresponding to each group according to the weight of each group and...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


