SVMRegressor#

  • Domain: ai.onnx.ml

  • Since version: 1

Support Vector Machine regression prediction and one-class SVM anomaly detection.

Inputs

  • X (T): Data to be regressed.

Outputs

  • Y (tensor(float)): Regression outputs (one score per target per example).

Attributes

  • coefficients (float[]): Support vector coefficients.

  • kernel_params (float[]): List of 3 elements containing gamma, coef0, and degree, in that order. Zero if unused for the kernel.

  • kernel_type (string): The kernel type, one of ‘LINEAR,’ ‘POLY,’ ‘RBF,’ ‘SIGMOID’.

  • n_supports (int): The number of support vectors.

  • one_class (int): Flag indicating whether the regression is a one-class SVM or not.

  • post_transform (string): Indicates the transform to apply to the score.

  • rho (float[]): Intercept bias terms for the decision function.

  • support_vectors (float[]): Chosen support vectors

Type Constraints

  • T: The input type must be a tensor of a numeric type, either [C] or [N,C]. Allowed types: tensor(double), tensor(float), tensor(int32), tensor(int64).

Examples#

test_cc_svmregressor_linear

Node:
  ai.onnx.ml.SVMRegressor(x) -> (y)
  Attributes:
    kernel_type = "LINEAR"
    kernel_params = [0.0, 0.0, 0.0]
    support_vectors = [1.0, 0.0, 0.0, 1.0]
    coefficients = [2.0, -1.0]
    rho = [0.5]
    n_supports = 2
    post_transform = "NONE"
Inputs:
  x: shape=(2, 2), dtype=float32
    [[3., 1.],
     [0., 2.]]

Outputs:
  y: shape=(2, 1), dtype=float32
    [[ 5.5],
     [-1.5]]