Skip to main content

LinearSVR

Linear support-vector regression with an epsilon-insensitive loss solved in the primal.

Algorithm

Errors within epsilon of the target incur no penalty; outside the tube the loss is linear (or squared). The learning rate is scaled by a Lipschitz bound for stable convergence.

Constructor

Skigen::LinearSVR<Scalar> model(Scalar C = 1.0, Scalar epsilon = 0.0, Loss = EpsilonInsensitive, ...);

Parameters

ParameterDefaultDescription
C1.0Inverse regularisation strength.
epsilon0.0Width of the insensitive tube.
max_iter1000Optimiser iterations.
fit_intercepttrueLearn a bias term.

Methods

MethodDescription
fit(X, y)Optimise the epsilon-insensitive objective.
predict(X)Real-valued predictions.
score(X, y)R².

Fitted Attributes

AccessorDescription
coef()Weight vector.
intercept()Bias term.

Example

Skigen::LinearSVR<double> svr(1.0);
svr.fit(X, y);
auto preds = svr.predict(X_test);
Verified against scikit-learn

This estimator is checked by the parity suite. See the generator tests/parity/generate_svm_reference.py and the reference fixtures in tests/parity/data/linear_svr/, exercised by tests/parity/parity_svm.cpp.

API Reference

For full signatures see the LinearSVR API Reference.