Icon

4.1 k-Nearest Neighbors with k=4 (WineData)

This workflow repeats the k-Nearest Neighbors wine color analysis from Chapter 4 of the textbook Practical Machine Learning with R (https:\\ai.lange-analytics.com). We use the same training and testing data as in Chapter 4. The training data are normalized by subtracting the mean and dividing the result by the standard deviation of the training dataset. Afterward, the node "Normalizer (Apply)" applies the mean and the standard deviation from the training data to normalize the testing data. The "K Nearest Neighbor" node runs a 4-Nearest Neighbor model and the "Scorer" node generates a confusion matrix and other metrics based on the testing data.

URL: Practical Machine Learning with R https://ai.lange-analytics.com
URL: Open the related R analysis in RStudio https://ai.lange-analytics.com/exc/?file=04-KNearNeighExerc200.Rmd
URL: Contact the author https://ai.lange-analytics.com/EmailForw.html

Nodes

Extensions

Links