TD_OneClassSVM Function | OneClassSVM | Teradata Vantage - TD_OneClassSVM - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-07-09
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢

TD_OneClassSVM is a linear support vector machine (SVM) that performs classification analysis on data sets to identify outliers or novelty in the data.

This function supports the Classification (loss: hinge) model. During the training, all the data is assumed to belong to a single class (value 1), therefore ResponseColumn is not needed by the model. For TD_OneClassSVMPredict, output values are 0 or 1. A value of 0 corresponds to an outlier, and 1 to a normal observation or instance.

TD_OneClassSVM is implemented using Minibatch Stochastic Gradient Descent (SGD) algorithm, which is highly scalable for large datasets. See TD_GLM for information about SGD.

The function output is a trained one-class SVM model, which can be input to TD_OneClassSVMPredict for prediction. The model also contains model statistics of MSE, Loglikelihood, AIC, and BIC.

One-class SVM is a machine learning algorithm used for anomaly detection to identify data points that deviate significantly from the norm. It is a variant of Support Vector Machines (SVM) that is designed to work with only one class of data.

One-class SVM works by first mapping the input data to a high-dimensional feature space and then finding the hyperplane that separates the data from the origin with the largest margin. The hyperplane is then used to classify new data points as either belonging to the same class as the training data or not.

One of the main advantages of TD_OneClassSVM is that it can be used with unlabeled data, meaning it can detect anomalies without requiring labeled data for training. This makes it particularly useful for detecting fraud, intrusion detection, and other types of security applications where anomalous behavior is often the most important signal.

However, TD_OneClassSVM has some limitations, such as being sensitive to the choice of kernel function, and not being suitable for datasets with high levels of noise or a significant overlap between classes. One-class SVM remains a powerful tool for anomaly detection and is widely used in industry and research.

The key mathematical concepts that underlie TD_OneClassSVM include:
  • Kernel Functions: Mathematical functions that are used to measure the similarity between two data points in a higher-dimensional feature space. In TD_OneClassSVM, the kernel function is used to map the data points into the feature space. Common kernel functions used in TD_OneClassSVM include the Gaussian, polynomial, and sigmoid kernels.

  • Support Vectors: Data points that lie closest to the decision boundary. They are used to define the hyperplane that separates the normal data points from the anomalies. The weights and biases of the hyperplane are calculated based on the support vectors.

  • Lagrange Multipliers: Multipliers to optimize the problem of finding the hyperplane that maximizes the margin. The Lagrange multipliers are used to constrain the solution to satisfy certain conditions, such as the requirement that the weights of the hyperplane sum to zero.
  • Quadratic Programming: Mathematical optimization technique that is used to solve this problem efficiently. The problem of finding the hyperplane that maximizes the margin can be formulated as a quadratic programming problem.
  • Convex Optimization: Branch of mathematics that studies the optimization of convex functions, which are functions that have a non-negative second derivative and are always either increasing or decreasing. The objective function is convex and has a unique global minimum.