UQPyL 2.0.3__tar.gz → 2.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {UQPyL-2.0.3 → UQPyL-2.0.4}/PKG-INFO +1 -1
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/__init__.py +1 -1
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/asmo.py +14 -11
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL.egg-info/PKG-INFO +1 -1
- {UQPyL-2.0.3 → UQPyL-2.0.4}/pyproject.toml +1 -1
- {UQPyL-2.0.3 → UQPyL-2.0.4}/setup.py +1 -1
- {UQPyL-2.0.3 → UQPyL-2.0.4}/LICENSE.md +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/README.md +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/DoE/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/DoE/_lhs.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/DoE/fast_sequence.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/DoE/full_fact.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/DoE/lhs.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/DoE/morris_sequence.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/DoE/random.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/DoE/sampler_ABC.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/DoE/sobol_sequence.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/_binary_ga.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/adam.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/boxmin.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/ga.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/mo_asmo.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/moea_d.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/nsga_ii.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/pso.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/sce_ua.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/utility_functions/_NDsort.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/utility_functions/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/optimization/utility_functions/_uniformPoint.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/problems/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/problems/multi_DTLZ.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/problems/multi_ZDT.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/problems/pratical_problem.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/problems/problem_ABC.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/problems/single_Benchmarks.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/problems/utility_functions/_NDsort.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/problems/utility_functions/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/problems/utility_functions/_uniformPoint.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/sensibility/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/sensibility/delta_test.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/sensibility/fast.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/sensibility/mars_sa.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/sensibility/morris.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/sensibility/rbd_fast.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/sensibility/rsa.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/sensibility/sa_ABC.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/sensibility/sobol.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/BaggingEnsemble.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/BootstrapEnsemble.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/fully_connect_neural_network.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/gaussian_process.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/gp_kernels/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/gp_kernels/base_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/gp_kernels/c_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/gp_kernels/dot_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/gp_kernels/matern_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/gp_kernels/rbf_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/gp_kernels/rq_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/krg_kernels/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/krg_kernels/base_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/krg_kernels/cubic_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/krg_kernels/exp_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/krg_kernels/guass_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/kriging.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/lasso_/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/lasso_/lasso_fast.c +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/linear_regression.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/_basis.c +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/_forward.c +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/_knot_search.c +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/_pruning.c +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/_qr.c +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/_record.c +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/_types.c +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/_util.c +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mars_/pyearth/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mlp_utility/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mlp_utility/_activation_funcs.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/mlp_utility/base.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/polynomial_regression.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/radial_basis_function.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/rbf_kernels/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/rbf_kernels/base_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/rbf_kernels/cubic_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/rbf_kernels/gaussian_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/rbf_kernels/linear_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/rbf_kernels/multiquadric_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/rbf_kernels/thin_plate_spline_kernel.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/support_vector_machine.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/surrogate_ABC.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/svr_/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/svr_/libsvm_interface.cpp +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/surrogates/svr_/svm.cpp +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/utility/__init__.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/utility/grid_search.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/utility/metrics.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/utility/model_selections.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/utility/polynomial_features.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL/utility/scalers.py +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL.egg-info/SOURCES.txt +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL.egg-info/dependency_links.txt +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL.egg-info/requires.txt +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/UQPyL.egg-info/top_level.txt +0 -0
- {UQPyL-2.0.3 → UQPyL-2.0.4}/setup.cfg +0 -0
|
@@ -3,6 +3,7 @@ from tqdm import tqdm
|
|
|
3
3
|
from typing import Optional
|
|
4
4
|
|
|
5
5
|
from .sce_ua import SCE_UA
|
|
6
|
+
from .pso import PSO
|
|
6
7
|
from ..DoE import LHS
|
|
7
8
|
from ..problems import Problem
|
|
8
9
|
from ..surrogates import Surrogate
|
|
@@ -46,11 +47,11 @@ class ASMO():
|
|
|
46
47
|
#construct optimization problem to combine surrogate and algorithm
|
|
47
48
|
self.subProblem=Problem(self.surrogate.predict, self.n_input, 1, self.ub, self.lb)
|
|
48
49
|
|
|
49
|
-
def run(self,
|
|
50
|
+
def run(self, oneStep=False):
|
|
50
51
|
'''
|
|
51
52
|
main procedure
|
|
52
53
|
'''
|
|
53
|
-
show_process=tqdm(total=maxFE)
|
|
54
|
+
show_process=tqdm(total=self.maxFE)
|
|
54
55
|
FE=0
|
|
55
56
|
TT=0
|
|
56
57
|
n_input=self.n_input
|
|
@@ -65,8 +66,8 @@ class ASMO():
|
|
|
65
66
|
XPop=self.x_init
|
|
66
67
|
YPop=self.y_init
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
show_process.update(
|
|
69
|
+
FE=YPop.shape[0]
|
|
70
|
+
show_process.update(FE)
|
|
70
71
|
###
|
|
71
72
|
idx=np.argsort(YPop, axis=0)
|
|
72
73
|
BestY=YPop[idx[0,0],0]
|
|
@@ -78,11 +79,11 @@ class ASMO():
|
|
|
78
79
|
# history_BestY.append(BestY)
|
|
79
80
|
|
|
80
81
|
if (oneStep==False):
|
|
81
|
-
while
|
|
82
|
+
while FE<self.maxFE and TT<self.maxTolerateTime:
|
|
82
83
|
show_process.update(1)
|
|
83
84
|
# Build surrogate model
|
|
84
85
|
self.surrogate.fit(XPop, YPop)
|
|
85
|
-
res=
|
|
86
|
+
res=PSO(self.subProblem).run()
|
|
86
87
|
BestX_SM=res['best_dec']
|
|
87
88
|
|
|
88
89
|
TempY=self.evaluate(BestX_SM)
|
|
@@ -91,8 +92,10 @@ class ASMO():
|
|
|
91
92
|
YPop=np.vstack((YPop,TempY))
|
|
92
93
|
|
|
93
94
|
if TempY[0,0]<BestY:
|
|
94
|
-
BestY=np.copy(TempY)
|
|
95
|
+
BestY=np.copy(TempY[0,0])
|
|
95
96
|
BestX=np.copy(BestX_SM)
|
|
97
|
+
history_best_decs[FE]=BestX
|
|
98
|
+
history_best_objs[FE]=BestY
|
|
96
99
|
else:
|
|
97
100
|
self.surrogate.fit(XPop, YPop)
|
|
98
101
|
res=SCE_UA(self.subProblem).run()
|
|
@@ -100,17 +103,17 @@ class ASMO():
|
|
|
100
103
|
|
|
101
104
|
TempY=self.evaluate(BestX_SM)
|
|
102
105
|
|
|
103
|
-
|
|
106
|
+
FE+=1
|
|
104
107
|
XPop=np.vstack((XPop,BestX_SM))
|
|
105
108
|
YPop=np.vstack((YPop,TempY))
|
|
106
109
|
|
|
107
110
|
if TempY[0,0]<BestY:
|
|
108
111
|
BestY=np.copy(TempY)
|
|
109
112
|
BestX=np.copy(BestX_SM)
|
|
110
|
-
history_best_decs[
|
|
111
|
-
history_best_objs[
|
|
113
|
+
history_best_decs[FE]=BestX
|
|
114
|
+
history_best_objs[FE]=BestY
|
|
112
115
|
|
|
113
|
-
Result={'best_dec':BestX, 'best_obj':BestY, 'history_best_decs': history_best_decs, 'history_best_objs':history_best_objs ,'FE':
|
|
116
|
+
Result={'best_dec':BestX, 'best_obj':BestY, 'history_best_decs': history_best_decs, 'history_best_objs':history_best_objs ,'FE':FE}
|
|
114
117
|
|
|
115
118
|
return Result
|
|
116
119
|
|
|
@@ -41,7 +41,7 @@ extensions=cythonize(cython_extensions, compiler_directives={'cdivision': True,
|
|
|
41
41
|
setup(
|
|
42
42
|
name="UQPyL",
|
|
43
43
|
author="wmtSky",
|
|
44
|
-
version="2.0.
|
|
44
|
+
version="2.0.4",
|
|
45
45
|
author_email="wmtsky@hhu.edu.cn",
|
|
46
46
|
# ... 其他常规setup参数 ...
|
|
47
47
|
ext_modules=extensions, # 如果有自定义的编译行为
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|