Given a set of labelled prototypes, the k-NN rule (k Nearest
Neighbour rule) classifies an input sample by assigning it to the class of
the majority of its k closest prototypes.
The k-NN editing algorithm can be expressed as follows:
- Lets S = X.
- For each xi in X do:
- Discard xi from S if it is misclassified
using the k-NN rule with prototypes in X - {xi}.
How to use this applet?
- The top panel is Modes panel, the right panel is Controls
panel and the central panel is Drawing panel.
- To select the number of classes (label No classes) in the controls
panel for the training set.
- To do click over any radiobutton that identify a class (labels 1, 2,
..., 12) in the controls panel.
- To do click over the drawing panel to insert prototypes in the training
set (of the class selected in the step 4). These prototypes will have 2
characteristics whose values will remain defined for the axes x and
y.
- To select el radiobutton with label "2. Editing" in the
modes panel to changing to the editing mode. Then you can see the resultant
set of the editing.
- You could change the number of neighbours (label k) for this editing
algorithm in the controls panel.
- The radiobutton with label Inspection in the controls panel allows
to know the coordinates of the next prototypes (o sample) to the cursor
mouse.
- The radiobutton with label Remove (only in design mode) in the
controls panel allows delete the next prototype (o sample) to the cursor
mouse.
- The button Clear (only in design mode) in the controls panel allows
delete all the training set.