Classification Algorithms II: K-Nearest Neighbors and Cross Validation

call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

This set of vocabulary flashcards covers the fundamental concepts of the K-Nearest Neighbors (K-NN) algorithm, its characteristics, advantages, drawbacks, and the process of cross-validation as described in the lecture notes.

Last updated 6:09 PM on 7/8/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat
Add student to class section state
Add studentsNo students in these sections. Invite them to track progress!

14 Terms

1
New cards

K-Nearest Neighbors (K-NN)

One of the most basic and easy-to-implement supervised machine learning algorithms used for both classification and regression problems, primarily in pattern recognition and data mining.

2
New cards

Decision Surface

The boundary between two classes in a feature space graph.

3
New cards

Majority Vote

The process where the K-NN algorithm checks the class labels of the KK nearest points and decides the predicted class label based on which class is most frequent.

4
New cards

K (in K-NN)

The number of points that the K-NN algorithm checks before doing a majority vote; its value is not fixed and must be optimized for each dataset.

5
New cards

Lazy Learning

A principle where an algorithm does not have a specific training phase and instead uses all the training data while performing a classification operation.

6
New cards

Non-parametric Learning

An algorithm that does not assume anything about the distribution of the data and therefore does not find parameters for the data distribution.

7
New cards

Hyperparameter

In the context of K-NN, this refers to KK, which is provided by the user to the model.

8
New cards

Imbalanced Data

A dataset where the majority of training data is labeled as one class, leading K-NN to be biased and potentially misclassify objects from the minority class.

9
New cards

Curse of Dimensionality

A phenomenon where the K-NN algorithm struggles to predict the output of a new data point as the number of input variables grows.

10
New cards

Cross Validation

A technique in which a particular portion of a dataset is reserved to test the resulting model after training is over but before finalizing it.

11
New cards

Validation Data

A small portion of the dataset reserved for testing the model to check its accuracy during the cross-validation process.

12
New cards

k-fold cross-validation

A technique where data is split into kk different but similar folds, performing kk iterations where one fold is used as the validation set and the rest as training sets.

13
New cards

Thumb rule for k in Cross-Validation

When unsure which value to choose for the iterations in cross-validation, a value of k=10k=10 is commonly used in applied machine learning.

14
New cards

Optimal K accuracy range

In most cases, K-NN accuracy is highest for K=7K=7 to K=13K=13 and falls as the value of KK increases.