Explain how One-Class SVM works for anomaly detection and its underlying principle for identifying novelties.

Quick Overview

Asks how a One-Class SVM detects anomalies by learning a boundary around normal data in a kernel feature space. Tests the max-margin separation from the origin, the roles of nu and gamma, and when the method suits novelty detection on clean data versus contaminated or very large datasets.

Explain how One-Class SVM works for anomaly detection and its underlying principle for identifying novelties.

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Explain how One-Class SVM works for anomaly detection and its underlying principle for identifying novelties. ```hint What the boundary separates An ordinary SVM separates two labeled classes. With only one class, ask what the boundary separates the data from, and what the kernel does to the geometry of the mapped points. ``` ```hint The two knobs Look at what `nu` bounds on the training set, and at how `gamma` changes the shape of the boundary. ``` ### What a Strong Answer Covers - The goal of estimating a region that holds most of the normal data, and the rule used to flag a new point - The kernel mapping and the max-margin separation from the origin, including the role of the slack terms - What `nu` and `gamma` control and how they trade false alarms against missed anomalies - When the method fits (novelty detection on clean data) and where it breaks (contaminated training data, large datasets, unscaled features) ### Follow-up Questions - How would you choose `nu` and `gamma` when you have no labeled anomalies? - How does One-Class SVM compare with Isolation Forest on a dataset with a million rows? - Why does the RBF kernel make separating the data from the origin equivalent to fitting the smallest enclosing sphere?

Overview: Asks how a One-Class SVM detects anomalies by learning a boundary around normal data in a kernel feature space. Tests the max-margin separation from the origin, the roles of nu and gamma, and when the method suits novelty detection on clean data versus contaminated or very large datasets.

General logo
General
Nov 24, 2026
mediumData ScientistOtherMachine Learning
0
0

Explain how One-Class SVM works for anomaly detection and its underlying principle for identifying novelties.

What a Strong Answer Covers Guidance

  • The goal of estimating a region that holds most of the normal data, and the rule used to flag a new point
  • The kernel mapping and the max-margin separation from the origin, including the role of the slack terms
  • What nu and gamma control and how they trade false alarms against missed anomalies
  • When the method fits (novelty detection on clean data) and where it breaks (contaminated training data, large datasets, unscaled features)

Follow-up Questions Guidance

  • How would you choose nu and gamma when you have no labeled anomalies?
  • How does One-Class SVM compare with Isolation Forest on a dataset with a million rows?
  • Why does the RBF kernel make separating the data from the origin equivalent to fitting the smallest enclosing sphere?