Metadata-Version: 2.1
Name: surrogate-toolbox
Version: 0.1.0
Summary: Surrogate Models, Metamodels, Response Surface
Home-page: UNKNOWN
Author: Julian Blank
Author-email: blankjul@egr.msu.edu
License: Apache License 2.0
Description: surrogate-toolbox
        ====================================================================
        
        
        For more information about our toolbox, users are encouraged to visit:
        https://www.egr.msu.edu/coinlab/blankjul/surrogate-toolbox/
        
        
        |travis| |python| |license|
        
        
        .. |travis| image:: https://travis-ci.com/julesy89/surrogate-toolbox.svg?token=nTg7CavPxWNfMp8Z66o3&branch=master
           :alt: build status
           :target: https://travis-ci.com/msu-coinlab/pymoo
        
        .. |python| image:: https://img.shields.io/badge/python-3.6-blue.svg
           :alt: python 3.6
        
        .. |license| image:: https://img.shields.io/badge/license-apache-orange.svg
           :alt: license apache
           :target: https://www.apache.org/licenses/LICENSE-2.0
        
        
        
        
        Installation
        ====================================================================
        
        The official release is always available at PyPi:
        
        .. code:: bash
        
            pip install -U surrogate-toolbox
        
        
        
        Usage
        ==================================
        
        
        
        DNN
        ----------------------------------
        
        
        .. code:: python
        
            
            from surrogate.metrics import calc_metric
            from surrogate.models.dnn import DNN
            from surrogate.util.sample import sine_function
        
            # initialize the model
            dnn = DNN(epochs=1000,
                      n_hidden=300,
                      lr=8e-4,
                      drop_rate=0.2,
                      device="cpu")
        
            # create some data to test this model on
            X, y, _X, _y = sine_function(200, 20)
        
            # let the model fit the data
            dnn.fit(X, y)
        
            # predict the data using the model
            y_hat = dnn.predict(_X)
        
            # calculate the error and print it
            mae = calc_metric("mae", _y, y_hat)
            print("Mean Absolute Error", mae)
            print("Time: ", dnn.time)
        
        
        
        Kriging
        ----------------------------------
        
        
        .. code:: python
        
            
            from surrogate.metrics import calc_metric
            from surrogate.models.kriging import Kriging
            from surrogate.util.sample import sine_function
        
            # initialize the model
            dnn = Kriging(regr="linear",
                          corr="gauss",
                          ARD=False)
        
            # create some data to test this model on
            X, y, _X, _y = sine_function(100, 20)
        
            # let the model fit the data
            dnn.fit(X, y)
        
            # predict the data using the model
            y_hat = dnn.predict(_X)
        
            # calculate the error and print it
            mae = calc_metric("mae", _y, y_hat)
            print("Mean Absolute Error", mae)
        
        
        
        Benchmarking
        ==================================
        
        
        .. code:: python
        
            
            import numpy as np
        
            from surrogate.benchmark import Benchmark
            from surrogate.models.kriging import Kriging
            from surrogate.models.rbf import RBF
            from surrogate.partitioning.random import RandomPartitioning
        
            # create some data to benchmark on
            X = np.random.random((100, 1)) * 2 * np.pi
            y = np.sin(X)
        
            # set up the benchmark and add the models to be used
            benchmark = Benchmark(n_threads=4, verbose=True)
            benchmark.add_models(RBF)
            benchmark.add_models(Kriging)
        
            # create partitions to validate the performance of each model
            partitions = RandomPartitioning(X, 50, 20, n_sets=2, seed=1).do()
        
            # runs the experiment with the specified partitioning
            benchmark.do(X, y, partitions=partitions)
        
            # print out the benchmark results
            benchmark.print()
        
        
        
        ::
        
                                                                         mae
                                                                      median           min           max          mean           std
            model   params
            Kriging {'regr': 'constant', 'corr': 'exp'}         3.783402e-03  3.542125e-03  4.024679e-03  3.783402e-03  3.412173e-04
                    {'regr': 'constant', 'corr': 'gauss'}       1.385772e-08  8.326561e-09  1.938889e-08  1.385772e-08  7.822248e-09
                    {'regr': 'constant', 'corr': 'spherical'}   2.918926e-03  2.667338e-03  3.170515e-03  2.918926e-03  3.557998e-04
                    {'regr': 'constant', 'corr': 'spline'}      6.576018e-05  7.666640e-06  1.238537e-04  6.576018e-05  8.215667e-05
                    {'regr': 'linear', 'corr': 'exp'}           3.885536e-03  3.563489e-03  4.207582e-03  3.885536e-03  4.554424e-04
                    {'regr': 'linear', 'corr': 'gauss'}         1.328234e-08  7.248450e-09  1.931623e-08  1.328234e-08  8.533211e-09
                    {'regr': 'linear', 'corr': 'spherical'}     3.012103e-03  2.815800e-03  3.208406e-03  3.012103e-03  2.776145e-04
                    {'regr': 'linear', 'corr': 'spline'}        3.754601e-05  6.585865e-06  6.850615e-05  3.754601e-05  4.378425e-05
                    {'regr': 'quadratic', 'corr': 'exp'}        3.938385e-03  3.475375e-03  4.401396e-03  3.938385e-03  6.547954e-04
                    {'regr': 'quadratic', 'corr': 'gauss'}      1.358994e-08  7.131064e-09  2.004881e-08  1.358994e-08  9.134226e-09
                    {'regr': 'quadratic', 'corr': 'spherical'}  3.056739e-03  2.723626e-03  3.389851e-03  3.056739e-03  4.710923e-04
                    {'regr': 'quadratic', 'corr': 'spline'}     4.062150e-05  6.587394e-06  7.465561e-05  4.062150e-05  4.813150e-05
            RBF     {'kernel': 'cubic', 'tail': 'linear'}       4.375504e-05  1.356983e-05  7.394024e-05  4.375504e-05  4.268833e-05
                    {'kernel': 'tps', 'tail': 'linear'}         3.838522e-04  2.126608e-04  5.550436e-04  3.838522e-04  2.421012e-04
        
        
        
        
        Contact
        =======
        
        
        Feel free to contact us if you have any question:
        
        ::
        
            Julian Blank (blankjul [at] egr.msu.edu)
            Michigan State University
            Computational Optimization and Innovation Laboratory (COIN)
            East Lansing, MI 48824, USA
        
        
        ::
        
            Zhichao Lu (luzhicha [at] egr.msu.edu)
            Michigan State University
            Computational Optimization and Innovation Laboratory (COIN)
            East Lansing, MI 48824, USA
        
        
Keywords: optimization
Platform: any
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
Provides-Extra: full
Provides-Extra: core
