Skip to main content

Least Squares Support Vector Regression with optimized hyperparameters

Deprecated. This package is no longer maintained and has been superseded by optimized-svm (documentation). See the migration guide.

# before
from optimized_lssvr import OptimizedLSSVR
model = OptimizedLSSVR()
# after
from optimized_svm import OptimizedSVR
model = OptimizedSVR(loss="squared")

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.

Known issues

This final release (0.0.3) only adds the deprecation notice; the following issues will not be fixed.

  • The final fit adds lmbda * n to the kernel diagonal, whereas the cross-validation uses lmbda * n_tr (n_tr = size of the training fold). The refitted model is therefore regularized more strongly than the model the hyperparameters were optimized for (by about 25 % with 5 folds).
  • The cross-validation folds are not shuffled.
  • sklearn.utils.estimator_checks.check_estimator fails with current scikit-learn versions.

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.

Metadata

Release files for optimized-lssvr 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optimized-lssvr 0.0.3
File Size Uploaded Provenance Actions
optimized_lssvr-0.0.3.tar.gz 8.3 kB Without provenance Details for optimized_lssvr-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for optimized-lssvr 0.0.3
File Interpreter ABI Platform Actions
optimized_lssvr-0.0.3-py3-none-any.whl Python 3 none any Details for optimized_lssvr-0.0.3-py3-none-any.whl

Total release size: 17.5 kB

Release files / optimized_lssvr-0.0.3.tar.gz

Download URL optimized_lssvr-0.0.3.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ba37f97ef084efc58819759ef505c6c2dfd523b493c674e5c9426861910c055f
BLAKE2b-256 checksum
How to use checksums
fdd7b2c75903159b711817b1ae56e9bf4cb9924e50d76e0d88cca238e328fc1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / optimized_lssvr-0.0.3-py3-none-any.whl

Download URL optimized_lssvr-0.0.3-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1484296aeee4962419e578b8a6a28777a51a6b83e86df89da30439ca9c603262
BLAKE2b-256 checksum
How to use checksums
e6b3947f6c00910e7cfea7f92e831cbcc59b735ba4b590281c560566d4935712
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for optimized-lssvr 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page