Skip to main content

This is ego method.Some of code are non-originality, just copy for use. All the referenced code are marked,details can be shown in their sources

Project description

Multiply EGO

EGO (Efficient global optimization) and multiply target EGO method.

References: Jones, D. R., Schonlau, M. & Welch, W. J. Efficient global optimization of expensive black-box functions. J. Global Optim. 13, 455–492 (1998)

Python Versions Version pypi Versions

Install

pip install multiego

Usage

if __name__ == "__main__":
    from sklearn.datasets import fetch_california_housing
    import numpy as np
    from multiego.ego import search_space, Ego
    from sklearn.model_selection import GridSearchCV
    from sklearn.svm import SVR

    #####model1#####
    model = SVR() #pre-trained good model with optimized prarmeters for special features
    ###

    X, y = fetch_california_housing(return_X_y=True)
    X = X[:, :5] 
    searchspace_list = [
        np.arange(0.01, 1, 0.1),
        np.array([0, 20, 30, 50, 70, 90]),
        np.arange(1, 10, 1),
        np.array([0, 1]),
        np.arange(0.4, 0.6, 0.02),
    ]
    searchspace = search_space(*searchspace_list)
    #
    me = Ego(searchspace, X, y, 500, model, n_jobs=6)

    re = me.egosearch()

Introduction

multiego.ego.Ego

For sklean-type single model.

multiego.base_ego.BaseEgo

  1. For any user-defined single model, just need offer mean and std of search space.
  2. For big search space out of memory , just need offer mean and std of search space.

multiego.multiplyego.MultiEgo

For sklean-type models.

multiego.base_multiplyego.BaseMultiEgo

  1. For any user-defined models, just need offer predict_y of search space.
  2. For big search space out of memory, just need offer predict_y of search space.

link

More examples can be found in test.

More powerful can be found mipego

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multiego-0.0.15.tar.gz (14.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page