TD_SVMPredict Usage Notes | Teradata Vantage - TD_SVMPredict Usage Notes - Analytics Database

Database Analytic Functions

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

SVM Optimization

See TD_SVM.

How Support Vector Machine Predicts on the Unseen Data

Support Vector Machine (SVM) uses a learned hyperplane to make predictions on unseen data points. The hyperplane is determined during the training phase by minimizing the error or maximizing the margin, depending on the type of task (classification or regression). The kernel trick is used to transform the input data into a higher-dimensional space if necessary to improve the performance of the SVM algorithm on complex, non-linear datasets.

Classification:

  1. Feature Extraction: Extracts the relevant features from the unseen data point.
  2. Distance Calculation: Calculates the distance between the new data point and the hyperplane that was learned during the training phase.
  3. Decision Rule: The sign of the distance indicates which side of the hyperplane the data point falls on.
    • If the distance is positive, the data point is classified as belonging to the positive class.
    • If the distance is negative, the data point is classified as belonging to the negative class.
  4. Confidence Estimation: The magnitude of the distance is also used to estimate the confidence level of the prediction.
    • A larger distance indicates a higher confidence in the prediction.
    • A smaller distance indicates lower confidence.

Regression:

  1. Feature Extraction: Extracts the relevant features from the new data point.
  2. Hyperplane Calculation: Calculates the predicted output value for the new data point based on the learned hyperplane during the training phase.
  3. Confidence Estimation: The distance between the predicted output value and the hyperplane is used to estimate the confidence level of the prediction.
    • A smaller distance indicates a higher confidence in the prediction.
    • A larger distance indicates lower confidence.

TD_SVMPredict function uses classification and regression tasks.

Inputs for Linear and Non-Linear Kernels

TD_SVMPredict accepts two inputs for linear kernel and three outputs for non-linear RBF kernel.

  • InputTable: Contains the test data set that needs to be predicted. The function predicts each row independent of the other rows based on the model trained by TD_SVM. The preprocessing steps carried out for TD_SVM should be done for the test data set as well before prediction.
  • ModelTable: Contains the model trained by TD_SVM. Manually modifying this table can return erroneous results. TD_SVMPredict only reads the weights and Loss function information from this table, and not the rest of the metrics.
  • RBFFitTable: This table is required if the 'Kernel' argument is 'RBF'. Manually modifying this table can return erroneous results. TD_SVM uses this table to transform the input dataset before creating the model. TD_SVMPredict should use the same weights and bias from this table to transform the test data set for correct results.