Public Types | Public Attributes | List of all members
ML::SVM::LinearSVMParams Struct Reference

#include <linear.hpp>

Collaboration diagram for ML::SVM::LinearSVMParams:
Collaboration graph

Public Types

enum  Penalty { L1 , L2 }
 
enum  Loss { HINGE , SQUARED_HINGE , EPSILON_INSENSITIVE , SQUARED_EPSILON_INSENSITIVE }
 

Public Attributes

Penalty penalty = L2
 
Loss loss = HINGE
 
bool fit_intercept = true
 
bool penalized_intercept = false
 
bool probability = false
 
int max_iter = 1000
 
int linesearch_max_iter = 100
 
int lbfgs_memory = 5
 
int verbose = 0
 
double C = 1.0
 
double grad_tol = 0.0001
 
double change_tol = 0.00001
 
double epsilon = 0.0
 

Member Enumeration Documentation

◆ Loss

The loss function.

Enumerator
HINGE 

max(1 - y_i x_i w, 0)

SQUARED_HINGE 

max(1 - y_i x_i w, 0)^2

EPSILON_INSENSITIVE 

max(|y_i - x_i w| - epsilon, 0)

SQUARED_EPSILON_INSENSITIVE 

max(|y_i - x_i w| - epsilon, 0)^2

◆ Penalty

The regularization term.

Enumerator
L1 

Abs. value of the weights: sum |w|

L2 

Squared value of the weights: sum w^2

Member Data Documentation

◆ C

double ML::SVM::LinearSVMParams::C = 1.0

The constant scaling factor of the main term in the loss function. (You can also think of that as the inverse factor of the penalty term).

◆ change_tol

double ML::SVM::LinearSVMParams::change_tol = 0.00001

The threshold on the function change for the underlying QN solver.

◆ epsilon

double ML::SVM::LinearSVMParams::epsilon = 0.0

The epsilon-sensitivity parameter (applicable to the SVM-regression (SVR) loss functions).

◆ fit_intercept

bool ML::SVM::LinearSVMParams::fit_intercept = true

Whether to fit the bias term.

◆ grad_tol

double ML::SVM::LinearSVMParams::grad_tol = 0.0001

The threshold on the gradient for the underlying QN solver.

◆ lbfgs_memory

int ML::SVM::LinearSVMParams::lbfgs_memory = 5

Number of vectors approximating the hessian for the underlying QN solver (l-bfgs).

◆ linesearch_max_iter

int ML::SVM::LinearSVMParams::linesearch_max_iter = 100

Maximum number of linesearch (inner loop) iterations for the underlying QN solver.

◆ loss

Loss ML::SVM::LinearSVMParams::loss = HINGE

The loss function.

◆ max_iter

int ML::SVM::LinearSVMParams::max_iter = 1000

Maximum number of iterations for the underlying QN solver.

◆ penalized_intercept

bool ML::SVM::LinearSVMParams::penalized_intercept = false

When true, the bias term is treated the same way as other data features. Enabling this feature forces an extra copying the input data X.

◆ penalty

Penalty ML::SVM::LinearSVMParams::penalty = L2

The regularization term.

◆ probability

bool ML::SVM::LinearSVMParams::probability = false

Whether to estimate probabilities using Platt scaling (applicable to SVC).

◆ verbose

int ML::SVM::LinearSVMParams::verbose = 0

Triggers extra output when greater than zero.


The documentation for this struct was generated from the following file: