makautnotes

0.4 Parametric vs Non-parametric Models★★★

Must-do3/4 recent papersup to 5M⏱ 3 min
PYQs2
  • What are parametric and non-parametric models? 2022-23 2025-26 5M recent
  • Why is KNN non-parametric? 2023-24 3M recent

Fixed Recipe or Open Notebook?


Parametric and Non-parametric Models PYQ 5M

Parametric model

Non-parametric model

flowchart TD
    A["<b>Training data</b>"]:::blue --> B{"Assume a fixed<br>form of function?"}:::amber
    B -->|"Yes"| C["<b>Parametric</b><br>learn fixed parameters,<br>then discard data"]:::green
    B -->|"No"| D["<b>Non-parametric</b><br>model grows with data,<br>often keeps the data"]:::green
    classDef blue fill:#5b84d424,stroke:#5b84d480
    classDef amber fill:#d6a24424,stroke:#d6a24480
    classDef red fill:#d0707024,stroke:#d0707080
    classDef green fill:#52a86e24,stroke:#52a86e80

Parametric vs Non-parametric

Basis Parametric Non-parametric
Number of parameters fixed grows with data
Assumptions strong (form of function) few or none
Data needed less more
Training / prediction speed fast slower (especially prediction)
Flexibility low: may miss complex patterns high: fits complex shapes
Main risk underfitting (wrong assumption) overfitting (→ 3.3)
Interpretability usually easy often harder
Examples linear / logistic regression, Naive Bayes KNN, decision trees, kernel SVM

Why KNN Is Non-parametric PYQ 3M

  1. No fixed-size model: KNN doesn't learn weights or a formula; it stores the whole training set.
  2. Complexity grows with data: more training points means more to store and compare.
  3. No assumption about the function's shape: it predicts from the K nearest neighbours, whatever the data's pattern.
  4. It is called a lazy learner: all work happens at prediction time.

Pros, Cons and When to Choose

Parametric

Non-parametric

⚡ Quick recall
  • Parametric? → fixed number of parameters, assumes the function's form · linear / logistic regression, Naive Bayes, perceptron
  • Non-parametric? → parameters grow with data, few assumptions · KNN, decision trees, kernel SVM
  • Comparison? → fixed vs growing · strong vs few assumptions · less vs more data · fast vs slow · underfit vs overfit risk
  • Why KNN non-parametric? → stores all training data · no fixed model · grows with data · lazy learner
Unit 0 · 0/4