Skip to content

Least Squares Support Vector Regression with optimized hyperparameters

License

Notifications You must be signed in to change notification settings

wotzlaff/sklearn-optimized-lssvr

Repository files navigation

Least Squares Support Vector Regression with optimized hyperparameters

This is a simple implementation of the hyperparameter optimization approach proposed in [1].

Installation

pip install optimized-lssvr

Example

import numpy as np
from optimized_lssvr import OptimizedLSSVR

# generate example data
n, nft = 500, 5
x = np.random.rand(n, nft)
y = x[:, 0] - 5 * x[:, 1]

# create and fit model
model = OptimizedLSSVR(verbose=1)
model.fit(x, y)
print('final relative MSE:', model.relative_mse_)
print('optimized parameters:', model.params_)

More examples can be found in the examples directory.

References

[1] Fischer, A., Langensiepen, G., Luig, K., Strasdat, N., & Thies, T. (2015). Efficient optimization of hyper-parameters for least squares support vector regression. Optimization Methods and Software, 30(6), 1095-1108.

Releases

No releases published

Languages