AI Terms Dictionary

A comprehensive multilingual AI terminology dictionary

Definition

Also known as memory-based learning, this technique does not build a generalized model during training. Instead, it stores the entire training dataset. When a prediction is needed, it finds the most similar instances (neighbors) in the stored data and uses their labels to determine the output. K-Nearest Neighbors (KNN) is the most common algorithm in this category.

Summary

A lazy learning approach where predictions are made by comparing new inputs to stored training instances.

Key Concepts

Use Cases

Code Example

1
2
3
from sklearn.neighbors import KNeighborsClassifier
knn = KNeighborsClassifier(n_neighbors=3)
knn.fit(X_train, y_train)