Skip to main content

Surrogate Search CV

CircleCI PyPi

This package implements a randomized hyper parameter search for sklearn (similar to RandomizedSearchCV) but utilizes surrogate adaptive sampling from pySOT. Use this similarly to GridSearchCV with a few extra paramters.

Usage

pip install sklearn-surrogatesearchcv

The interface is unimaginative, stylistically similar to RandomizedSearchCV.

class SurrogateSearchCV(object):
    """Surrogate search with cross validation for hyper parameter tuning.
    """

    def __init__(self, estimator, n_iter=10, param_def=None, refit=False,
                 **kwargs):
        """
        :param estimator: estimator
        :param n_iter: number of iterations to run (default 10)
        :param param_def: list of dictionaries, e.g.
            [
                {
                    'name': 'alpha',
                    'integer': False,
                    'lb': 0.1,
                    'ub': 0.9,
                },
                {
                    'name': 'max_depth',
                    'integer': True,
                    'lb': 3,
                    'ub': 12,
                }
            ]
        :param **: every other parameter is the same as GridSearchCV
        """

The result can be found in the following properties of the class instance after running.

params_history_
score_history_
best_params_
best_score_

For a complete example, please refer to src/test/test_basic.py.

Resources

A slide about role of surrogate optimization in ml. link

Metadata

Release files for sklearn-surrogatesearchcv 0.1.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 sklearn-surrogatesearchcv 0.1.3
File Size Uploaded Provenance Actions
sklearn_surrogatesearchcv-0.1.3.tar.gz 3.6 kB Without provenance Details for sklearn_surrogatesearchcv-0.1.3.tar.gz

Release files / sklearn_surrogatesearchcv-0.1.3.tar.gz

Download URL sklearn_surrogatesearchcv-0.1.3.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4a9a11e76414a14bbb1caa343369cee497b3e50e8ab64f5c95896d1627307149
BLAKE2b-256 checksum
How to use checksums
e90821a385bfdde8b1c4431257511ad30e2be3fc6188c4d8ff3899f0fa959294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.4

Security for sklearn-surrogatesearchcv 0.1.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