K-Nearest Neighbors Results

K-Nearest Neighbors

Click the OK button in the K-Nearest Neighbors dialog box to display the K-Nearest Neighbors Results dialog box, which contains four tabs: Quick, Plots, Options, and Custom predictions. Use the options on these tabs to review the parameter estimates, summaries, descriptive statistics, predictions, residuals (or accuracy for classification), graphs, and surfaces as well as other results.

Summary Box
The Summary box at the top of the dialog box displays information about the current analysis.
Copy button
Click the Copy button to copy either the selected text (if text has been selected) in the Summary box or all of the text (if no text has been selected) to the Clipboard. Note that the copied text retains formatting information (such as font, color, etc.).
Contract/Expand button
Click the Contract/Expand button to contract or expand the Summary box. When contracted, you can see only one line of the Summary box text and can scroll through the text using a scroll bar. Note that when contracted the text is scrolled so that the first non-blank line is at the top. When expanded (the default setting), the entire Summary box will be displayed.
Summary
Click the Summary button to display a spreadsheet containing a brief summary of the current KNN analysis.
Cancel
Click the Cancel button to close this dialog box and return to the K-Nearest Neighbors dialog box.
Options
Click the Options button to display the Options menu.
Code generator
If your program is licensed to include this feature, you can generate computer code to implement the current model for predicting new observations. When you click this button, a menu is displayed with three commands:

STATISTICA Visual Basic (SVB). Select this command to generate a STATISTICA Visual Basic program containing the code implementing the model. This code will be generated in a form compatible with the nodes of STATISTICA Data Miner; however, you can also simply copy/paste the relevant portion of this code to include it in your custom Visual Basic programs. The code will automatically be displayed in the STATISTICA Visual Basic program editor window.

C/C++ language
Select this command to generate code compatible with the C/C++ language. This option is useful if you want to include the information provided by the final model into custom (C/C++) programs (see also Using C/C++/C# Code for Deployment).
PMML script
This command will generate code in Predictive Model Markup Language (PMML) which is an XML-based language for storing information about fully trained (parameterized) models, and for sharing those models with other applications. STATISTICA and STATISTICA Enterprise Server contain facilities to use this information to compute predicted values or classifications, i.e., to quickly and efficiently deploy models (typically in the context of data mining projects).
Deployment to STATISTICA Enterprise
Select this command to deploy the results as an Analysis Configuration in STATISTICA Enterprise. Note that appropriately formatted data must be available in a STATISTICA Enterprise Data Configuration before the results can be deployed to an Analysis Configuration.
Sample
You can use the options in this group box to generate KNN results for the particular sample of your choice - Examples, Test, or Overall - whenever applicable.
Note: For K-Nearest Neighbors, it's not entirely meaningful to have predictions made on the example sample since the closest point in the feature space to an example is the example itself. This means KNN predictions on an example set will always be identical to the outcomes of the set itself. Given this, selecting the Examples option button will render some of the options on the Quick tab unavailable, such as Descriptive statistics, Predictions, Residuals, and Confidence levels (or Standard deviation for regression).