You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/spotpython/utils/init.py
+9-11Lines changed: 9 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -739,7 +739,7 @@ def surrogate_control_init(
739
739
model_fun_evals=10000,
740
740
min_theta=-3.0, # log10
741
741
max_theta=2.0, # log10
742
-
n_theta="anisotropic",
742
+
isotropic=False,
743
743
p_val=2.0,
744
744
n_p=1,
745
745
optim_p=False,
@@ -764,14 +764,15 @@ def surrogate_control_init(
764
764
Default is -3.
765
765
max_theta (float): The maximum value of theta. Note that the base10-logarithm is used.
766
766
Default is 3.
767
+
isotropic (bool):
768
+
Whether to use isotropic or anisotropic theta values. If True, the theta values are
769
+
isotropic, i.e., the same value is used for all dimensions. If False,
770
+
the theta values are anisotropic, i.e., different values are used for each dimension.
771
+
Default is False.
767
772
method (str):
768
773
The method to be used for the surrogate model. Default is "regression".
769
774
Can be one of ["regression", "interpolation", "reinterpolation"].
770
775
Note: Will also be set in the Spot class, if None.
771
-
n_theta (int):
772
-
The number of theta values. If larger than 1 or set to the string "anisotropic",
773
-
then the k theta values are used, where k is the problem dimension.
774
-
This is handled in spot.py. Default is "anisotropic".
775
776
p_val (float):
776
777
p value. Used as an initial value if optim_p = True. Otherwise as a constant. Defaults to 2.0.
777
778
n_p (int):
@@ -807,11 +808,8 @@ def surrogate_control_init(
807
808
of `var_type` in the Spot class fun_control dictionary and the dimension of the problem.
808
809
If the Kriging model is used as a surrogate in the Spot class, the setting from
809
810
surrogate_control_init() is overwritten.
810
-
* `n_theta`: If self.surrogate_control["n_theta"] > 1,
811
-
use k theta values, where k is the problem dimension specified in the Spot class.
812
-
The problem dimension is set in the Spot class based on the
813
-
length of the lower bounds.
814
-
* This value `model_fun_evals` will used for the optimization of the surrogate model, e.g., theta values.
811
+
* `isotropic`: If the `isotropic` value is set to `True`, then the theta values are isotropic, i.e., the same value is used for all dimensions. If it is set to `False`, then the theta values are anisotropic, i.e., different values are used for each dimension.
812
+
* The value `model_fun_evals` will used for the optimization of the surrogate model, e.g., theta values.
815
813
Differential evaluation uses `maxiter = 1000` and sets the number of function evaluations to
816
814
(maxiter + 1) * popsize * N, which results in 1000 * 15 * k,
817
815
because the default popsize is 15 and N is the number of parameters. This is already sufficient
0 commit comments