hdim-opt 1.3.0__py3-none-any.whl → 1.3.1__py3-none-any.whl
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.
- hdim_opt/__init__.py +7 -6
- hdim_opt/hyperellipsoid_sampling.py +8 -6
- hdim_opt/quasar_helpers.py +21 -21
- hdim_opt/quasar_optimization.py +25 -21
- hdim_opt/sobol_sampling.py +1 -1
- hdim_opt/sobol_sensitivity.py +7 -6
- hdim_opt/waveform_analysis.py +3 -0
- {hdim_opt-1.3.0.dist-info → hdim_opt-1.3.1.dist-info}/METADATA +21 -7
- hdim_opt-1.3.1.dist-info/RECORD +12 -0
- {hdim_opt-1.3.0.dist-info → hdim_opt-1.3.1.dist-info}/WHEEL +1 -1
- hdim_opt-1.3.0.dist-info/RECORD +0 -12
- {hdim_opt-1.3.0.dist-info → hdim_opt-1.3.1.dist-info}/top_level.txt +0 -0
hdim_opt/__init__.py
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
Functions:
|
|
6
6
|
- quasar: QUASAR optimization for high-dimensional, non-differentiable problems.
|
|
7
|
-
-
|
|
7
|
+
- hyperellipsoid: Generate a non-uniform hyperellipsoid density sequence.
|
|
8
8
|
- sobol: Generate a uniform Sobol sequence (via SciPy).
|
|
9
9
|
- sensitivity: Perform Sobol sensitivity analysis to measure each variable's importance on objective function results (via SALib).
|
|
10
|
-
- waveform: Decompose the input waveform array (handles time- and frequency-domain via FFT / IFFT) into a diagnostic summary.
|
|
10
|
+
- waveform: Decompose the input waveform array (handles time- and frequency-domain via FFT / IFFT) into a diagnostic summary (work in progress).
|
|
11
|
+
- isotropize: Isotropize the input matrix using zero-phase component analysis.
|
|
11
12
|
|
|
12
13
|
Modules:
|
|
13
14
|
- test_functions: Contains test functions for local optimization testing.
|
|
@@ -29,7 +30,7 @@ Example Usage:
|
|
|
29
30
|
>>> solution, fitness = h.quasar(obj_func, bounds)
|
|
30
31
|
>>> sens_matrix = h.sensitivity(obj_func, bounds)
|
|
31
32
|
|
|
32
|
-
>>> hds_samples = h.
|
|
33
|
+
>>> hds_samples = h.hyperellipsoid(n_samples, bounds)
|
|
33
34
|
>>> sobol_samples = h.sobol(n_samples, bounds)
|
|
34
35
|
>>> isotropic_samples = h.isotropize(sobol_samples)
|
|
35
36
|
|
|
@@ -37,12 +38,12 @@ Example Usage:
|
|
|
37
38
|
"""
|
|
38
39
|
|
|
39
40
|
# package version
|
|
40
|
-
__version__ = "1.3.
|
|
41
|
-
__all__ = ['quasar', '
|
|
41
|
+
__version__ = "1.3.1"
|
|
42
|
+
__all__ = ['quasar', 'hyperellipsoid', 'sobol', 'sensitivity', 'test_functions', 'quasar_helpers','waveform'] # available for star imports
|
|
42
43
|
|
|
43
44
|
# import core components
|
|
44
45
|
from .quasar_optimization import optimize as quasar
|
|
45
|
-
from .hyperellipsoid_sampling import sample as
|
|
46
|
+
from .hyperellipsoid_sampling import sample as hyperellipsoid
|
|
46
47
|
from .sobol_sampling import sobol_sample as sobol
|
|
47
48
|
from .sobol_sensitivity import sens_analysis as sensitivity
|
|
48
49
|
from .waveform_analysis import analyze_waveform as waveform
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# global epslion
|
|
2
|
-
epsilon = 1e-
|
|
2
|
+
epsilon = 1e-16
|
|
3
3
|
|
|
4
4
|
### misc helper functions
|
|
5
5
|
|
|
@@ -179,6 +179,7 @@ def fit_pca_for_cluster(cluster_samples, current_origin, initial_samples_std, n_
|
|
|
179
179
|
def sample(n_samples, bounds,
|
|
180
180
|
weights=None, normalize=False,
|
|
181
181
|
n_ellipsoids=None, n_initial_clusters=None, n_initial_qmc=None,
|
|
182
|
+
ellipsoid_scaling_factor=None,
|
|
182
183
|
seed=None, plot_dendrogram=False, verbose=False):
|
|
183
184
|
'''
|
|
184
185
|
Objective:
|
|
@@ -367,11 +368,12 @@ def sample(n_samples, bounds,
|
|
|
367
368
|
confidence_level = 0.9999 # captures 99.99% of cluster's samples
|
|
368
369
|
|
|
369
370
|
# critical value (the statistical radius squared)
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
371
|
+
if ellipsoid_scaling_factor == None:
|
|
372
|
+
chi2_critical_value = stats.chi2.ppf(confidence_level, df=n_dimensions)
|
|
373
|
+
baseline_factor = 0.55 - 0.01*np.log(n_dimensions) # empirically derived to resample out-of-bounds points
|
|
374
|
+
|
|
375
|
+
# square root as the scaling factor (Mahalanobis distance)
|
|
376
|
+
ellipsoid_scaling_factor = baseline_factor * np.sqrt(chi2_critical_value)
|
|
375
377
|
|
|
376
378
|
# QMC sequence for radius scaling
|
|
377
379
|
radius_qmc_sampler = stats.qmc.Sobol(d=1, seed=seed+1) # offset seed from initial qmc
|
hdim_opt/quasar_helpers.py
CHANGED
|
@@ -2,52 +2,52 @@
|
|
|
2
2
|
import pandas as pd
|
|
3
3
|
from sklearn.preprocessing import StandardScaler
|
|
4
4
|
import numpy as np
|
|
5
|
-
|
|
6
|
-
epsilon = 1e-12
|
|
5
|
+
epsilon = 1e-16
|
|
7
6
|
|
|
8
7
|
def isotropize(data):
|
|
9
8
|
'''
|
|
10
9
|
Objective:
|
|
11
|
-
- Converts data to isotropic space
|
|
12
|
-
-
|
|
13
|
-
Inputs:
|
|
14
|
-
- data: Input data.
|
|
15
|
-
Outputs:
|
|
16
|
-
- data_isotropic: Isotropized data.
|
|
17
|
-
- metadata: Scaler and whitening matrix
|
|
10
|
+
- Converts data to isotropic space using Zero-Phase Component Analysis (ZCA).
|
|
11
|
+
- Maintains original feature orientation while removing correlations.
|
|
18
12
|
'''
|
|
13
|
+
from scipy.linalg import eigh
|
|
19
14
|
|
|
20
15
|
# convert to array
|
|
21
16
|
X = np.array(data)
|
|
22
17
|
|
|
23
18
|
# standard scaling (mean = 0, var = 1)
|
|
24
19
|
mean = np.mean(X, axis=0)
|
|
25
|
-
stdev = np.std(X, axis=0)
|
|
20
|
+
stdev = np.std(X, axis=0) + epsilon # Add epsilon to avoid div0
|
|
26
21
|
X_centered = (X - mean) / stdev
|
|
27
22
|
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
L = cholesky(cov, lower=True)
|
|
23
|
+
# eigen-decomposition of the correlation matrix
|
|
24
|
+
cov = np.cov(X_centered, rowvar=False) + np.eye(X_centered.shape[1]) * epsilon
|
|
25
|
+
eigenvalues, eigenvectors = eigh(cov) # eigh is more stable for symmetric matrices like covariance
|
|
32
26
|
|
|
33
|
-
#
|
|
34
|
-
|
|
27
|
+
# ZCA whitening matrix: W_zca = U @ diag(1/sqrt(lambda)) @ U.T
|
|
28
|
+
# transforms data to identity covariance while minimizing rotation
|
|
29
|
+
diag_inv_sqrt = np.diag(1.0 / np.sqrt(eigenvalues + epsilon))
|
|
30
|
+
W_zca = eigenvectors @ diag_inv_sqrt @ eigenvectors.T
|
|
31
|
+
|
|
32
|
+
# transform: y = X_centered @ W_zca.T
|
|
33
|
+
data_iso = np.dot(X_centered, W_zca.T)
|
|
35
34
|
|
|
36
35
|
# store parameters for deisotropization
|
|
37
36
|
params = {
|
|
38
37
|
'mean': mean,
|
|
39
38
|
'stdev': stdev,
|
|
40
|
-
'
|
|
39
|
+
'W_zca': W_zca,
|
|
40
|
+
'W_zca_inv': eigenvectors @ np.diag(np.sqrt(eigenvalues + epsilon)) @ eigenvectors.T
|
|
41
41
|
}
|
|
42
42
|
return data_iso, params
|
|
43
43
|
|
|
44
44
|
def deisotropize(data_iso, params):
|
|
45
|
-
'''De-isotropize data to its original parameter space.'''
|
|
45
|
+
'''De-isotropize data to its original parameter space via inverse ZCA.'''
|
|
46
46
|
|
|
47
|
-
#
|
|
48
|
-
data_centered = np.dot(data_iso, params['
|
|
47
|
+
# inverse ZCA: X_centered = y @ W_zca_inv.T
|
|
48
|
+
data_centered = np.dot(data_iso, params['W_zca_inv'].T)
|
|
49
49
|
|
|
50
|
-
#
|
|
50
|
+
# inverse scaling: X = (X_centered * std) + mean
|
|
51
51
|
data_original = (data_centered * params['stdev']) + params['mean']
|
|
52
52
|
return data_original
|
|
53
53
|
|
hdim_opt/quasar_optimization.py
CHANGED
|
@@ -371,10 +371,10 @@ def asym_reinit(population, current_fitnesses, bounds, reinit_method, seed, vect
|
|
|
371
371
|
def optimize(func, bounds, args=(),
|
|
372
372
|
init='sobol', popsize=None, maxiter=100,
|
|
373
373
|
entangle_rate=0.33, polish=True, polish_minimizer=None,
|
|
374
|
-
patience=np.inf, vectorized=False,
|
|
375
|
-
|
|
374
|
+
patience=np.inf, tolerance=-np.inf, vectorized=False,
|
|
375
|
+
kwargs={},
|
|
376
376
|
constraints=None, constraint_penalty=1e9,
|
|
377
|
-
|
|
377
|
+
reinitialization='covariance', hds_weights=None,
|
|
378
378
|
verbose=True, plot_solutions=True, num_to_plot=10, plot_contour=True,
|
|
379
379
|
workers=1, seed=None
|
|
380
380
|
):
|
|
@@ -382,7 +382,6 @@ def optimize(func, bounds, args=(),
|
|
|
382
382
|
Objective:
|
|
383
383
|
- Finds the optimal solution for a given objective function.
|
|
384
384
|
- Designed for non-differentiable, high-dimensional problems.
|
|
385
|
-
- For explorative problems chance reinitialization_method to '
|
|
386
385
|
- Test functions available for local testing, called as hdim_opt.test_functions.function_name.
|
|
387
386
|
- Existing test functions: [rastrigin, ackley, sinusoid, sphere, shubert].
|
|
388
387
|
|
|
@@ -413,11 +412,10 @@ def optimize(func, bounds, args=(),
|
|
|
413
412
|
- Recommended to place constraints in objective function to use Powell.
|
|
414
413
|
|
|
415
414
|
- patience: Number of generations without improvement before early convergence.
|
|
415
|
+
- tolerance: Target objective function value for early convergence.
|
|
416
416
|
- vectorized: Boolean to accept vectorized (N,D) objective functions
|
|
417
|
-
-
|
|
417
|
+
- Highly efficient, recommended when possible.
|
|
418
418
|
|
|
419
|
-
- hds_weights: Optional weights for hyperellipsoid density sampling initialization.
|
|
420
|
-
- {0 : {'center' : center, 'std': stdev}, 1: {...} }
|
|
421
419
|
- kwargs: Dictionary of keyword arguments for the objective function.
|
|
422
420
|
|
|
423
421
|
- constraints: Dictionary of constraints to penalize.
|
|
@@ -433,11 +431,13 @@ def optimize(func, bounds, args=(),
|
|
|
433
431
|
}
|
|
434
432
|
- constraint_penalty: Penalty applied to each constraint violated, defaults to 1e12.
|
|
435
433
|
|
|
436
|
-
-
|
|
434
|
+
- reinitialization: Type of re-sampling to use in the asymptotic reinitialization.
|
|
437
435
|
- Options are ['covariance', 'sobol'].
|
|
438
|
-
- 'covariance' (exploitative) is default for
|
|
436
|
+
- 'covariance' (exploitative) is default for N > D problems.
|
|
439
437
|
- 'sobol' (explorative) is optional, for high exploration and faster computation.
|
|
440
438
|
- None to disable reinitialization calculations.
|
|
439
|
+
- hds_weights: Optional weights for hyperellipsoid density sampling initialization.
|
|
440
|
+
- {0 : {'center' : center, 'std': stdev}, 1: {...} }
|
|
441
441
|
|
|
442
442
|
- verbose: Displays prints and plots.
|
|
443
443
|
- Mutation factor distribution shown with hdim_opt.test_functions.plot_mutations()
|
|
@@ -499,10 +499,7 @@ def optimize(func, bounds, args=(),
|
|
|
499
499
|
# ensure bounds is array; shape (n_dimensions,2)
|
|
500
500
|
bounds = np.array(bounds)
|
|
501
501
|
n_dimensions = bounds.shape[0]
|
|
502
|
-
|
|
503
|
-
if n_dimensions == 1:
|
|
504
|
-
reinitialization = False
|
|
505
|
-
|
|
502
|
+
|
|
506
503
|
# if init is not a string, assume it is a custom population
|
|
507
504
|
if not isinstance(init, str):
|
|
508
505
|
popsize = init.shape[0]
|
|
@@ -516,7 +513,11 @@ def optimize(func, bounds, args=(),
|
|
|
516
513
|
# ensure integers
|
|
517
514
|
popsize, maxiter = int(popsize), int(maxiter)
|
|
518
515
|
|
|
516
|
+
# map to sobol if N < D
|
|
517
|
+
if n_dimensions == 1:
|
|
518
|
+
reinitialization = None
|
|
519
519
|
|
|
520
|
+
|
|
520
521
|
################################# INPUT ERRORS #################################
|
|
521
522
|
|
|
522
523
|
# entangle rate error
|
|
@@ -537,11 +538,11 @@ def optimize(func, bounds, args=(),
|
|
|
537
538
|
# generate initial population
|
|
538
539
|
initial_population = initialize_population(popsize, bounds, init, hds_weights, seed, verbose)
|
|
539
540
|
if verbose:
|
|
540
|
-
if
|
|
541
|
-
print("
|
|
541
|
+
if reinitialization not in ['sobol', 'covariance', None]:
|
|
542
|
+
print("reinitialization must be one of ['covariance', 'sobol', None].")
|
|
542
543
|
print(f'\nEvolving (None):')
|
|
543
544
|
else:
|
|
544
|
-
print(f'\nEvolving ({
|
|
545
|
+
print(f'\nEvolving ({reinitialization}):')
|
|
545
546
|
|
|
546
547
|
# match differential evolution conventions
|
|
547
548
|
if vectorized:
|
|
@@ -648,12 +649,12 @@ def optimize(func, bounds, args=(),
|
|
|
648
649
|
# apply asymptotic covariance reinitialization to population
|
|
649
650
|
final_proba = 0.33
|
|
650
651
|
decay_generation = 0.33
|
|
651
|
-
if
|
|
652
|
+
if (reinitialization in ['sobol','covariance']):
|
|
652
653
|
reinit_proba = np.e**((np.log(final_proba)/(decay_generation*maxiter))*generation)
|
|
653
654
|
else:
|
|
654
655
|
reinit_proba = 0.0
|
|
655
656
|
if np.random.rand() < reinit_proba:
|
|
656
|
-
population = asym_reinit(population, current_fitnesses, bounds,
|
|
657
|
+
population = asym_reinit(population, current_fitnesses, bounds, reinitialization, seed, vectorized=vectorized)
|
|
657
658
|
|
|
658
659
|
# clip population to bounds
|
|
659
660
|
if vectorized:
|
|
@@ -685,9 +686,12 @@ def optimize(func, bounds, args=(),
|
|
|
685
686
|
# patience for early convergence
|
|
686
687
|
if (generation - last_improvement_gen) > patience:
|
|
687
688
|
if verbose:
|
|
688
|
-
print(f'
|
|
689
|
+
print(f'Early convergence: number of generations without improvement exceeds patience ({patience}).')
|
|
690
|
+
break
|
|
691
|
+
if best_fitness <= tolerance:
|
|
692
|
+
if verbose:
|
|
693
|
+
print(f'Early convergence: f(x) below tolerance ({tolerance:.2e}).')
|
|
689
694
|
break
|
|
690
|
-
|
|
691
695
|
|
|
692
696
|
################################# POLISH #################################
|
|
693
697
|
|
|
@@ -703,7 +707,7 @@ def optimize(func, bounds, args=(),
|
|
|
703
707
|
maxiter=maxiter, vectorized=vectorized, constraints=constraints,
|
|
704
708
|
args=args, kwargs=kwargs,
|
|
705
709
|
polish_minimizer=polish_minimizer, verbose=verbose
|
|
706
|
-
|
|
710
|
+
)
|
|
707
711
|
|
|
708
712
|
|
|
709
713
|
################################# VERBOSE #################################
|
hdim_opt/sobol_sampling.py
CHANGED
|
@@ -4,7 +4,7 @@ import numpy as np
|
|
|
4
4
|
def sobol_sample(n_samples, bounds, normalize=False, seed=None):
|
|
5
5
|
'''
|
|
6
6
|
Objective:
|
|
7
|
-
-
|
|
7
|
+
- Generates a uniform scrambled Sobol sample sequence.
|
|
8
8
|
Inputs:
|
|
9
9
|
- n_samples: Number of samples to generate.
|
|
10
10
|
- bounds: Range to sample over.
|
hdim_opt/sobol_sensitivity.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
def sens_analysis(func, bounds, n_samples=
|
|
1
|
+
def sens_analysis(func, bounds, n_samples=2**7,
|
|
2
2
|
kwargs=None, param_names=None,
|
|
3
3
|
verbose=True, log_scale=True):
|
|
4
4
|
'''
|
|
@@ -24,9 +24,10 @@ def sens_analysis(func, bounds, n_samples=None,
|
|
|
24
24
|
from SALib.analyze import sobol as sobol_analyze
|
|
25
25
|
import pandas as pd
|
|
26
26
|
from functools import partial
|
|
27
|
+
import time
|
|
27
28
|
except ImportError as e:
|
|
28
29
|
raise ImportError(f'Sensitivity analysis requires dependencies: (SALib, pandas, functools).') from e
|
|
29
|
-
|
|
30
|
+
start_time = time.time()
|
|
30
31
|
|
|
31
32
|
# define input parameters and their ranges
|
|
32
33
|
bounds = np.array(bounds)
|
|
@@ -34,10 +35,6 @@ def sens_analysis(func, bounds, n_samples=None,
|
|
|
34
35
|
if param_names == None:
|
|
35
36
|
param_names = range(0,n_params)
|
|
36
37
|
|
|
37
|
-
# scale default n_samples by dimension (power of 2)
|
|
38
|
-
if n_samples == None:
|
|
39
|
-
n_samples = int(2**np.ceil(np.log2(10*n_params)))
|
|
40
|
-
|
|
41
38
|
# define problem
|
|
42
39
|
problem = {
|
|
43
40
|
'num_vars': n_params,
|
|
@@ -68,7 +65,10 @@ def sens_analysis(func, bounds, n_samples=None,
|
|
|
68
65
|
S2_df = S2_df.fillna(S2_df.T)
|
|
69
66
|
mask = np.tril(np.ones_like(S2_df, dtype=bool))
|
|
70
67
|
|
|
68
|
+
end_time = time.time()
|
|
69
|
+
run_time = end_time - start_time
|
|
71
70
|
if verbose:
|
|
71
|
+
print(f'\nRun time: {run_time:.2f}s')
|
|
72
72
|
# import
|
|
73
73
|
try:
|
|
74
74
|
import matplotlib.pyplot as plt
|
|
@@ -114,6 +114,7 @@ def sens_analysis(func, bounds, n_samples=None,
|
|
|
114
114
|
|
|
115
115
|
axs[0].set_yticks(index)
|
|
116
116
|
axs[0].set_yticklabels(names_sorted)
|
|
117
|
+
axs[0].legend()
|
|
117
118
|
|
|
118
119
|
# plot 2: heatmap of second order indices
|
|
119
120
|
sns.heatmap(data=S2_df, mask=mask, cbar_kws={'label': 'Second-order Index ($S_2$)'},ax=axs[1]) # magma
|
hdim_opt/waveform_analysis.py
CHANGED
|
@@ -440,7 +440,10 @@ def plot_diagnostic_dashboard(temporal, spectral, metrics):
|
|
|
440
440
|
im = ax_spec.pcolormesh(t_spec*1e6, f, 10*np.log10(Sxx + epsilon),
|
|
441
441
|
shading='gouraud', cmap='plasma')
|
|
442
442
|
|
|
443
|
+
ax_spec.set_title('Spectrogram')
|
|
443
444
|
ax_spec.set_yscale('log')
|
|
444
445
|
ax_spec.set_ylim(np.abs(spectral['freq']).min()+epsilon, np.abs(spectral['freq'].max()/sample_rate))
|
|
446
|
+
cbar = fig.colorbar(im, ax=ax_spec)
|
|
447
|
+
cbar.set_label('Power/Frequency (dB/Hz)')
|
|
445
448
|
|
|
446
449
|
plt.show()
|
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hdim_opt
|
|
3
|
-
Version: 1.3.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 1.3.1
|
|
4
|
+
Summary: High-dimensional global optimization and sampling toolkit for complex and non-differentiable problems.
|
|
5
5
|
Author-email: Julian Soltes <jsoltes@regis.edu>
|
|
6
6
|
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/jgsoltes/hdim_opt
|
|
7
8
|
Project-URL: Repository, https://github.com/jgsoltes/hdim_opt
|
|
8
|
-
|
|
9
|
+
Project-URL: Issues, https://github.com/jgsoltes/hdim_opt/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/jgsoltes/hdim_opt/releases
|
|
11
|
+
Keywords: optimization,high-dimensional,sampling,QUASAR,hyperellipsoid,evolutionary-algorithm,non-differentiable,global-optimization,stochastic-optimization,black-box-optimization
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
9
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
19
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
20
|
Classifier: Operating System :: OS Independent
|
|
12
21
|
Classifier: Intended Audience :: Science/Research
|
|
13
22
|
Classifier: Intended Audience :: Developers
|
|
23
|
+
Classifier: Intended Audience :: Education
|
|
24
|
+
Classifier: Natural Language :: English
|
|
14
25
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
15
26
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
16
27
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
28
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
29
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
30
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
17
31
|
Requires-Python: >=3.8
|
|
18
32
|
Description-Content-Type: text/markdown
|
|
19
33
|
Requires-Dist: numpy
|
|
@@ -32,7 +46,7 @@ A modern optimization package to accelerate convergence in complex, high-dimensi
|
|
|
32
46
|
|
|
33
47
|
All core functions, listed below, are single-line executable and require three essential parameters: [obj_function, bounds, n_samples].
|
|
34
48
|
* **quasar**: QUASAR optimization for high-dimensional, non-differentiable problems.
|
|
35
|
-
* **
|
|
49
|
+
* **hyperellipsoid**: Generate a non-uniform Hyperellipsoid Density sequence, to focus sample distributions.
|
|
36
50
|
* **sobol**: Generate a uniform Sobol sequence (via SciPy).
|
|
37
51
|
* **sensitivity**: Perform Sobol sensitivity analysis to measure each variable's importance on objective function results (via SALib).
|
|
38
52
|
* **waveform**: Decompose the input waveform array (handles time- and frequency-domain via FFT / IFFT) into a diagnostic summary.
|
|
@@ -63,7 +77,7 @@ time, pulse = h.waveform_analysis.e1_waveform()
|
|
|
63
77
|
solution, fitness = h.quasar(obj_func, bounds)
|
|
64
78
|
sens_matrix = h.sensitivity(obj_func, bounds)
|
|
65
79
|
|
|
66
|
-
hds_samples = h.
|
|
80
|
+
hds_samples = h.hyperellipsoid(n_samples, bounds)
|
|
67
81
|
sobol_samples = h.sobol(n_samples, bounds)
|
|
68
82
|
isotropic_samples = h.isotropize(sobol_samples)
|
|
69
83
|
|
|
@@ -75,7 +89,7 @@ signal_data = h.waveform(x=time,y=pulse)
|
|
|
75
89
|
|
|
76
90
|
* Benefit: Significant improvements in convergence speed and solution quality compared to contemporary optimizers. (Reference: [https://arxiv.org/abs/2511.13843]).
|
|
77
91
|
|
|
78
|
-
## HDS Sampler
|
|
79
|
-
**HDS** is a non-uniform Quasi-Monte Carlo sampling method, specifically designed to exploit promising regions of the search space.
|
|
92
|
+
## HDS Sampler
|
|
93
|
+
**HDS** (Hyperellipsoid Density Sampling) is a non-uniform Quasi-Monte Carlo sampling method, specifically designed to exploit promising regions of the search space.
|
|
80
94
|
|
|
81
95
|
* Benefit: Provides control over the sample distribution. Results in higher average optimization solution quality when used for population initialization compared to uniform QMC methods. (Reference: [https://arxiv.org/abs/2511.07836]).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
hdim_opt/__init__.py,sha256=qP_2iUU5q7121cfy7TyvKyCDQnyg9tF8jhjszF95KAE,2023
|
|
2
|
+
hdim_opt/hyperellipsoid_sampling.py,sha256=hfmQD6bPVD7VIrZfE9faAHO9BUAHrk1fYQla5RH4vFs,24459
|
|
3
|
+
hdim_opt/quasar_helpers.py,sha256=Gv5QFvx7-RfTnS89Eg7b7oVn6S5urgP7t8CwVPLMTcw,16597
|
|
4
|
+
hdim_opt/quasar_optimization.py,sha256=GKvO4XFZUAZ7Gz24-OFw4odqlOwVVnPJEuBZprEVqx4,32490
|
|
5
|
+
hdim_opt/sobol_sampling.py,sha256=yZl6QyPtl8WpDrclPoFbr61dVww0xnhSQqvmE2XvP8E,913
|
|
6
|
+
hdim_opt/sobol_sensitivity.py,sha256=QciwOnUMxDVEf6mjH2G-HB6CLLDHxO0fqTDdb3Cykcc,4427
|
|
7
|
+
hdim_opt/test_functions.py,sha256=RqjKYIiwAqWplGUsH4oPHLBrVdnLRyw7f0dJX5iyJ4g,2821
|
|
8
|
+
hdim_opt/waveform_analysis.py,sha256=KFoTDvP3NXrZiw9FRTNRGFE9a6Q5f5QH38YnX1_2Aj0,15206
|
|
9
|
+
hdim_opt-1.3.1.dist-info/METADATA,sha256=e8FzDUbxo-tpfZ5VJ_sf8slr2TgUKInE8_QpmTYP-ZI,4440
|
|
10
|
+
hdim_opt-1.3.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
11
|
+
hdim_opt-1.3.1.dist-info/top_level.txt,sha256=1KtWo9tEfEK3GC8D43cwVsC8yVG2Kc-9pl0hhcDjw4o,9
|
|
12
|
+
hdim_opt-1.3.1.dist-info/RECORD,,
|
hdim_opt-1.3.0.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
hdim_opt/__init__.py,sha256=CeLrf9egFUScaSirq3gkT8WXcvw0F58L3b_i6oT8Egs,1894
|
|
2
|
-
hdim_opt/hyperellipsoid_sampling.py,sha256=WYlFJxeLKUf8frrl1vM4b28WRJ8zpneKn1NitSPtQMI,24356
|
|
3
|
-
hdim_opt/quasar_helpers.py,sha256=zcoBggHfc6XhZFlJFJy6p0MGVsQwHa6nMudWauT5Vzo,16255
|
|
4
|
-
hdim_opt/quasar_optimization.py,sha256=U7a4ZbgsNJ24V7sff710D7LGYsUWE0CVNoZCmjahZmE,32329
|
|
5
|
-
hdim_opt/sobol_sampling.py,sha256=Xe_Zzs13xMxCben17gT85lFsoV-GKVOAAgi7lMxnlBI,912
|
|
6
|
-
hdim_opt/sobol_sensitivity.py,sha256=HmwqNSDvofX5u1hOayLgjMZOdjQdOHYHzrOLxMTfhhc,4390
|
|
7
|
-
hdim_opt/test_functions.py,sha256=RqjKYIiwAqWplGUsH4oPHLBrVdnLRyw7f0dJX5iyJ4g,2821
|
|
8
|
-
hdim_opt/waveform_analysis.py,sha256=EV87W4D1rJ31x2X5M2_uFaCFDLhhnMwIft-0djCNXoI,15083
|
|
9
|
-
hdim_opt-1.3.0.dist-info/METADATA,sha256=2HJSVNmCZ_zYYrkMHNYo2s53UR3eLQXmi2t-J77IaeQ,3481
|
|
10
|
-
hdim_opt-1.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
-
hdim_opt-1.3.0.dist-info/top_level.txt,sha256=1KtWo9tEfEK3GC8D43cwVsC8yVG2Kc-9pl0hhcDjw4o,9
|
|
12
|
-
hdim_opt-1.3.0.dist-info/RECORD,,
|
|
File without changes
|