Private Member Functions | |
void | preprocessData () |
Loader. |
|
private |
Loader.
Preprocess the SVM model parameters and vectors required for computing f
std::runtime_error | Computed scaling is too large. |
Polynomial kernel => need to compute the weight combinations, \( s_i s_j \), of the model, stored as an unraveled upper triangular matrix. We also multiply them by two (when \( i \neq j \)), because \( s_i s_j = s_j s_i \) (see the polynomial kernels implementation for details). We also multiply the products by \( \gamma^2 \).
Compute the \( 2 \gamma * s_i \) factor for inhomogeneous polynomial, SCALED ACCORDINGLY (see the inhomogeneous polynomial kernel implementation for details on the required scaling)
Compute the \( s_i^2 \) factors