SVMOptions<T>

Options & Configuration · AiDotNet.Models.Options

Configuration options for Support Vector Machine classifiers.

Inheritance: ModelOptions → ClassifierOptions<T> → SVMOptions<T>

For Beginners

SVMs are like drawing the best possible line between classes!

Imagine you have red and blue dots on paper. You want to draw a line that:

  1. Separates the red dots from the blue dots
  2. Stays as far as possible from both sets of dots

The “margin” is the gap between the line and the nearest dots on each side. SVMs find the line that maximizes this margin.

Key concepts:

  • C parameter: How much to penalize misclassifications (higher = stricter)
  • Kernel: How to measure similarity between points (linear, RBF, polynomial)
  • Support vectors: The dots closest to the line that define its position

SVMs work great when:

  • You have clear separation between classes
  • You have many features but not tons of samples
  • You need a robust classifier

How It Works

Support Vector Machines (SVMs) find the optimal hyperplane that maximizes the margin between classes. They are particularly effective in high-dimensional spaces and can handle non-linear classification using kernel functions.

Constructors

Constructor Summary
SVMOptions()

Properties

Property Summary
KernelType Kernel { get; set; } Gets or sets the kernel type.
bool OneVsRest { get; set; } Gets or sets whether to use one-vs-rest or one-vs-one for multi-class.
bool Probability { get; set; } Gets or sets whether to calculate probability estimates.
bool Shrinking { get; set; } Gets or sets whether to use shrinking heuristic.
double C { get; set; } Gets or sets the regularization parameter C.
double CacheSize { get; set; } Gets or sets the cache size in MB for kernel computations.
double Coef0 { get; set; } Gets or sets the independent term (coef0) in kernel function.
double Tolerance { get; set; } Gets or sets the tolerance for stopping criterion.
double? Gamma { get; set; } Gets or sets the kernel coefficient gamma.
int Degree { get; set; } Gets or sets the degree for polynomial kernel.
int MaxIterations { get; set; } Gets or sets the maximum number of iterations.