Bayesian One-Class SVM
Bayesian One-Class Support Vector Machine · Also known as: Bayesian OCSVM, Bayesian one-class classifier, probabilistic one-class SVM, Bayes-OCSVM
Bayesian one-class SVM combines the classical one-class support vector machine — which learns a tight boundary around normal training examples — with Bayesian inference to produce calibrated probability estimates of anomaly, rather than only a binary flag. This allows uncertainty quantification over the novelty decision, making the approach more suitable when downstream actions depend on how confident the model is that a new observation is anomalous.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use Bayesian one-class SVM when you have labeled data only for the normal class (one-class setting: fraud, fault detection, medical screening) and you need not just an anomaly flag but a calibrated probability score to prioritise cases or to set decision thresholds based on acceptable false-positive rates. It is appropriate when sample size is moderate (roughly 50–10,000 normal examples) and the feature space is low-to-medium dimensional. Avoid it when you need full transparency of decision rules for regulatory reporting, when compute budget is very tight (Bayesian inference adds cost over plain OCSVM), when data are extremely high-dimensional without prior feature reduction, or when a large amount of labeled anomaly examples is available (making a two-class classifier more appropriate).
Strengths & limitations
- Produces calibrated probability scores rather than hard binary flags, enabling risk-ranked outputs.
- Quantifies uncertainty over the anomaly decision, which is valuable when evidence is borderline.
- The Bayesian prior acts as a regulariser, reducing sensitivity to the choice of nu and kernel hyperparameters compared with plain OCSVM.
- Automatic relevance determination in the sparse Bayesian formulation prunes uninformative support vectors, yielding leaner models.
- Works well in one-class settings where anomaly examples are absent or extremely rare during training.
- Bayesian inference adds substantial computational overhead over standard OCSVM, especially for large training sets.
- Kernel choice and the nu hyperparameter still require tuning; poor choices lead to over- or under-inclusive boundaries regardless of the Bayesian wrapper.
- Scales poorly to very high-dimensional raw data without prior dimensionality reduction.
- Posterior calibration quality depends on the adequacy of the chosen prior; a misspecified prior can produce overconfident or underconfident probabilities.
Frequently asked
How does Bayesian one-class SVM differ from plain one-class SVM?
Plain OCSVM returns a signed distance from the boundary and a binary inlier/outlier flag. The Bayesian version places a prior over the model parameters and computes a posterior, yielding a probability score for each observation. This probability enables threshold selection based on acceptable false-positive rates and communicates uncertainty about borderline cases.
What prior should I use?
A zero-mean Gaussian prior over the weight vector (equivalent to L2 regularisation) is the standard starting point and corresponds directly to the standard SVM margin objective. Sparse priors such as the automatic relevance determination prior used in the relevance vector machine additionally prune irrelevant features and tend to produce sparser, faster models.
How do I choose the nu parameter?
Nu sets the upper bound on the fraction of training points treated as outliers and the fraction that become support vectors. A common heuristic is to set nu equal to an estimate of the contamination rate in the training data. Cross-validation on a clean normal hold-out set using AUC or average precision as the scoring metric is recommended for rigorous selection.
Can I use this method when I have some labelled anomaly examples?
If labelled anomaly examples are available, a two-class classifier (e.g., logistic regression, gradient boosting, or standard SVM with both classes) will almost always outperform a one-class method. Bayesian one-class SVM is most valuable when anomaly labels are absent or too few to define a second class reliably.
What kernel works best?
The radial basis function (RBF) kernel is the most common default because it produces compact hyperspherical regions in feature space. Polynomial kernels suit data with known polynomial interactions. Always search the bandwidth (gamma) parameter alongside nu — a grid or Bayesian optimisation search over both jointly is recommended.
Sources
- Scholkopf, B., Platt, J. C., Shawe-Taylor, J., Smola, A. J., & Williamson, R. C. (2001). Estimating the support of a high-dimensional distribution. Neural Computation, 13(7), 1443–1471. DOI: 10.1162/089976601750264965 ↗
- Tipping, M. E. (2001). Sparse Bayesian learning and the relevance vector machine. Journal of Machine Learning Research, 1, 211–244. link ↗
How to cite this page
ScholarGate. (2026, June 3). Bayesian One-Class Support Vector Machine. ScholarGate. https://scholargate.app/en/machine-learning/bayesian-one-class-svm
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Autoencoder Anomaly DetectionMachine learning↔ compare
- Bayesian Gaussian ProcessMachine learning↔ compare
- Gaussian ProcessMachine learning↔ compare
- Isolation ForestMachine learning↔ compare
- One-class SVMMachine learning↔ compare
- Robust One-class SVMMachine learning↔ compare