Support Vector Regression using the ε-insensitive loss function.
More...
#include <SupportVectorRegression.hpp>
|
| enum class | KernelType { LINEAR
, POLYNOMIAL
, RBF
} |
| | Kernel function types.
|
| |
Support Vector Regression using the ε-insensitive loss function.
◆ SupportVectorRegression()
| SupportVectorRegression::SupportVectorRegression |
( |
double |
C = 1.0, |
|
|
double |
epsilon = 0.1, |
|
|
KernelType |
kernel_type = KernelType::RBF, |
|
|
int |
degree = 3, |
|
|
double |
gamma = 1.0, |
|
|
double |
coef0 = 0.0 |
|
) |
| |
Constructs a SupportVectorRegression model.
- Parameters
-
| C | Regularization parameter. |
| epsilon | Epsilon parameter in the ε-insensitive loss function. |
| kernel_type | Type of kernel function to use. |
| degree | Degree for polynomial kernel. |
| gamma | Gamma parameter for RBF kernel. |
| coef0 | Independent term in polynomial kernel. |
◆ fit()
| void SupportVectorRegression::fit |
( |
const std::vector< std::vector< double >> & |
X, |
|
|
const std::vector< double > & |
y |
|
) |
| |
Fits the SVR model to the training data.
- Parameters
-
| X | A vector of feature vectors (training data). |
| y | A vector of target values (training labels). |
◆ predict()
| std::vector< double > SupportVectorRegression::predict |
( |
const std::vector< std::vector< double >> & |
X | ) |
const |
Predicts target values for the given input data.
- Parameters
-
| X | A vector of feature vectors (test data). |
- Returns
- A vector of predicted target values.
The documentation for this class was generated from the following file: