Identifying spam emails is one important classification task.
Data used -> spam in the kernlab library
• Randomly selected 1) 100 spam emails and 100 nonspam emails as the training set and 2) 50 spam emails and 50 nonspam emails as the test set. Ensure the emails in the training set and the test set are distinct, i.e. no repeated email instances.
• Used 1NN, 9NN and 25NN to classify the test set.
Note: Results are reproducible.