Checkout
Personalized AI apps
Build multi-agent systems without code and automate document search, RAG and content generation
Start free trial
Question

Discriminative Models - Is KNN generative or discriminative?

Answer

By simulating the conditional likelihood that a given sample belongs to a certain class, k-nearest neighbors (KNN) models discrimination. Taking into account the decision rule of KNNs helps to clarify this.