HGDL优化
项目描述
HGDL
HGDL是一个HPC分布式约束函数优化的API。在核心,算法使用局部和全局优化以及基于跳变函数的膨胀来提供可微函数的独特最优解的列表。这解决了优化问题非唯一性的常见问题,尤其是在机器学习领域。
用法
以下展示了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
致谢
主要开发者:Marcus Noack (MarcusNoack@lbl.gov) 和 David Perryman。来自DOE国家实验室的几个人提供了见解,这些见解导致了当前版本的代码。有关更多详细信息,请参阅AUTHORS。HGDL基于Noack和Funke的HGDN算法。
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪一个,请了解更多关于安装包的信息。
源分布
hgdl-2.2.1.tar.gz (15.1 kB 查看散列)
构建分布
hgdl-2.2.1-py3-none-any.whl (18.1 kB 查看散列)