Skip to main content

HGDL Optimization

Project description

HGDL

PyPI Documentation Status HGDL CI Codecov PyPI - License DOI

HGDL is an API for HPC distributed constrained function optimization. At the core, the algorithm uses local and global optimization and bump-function-based deflation to provide a growing list of unique optima of a differentiable function. This tackles the common problem of non-uniquness of optimization problems, especially in machine learning.

Usage

The following demonstrates a simple usage of the HGDL API.

import numpy as np
from hgdl.hgdl import HGDL as hgdl
from hgdl.support_functions import *
import dask.distributed as distributed

bounds = np.array([[-500,500],[-500,500]])
#dask_client = distributed.Client("10.0.0.184:8786")
a = hgdl(schwefel, schwefel_gradient, bounds,
        global_optimizer = "genetic",
        local_optimizer = "dNewton", #put in local optimzers from scipy.optimize.minimize
        number_of_optima = 30000,
        num_epochs = 100)

x0 = np.random.uniform(low = bounds[:, 0], high = bounds[:,1],size = (20,2))
a.optimize(x0 = x0)

###the thread is now released, but the work continues in the background

a.get_latest() ##prints the current result whenever queried

a.kill_client() ##stops the execution and returns the result

Credits

Main Developers: Marcus Noack (MarcusNoack@lbl.gov) and David Perryman. Several people from across the DOE national labs have given insights that led to the code in its current form. See AUTHORS for more details on that. HGDL is based on the HGDN algorithm by Noack and Funke.

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

hgdl-2.3.3.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hgdl-2.3.3-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file hgdl-2.3.3.tar.gz.

File metadata

  • Download URL: hgdl-2.3.3.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hgdl-2.3.3.tar.gz
Algorithm Hash digest
SHA256 20d86e7aa42c4002f91fbbef6bf21e6175b64beed020d38f1f0b47b21f091ca6
MD5 1da45bed6fdd00353365072846bb50bb
BLAKE2b-256 233f9d501b254cd372fe3e7c5deb33ed4052c49c784914fdcd6ba1108b2e1dda

See more details on using hashes here.

File details

Details for the file hgdl-2.3.3-py3-none-any.whl.

File metadata

  • Download URL: hgdl-2.3.3-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hgdl-2.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 de41df95dee066d927cfe99c3b4a4257cc7de995803e2a98aafac28300f0fa0c
MD5 a4024b4ade486153bf9a13b19ac3b9f0
BLAKE2b-256 ab126a93496d912eb7548eb2a3b63ddbdf932e4927465c1d83dafe9facbc7380

See more details on using hashes here.

Supported by

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