How does a one-class SVM learn a boundary around normal data, and what does the nu parameter control?

Quick Overview

Explain how a one-class SVM separates normal training data from the origin in kernel space and what the nu parameter bounds. Tests understanding of the optimization problem, why an RBF kernel gives a closed boundary, and how nu and gamma are tuned for anomaly detection.

How does a one-class SVM learn a boundary around normal data, and what does the nu parameter control?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

How does a one-class SVM learn a boundary around normal data, and what does the `nu` parameter control? ```hint Find the second class A one-class problem has no negative examples. Think about what point in kernel feature space the training data could be separated from. ``` ```hint Follow nu through the objective Look at where $\nu$ appears in the optimization problem and what it does to the trade-off between the margin offset and the slack penalties. ``` ### What a Strong Answer Covers - The optimization problem: what is separated from what, and the roles of the offset and the slack variables. - Why an RBF kernel turns the separating hyperplane into a closed boundary around the data. - The two bounds that $\nu$ places on the trained solution, and what it means in practice. - How $\nu$ and the kernel width each shape the boundary, and how to tune them without labeled anomalies. ### Follow-up Questions - Why does feature scaling matter for a one-class SVM with an RBF kernel? - How would you choose $\nu$ and `gamma` if you had a small set of labeled anomalies? - How does a one-class SVM compare with an isolation forest on a large dataset? - What happens if the training data contains more anomalies than $\nu$ allows for?

Overview: Explain how a one-class SVM separates normal training data from the origin in kernel space and what the nu parameter bounds. Tests understanding of the optimization problem, why an RBF kernel gives a closed boundary, and how nu and gamma are tuned for anomaly detection.

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

How does a one-class SVM learn a boundary around normal data, and what does the nu parameter control?

What a Strong Answer Covers Guidance

  • The optimization problem: what is separated from what, and the roles of the offset and the slack variables.
  • Why an RBF kernel turns the separating hyperplane into a closed boundary around the data.
  • The two bounds that ν\nu places on the trained solution, and what it means in practice.
  • How ν\nu and the kernel width each shape the boundary, and how to tune them without labeled anomalies.

Follow-up Questions Guidance

  • Why does feature scaling matter for a one-class SVM with an RBF kernel?
  • How would you choose ν\nu and gamma if you had a small set of labeled anomalies?
  • How does a one-class SVM compare with an isolation forest on a large dataset?
  • What happens if the training data contains more anomalies than ν\nu allows for?