How does prediction latency of a kernel SVM scale with training set size compared to logistic regression?

Quick Overview

Compare how prediction latency and model size grow with training set size for a kernel SVM and for logistic regression. Tests the SVM decision function, why the support-vector count grows on noisy data, the linear-kernel exception, and ways to bound serving cost.

How does prediction latency of a kernel SVM scale with training set size compared to logistic regression?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How does prediction latency of a kernel SVM scale with training set size compared to logistic regression? ```hint Write out the decision function Compare what each model computes for one new input, and what each one has to keep in memory after training. ``` ```hint Which points are kept Think about which training points end up with a nonzero dual coefficient, and how that set changes as a noisy dataset grows. ``` ### What a Strong Answer Covers - The prediction formula for each model and the per-sample cost in terms of the number of support vectors and the feature count. - Why the number of support vectors tends to grow with the training set, especially when the classes overlap. - Model size and memory, alongside latency. - The linear-kernel exception. - Ways to cap kernel SVM latency and what each one gives up. ### Follow-up Questions - How do $C$ and $\gamma$ affect the number of support vectors in an RBF SVM? - You must serve an RBF SVM at a 1 ms p99 and it has 200,000 support vectors. What would you try first? - How do Nyström features and random Fourier features differ, and how would you pick the number of components? - How does training cost scale for a kernel SVM compared with logistic regression?

Overview: Compare how prediction latency and model size grow with training set size for a kernel SVM and for logistic regression. Tests the SVM decision function, why the support-vector count grows on noisy data, the linear-kernel exception, and ways to bound serving cost.

PracHub logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

How does prediction latency of a kernel SVM scale with training set size compared to logistic regression?

What a Strong Answer Covers Guidance

  • The prediction formula for each model and the per-sample cost in terms of the number of support vectors and the feature count.
  • Why the number of support vectors tends to grow with the training set, especially when the classes overlap.
  • Model size and memory, alongside latency.
  • The linear-kernel exception.
  • Ways to cap kernel SVM latency and what each one gives up.

Follow-up Questions Guidance

  • How do CC and γ\gamma affect the number of support vectors in an RBF SVM?
  • You must serve an RBF SVM at a 1 ms p99 and it has 200,000 support vectors. What would you try first?
  • How do Nyström features and random Fourier features differ, and how would you pick the number of components?
  • How does training cost scale for a kernel SVM compared with logistic regression?