SVM options - SVM options - 5.3 English - 68552

AOCL API Guide (68552)

Document_ID
68552
Release_Date
2026-05-13
Version
5.3 English

The available Python options are detailed in the respective class constructor aoclda.svm.SVC(), aoclda.svm.SVR(), aoclda.svm.NuSVC(), or aoclda.svm.NuSVR().

Various options can be set to customize the SVM models by calling one of these functions. The following table details the available options, where \(\epsilon\) represents the machine precision.

Table 4.32 SVM options#

Option name

Type

Default

Description

Constraints

kernel

string

\(s=\) rbf

Kernel function to use for the calculations.

\(s=\) linear, poly, polynomial, rbf, or sigmoid.

coef0

real

\(r=0\)

Constant in ‘polynomial’ and ‘sigmoid’ kernels.

There are no constraints on \(r\).

cache size

real

\(r=-1\)

Size of the kernel cache in MB. The default value is -1.0 which automatically sets it to a value which will enable storage of the sampled kernel matrix. Increasing value of this option will result in faster training time.

\(-1 \le r\)

gamma

real

\(r=-1\)

Parameter for ‘rbf’, ‘polynomial’, and ‘sigmoid’ kernels. If the value is less than 0, it is set to 1/(n_features * Var(X)).

\(-1 \le r\)

epsilon

real

\(r=0.1\)

Defines the tolerance for errors in predictions by creating an acceptable margin (tube) within which errors are not penalized. Applies to SVR

\(0 \le r\)

max_ws_size

integer

\(i=-1\)

Specifies the maximum working set size. A value divisible by 64 is recommended for optimal performance. Setting -1 automatically selects the optimal size based on the input data.

\(-1 \le i\)

tau

real

\(r=\varepsilon\)

Numerical stability parameter used in working set selection when kernel is not positive semi definite.

\(0 \le r\)

tolerance

real

\(r=10^{-3}\)

Convergence tolerance.

\(0 < r\)

nu

real

\(r=0.5\)

An upper bound on the fraction of margin errors and a lower bound of the fraction of support vectors. Applies to NuSVC and NuSVR.

\(0 < r \le 1\)

max_iter

integer

\(i=100000\)

Sets the maximum number of iterations. Use 0 to specify no limit.

\(0 \le i\)

c

real

\(r=1\)

Regularization parameter. Controls the trade-off between maximizing the margin between classes and minimizing classification errors. A larger value means higher penalty to the loss function on misclassified observations. Applies to SVC, SVR and NuSVR.

\(0 < r\)

degree

integer

\(i=3\)

Parameter for ‘polynomial’ kernel.

\(1 \le i\)

mixed precision

string

\(s=\) no

Whether to use mixed precision iterative refinement, in which lower precision arithmetic is used before switching to the working precision for the final iterations.

\(s=\) no, or yes.

low precision convergence tolerance

real

\(r=10^{-2}\)

If mixed precision iterative refinement is enabled, convergence tolerance for the low precision phase.

\(0 \le r\)

low precision max_iter

integer

\(i=80000\)

If mixed precision iterative refinement is enabled, maximum number of iterations for the low precision phase.

\(0 \le i\)

check data

string

\(s=\) no

Check input data for NaNs prior to performing computation.

\(s=\) no, or yes.

storage order

string

\(s=\) column-major

Whether data is supplied and returned in row- or column-major order.

\(s=\) c, column-major, f, fortran, or row-major.

The option mixed precision switches on an experimental mode in which initial iterations are performed in lower precision before refining the result in the working precision. The option low precision max_iter sets the maximum number of iterations for the low-precision phase, and low precision convergence tolerance sets the convergence tolerance for the low-precision phase.