spotoptim 2.0.0__tar.gz → 2.1.0__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.
- {spotoptim-2.0.0 → spotoptim-2.1.0}/PKG-INFO +1 -1
- {spotoptim-2.0.0 → spotoptim-2.1.0}/pyproject.toml +1 -1
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/SpotOptim.py +21 -41
- {spotoptim-2.0.0 → spotoptim-2.1.0}/README.md +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/core/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/core/data.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/core/experiment.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/core/protocol.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/core/storage.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/data/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/data/base.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/data/diabetes.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/datasets/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/datasets/py.typed +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/datasets/test01.csv +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/datasets/test02.csv +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/datasets/test11.csv +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/eda/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/eda/plots.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/factor_analyzer/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/factor_analyzer/confirmatory_factor_analyzer.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/factor_analyzer/factor_analyzer.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/factor_analyzer/factor_analyzer_rotator.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/factor_analyzer/factor_analyzer_utils.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/function/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/function/cd_data.csv +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/function/forr08a.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/function/mo.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/function/remote.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/function/so.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/function/torch_objective.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/hyperparameters/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/hyperparameters/parameters.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/hyperparameters/repr_helpers.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/inspection/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/inspection/importance.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/inspection/predictions.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/mo/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/mo/mo_mm.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/mo/pareto.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/nn/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/nn/linear_regressor.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/nn/mlp.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/optimizer/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/optimizer/acquisition.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/optimizer/schedule_free.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/optimizer/wrapper.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/plot/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/plot/contour.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/plot/mo.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/plot/visualization.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/py.typed +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/reporting/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/reporting/analysis.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/reporting/results.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/sampling/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/sampling/design.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/sampling/effects.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/sampling/lhs.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/sampling/mm.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/surrogate/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/surrogate/kernels.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/surrogate/kriging.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/surrogate/mlp_surrogate.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/surrogate/nystroem.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/surrogate/pipeline.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/surrogate/simple_kriging.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/tricands/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/tricands/tricands.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/__init__.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/boundaries.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/convert.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/dimreduction.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/eval.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/file.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/mapping.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/ocba.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/pca.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/scaler.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/serialization.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/stats.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/tensorboard.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/transform.py +0 -0
- {spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/utils/variables.py +0 -0
|
@@ -89,10 +89,6 @@ class SpotOptimConfig:
|
|
|
89
89
|
acquisition_optimizer_kwargs (Optional[Dict[str, Any]]): Keyword arguments for the acquisition function optimizer.
|
|
90
90
|
args (Tuple): Arguments for the objective function.
|
|
91
91
|
kwargs (Optional[Dict[str, Any]]): Keyword arguments for the objective function.
|
|
92
|
-
metric_factorial (str): Distance metric used by a factor-aware Kriging surrogate for
|
|
93
|
-
nominal (categorical) variables. ``"hamming"`` (default) treats all distinct
|
|
94
|
-
factor levels as equidistant, which is correct for unordered factors.
|
|
95
|
-
Any scipy pairwise distance metric string is accepted.
|
|
96
92
|
|
|
97
93
|
|
|
98
94
|
Examples:
|
|
@@ -193,7 +189,6 @@ class SpotOptimConfig:
|
|
|
193
189
|
acquisition_optimizer_kwargs: Optional[Dict[str, Any]] = None
|
|
194
190
|
args: Tuple = ()
|
|
195
191
|
kwargs: Optional[Dict[str, Any]] = None
|
|
196
|
-
metric_factorial: str = "hamming"
|
|
197
192
|
|
|
198
193
|
def __post_init__(self):
|
|
199
194
|
if self.kwargs is None:
|
|
@@ -442,13 +437,6 @@ class SpotOptim(BaseEstimator):
|
|
|
442
437
|
* "cosine": Cosine distance.
|
|
443
438
|
* "correlation": Correlation distance.
|
|
444
439
|
* "canberra", "braycurtis", "sqeuclidean", etc.
|
|
445
|
-
metric_factorial (str, optional):
|
|
446
|
-
Distance metric used for nominal (factor) variables by a factor-aware
|
|
447
|
-
Kriging surrogate. ``"hamming"`` (default) treats all distinct factor
|
|
448
|
-
levels as equidistant, which is correct for unordered factors; any
|
|
449
|
-
scipy pairwise distance metric string is accepted. Only takes effect
|
|
450
|
-
when factor variables are present and ``surrogate`` is left as ``None``
|
|
451
|
-
(an order-agnostic Kriging is then built automatically).
|
|
452
440
|
|
|
453
441
|
Attributes:
|
|
454
442
|
X_ (ndarray): All evaluated points, shape (n_samples, n_features).
|
|
@@ -774,7 +762,6 @@ class SpotOptim(BaseEstimator):
|
|
|
774
762
|
acquisition_optimizer_kwargs: Optional[Dict[str, Any]] = None,
|
|
775
763
|
args: Tuple = (),
|
|
776
764
|
kwargs: Optional[Dict[str, Any]] = None,
|
|
777
|
-
metric_factorial: str = "hamming",
|
|
778
765
|
):
|
|
779
766
|
warnings.filterwarnings(warnings_filter)
|
|
780
767
|
|
|
@@ -853,7 +840,6 @@ class SpotOptim(BaseEstimator):
|
|
|
853
840
|
acquisition_optimizer_kwargs=acquisition_optimizer_kwargs,
|
|
854
841
|
args=args,
|
|
855
842
|
kwargs=kwargs,
|
|
856
|
-
metric_factorial=metric_factorial,
|
|
857
843
|
)
|
|
858
844
|
|
|
859
845
|
# Initialize State
|
|
@@ -1662,36 +1648,30 @@ class SpotOptim(BaseEstimator):
|
|
|
1662
1648
|
self._max_surrogate_points_list = None
|
|
1663
1649
|
self._active_max_surrogate_points = self.config.max_surrogate_points
|
|
1664
1650
|
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
)
|
|
1674
|
-
else:
|
|
1675
|
-
# No factor variables: use the standard GaussianProcessRegressor.
|
|
1676
|
-
kernel = ConstantKernel(1.0, (1e-2, 1e12)) * Matern(
|
|
1677
|
-
length_scale=1.0, length_scale_bounds=(1e-4, 1e2), nu=2.5
|
|
1678
|
-
)
|
|
1679
|
-
|
|
1680
|
-
# Determine optimizer for GPR
|
|
1681
|
-
optimizer = "fmin_l_bfgs_b" # Default used by sklearn
|
|
1682
|
-
if self.config.acquisition_optimizer_kwargs is not None:
|
|
1683
|
-
optimizer = partial(
|
|
1684
|
-
gpr_minimize_wrapper, **self.config.acquisition_optimizer_kwargs
|
|
1685
|
-
)
|
|
1651
|
+
# Default surrogate is the GaussianProcessRegressor for ALL problem
|
|
1652
|
+
# types. Factor variables are NOT auto-switched to a Kriging: the user
|
|
1653
|
+
# keeps full control over the surrogate (and is informed by
|
|
1654
|
+
# _validate_factor_surrogate_compat that a factor-aware
|
|
1655
|
+
# Kriging(metric_factorial="hamming") is available for nominal factors).
|
|
1656
|
+
kernel = ConstantKernel(1.0, (1e-2, 1e12)) * Matern(
|
|
1657
|
+
length_scale=1.0, length_scale_bounds=(1e-4, 1e2), nu=2.5
|
|
1658
|
+
)
|
|
1686
1659
|
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
optimizer=optimizer,
|
|
1660
|
+
# Determine optimizer for GPR
|
|
1661
|
+
optimizer = "fmin_l_bfgs_b" # Default used by sklearn
|
|
1662
|
+
if self.config.acquisition_optimizer_kwargs is not None:
|
|
1663
|
+
optimizer = partial(
|
|
1664
|
+
gpr_minimize_wrapper, **self.config.acquisition_optimizer_kwargs
|
|
1693
1665
|
)
|
|
1694
1666
|
|
|
1667
|
+
self.surrogate = GaussianProcessRegressor(
|
|
1668
|
+
kernel=kernel,
|
|
1669
|
+
n_restarts_optimizer=100,
|
|
1670
|
+
normalize_y=True,
|
|
1671
|
+
random_state=self.seed,
|
|
1672
|
+
optimizer=optimizer,
|
|
1673
|
+
)
|
|
1674
|
+
|
|
1695
1675
|
def _validate_factor_surrogate_compat(self) -> None:
|
|
1696
1676
|
"""Warn when factor variables are present but the surrogate is factor-blind.
|
|
1697
1677
|
|
|
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
|
{spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/factor_analyzer/confirmatory_factor_analyzer.py
RENAMED
|
File without changes
|
|
File without changes
|
{spotoptim-2.0.0 → spotoptim-2.1.0}/src/spotoptim/factor_analyzer/factor_analyzer_rotator.py
RENAMED
|
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
|