The AbleKnnClassifierAgent provides a classification function. The k-NN algorithm is used as the classifier model. To use the k-NN agent, the user must specify the data source (and meta data in the form of a *.dfn file). Generating a k-NN classification agent will:
At the end of these steps, the classifier agent is configured and the knn model is set to contain the Import corresponding to the input file. Now one of the test or run phases can begin, which means that the knn bean is connected to the other import bean and starts its classification function. The user can choose to test the knn algorithm via Step/Cycle/Run/Halt buttons on the Agent Editor toolbar. Step button will process one test/run example at a time, while Cycle button will make a pass through all the examples in the test/run file. Run button will cycle through the data until the Stop button is pushed. Whenever the end of test/run file is reached, all the corresponding statistics (e.g., accuracy, error, total number of tested examples, number of correctly classified examples) are reset to their default values.