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.2.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

hgdl-2.2.1-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hgdl-2.2.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for hgdl-2.2.1.tar.gz
Algorithm Hash digest
SHA256 4661d8a5d46ca7bf25141a8bf34347c4db81fce41ac8fcfd6aa918a63fc5dac1
MD5 2aab22f1032d3865bc0aa5323f302729
BLAKE2b-256 e596c2b7e262410de5fab571a258e73aa48727d435ceebaf8fc276ab2e4f6960

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hgdl-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for hgdl-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 501e10a78b51e9ec1cd28b3ee45019fbe7116eb88af7a69ddf4496ecefcce1cf
MD5 4d1e509457ab349366eb12f33ad50546
BLAKE2b-256 ed20f0782c0084d5007b521a25745323235dd4dd1bed0164561b683bfad8ccaf

See more details on using hashes here.

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