diff --git a/doc/_src_docs/applications/Mixed_Hier_surr.rst b/doc/_src_docs/applications/Mixed_Hier_surr.rst index 09c29327d..93cf61e28 100644 --- a/doc/_src_docs/applications/Mixed_Hier_surr.rst +++ b/doc/_src_docs/applications/Mixed_Hier_surr.rst @@ -61,7 +61,7 @@ Example of mixed integer Polynomial (QP) surrogate # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0000598 + Predicting - done. Time (sec): 0.0000551 Prediction time/pt. (sec) : 0.0000006 @@ -224,9 +224,9 @@ Example of mixed integer Gower Distance model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0083411 + Predicting - done. Time (sec): 0.0078330 - Prediction time/pt. (sec) : 0.0000834 + Prediction time/pt. (sec) : 0.0000783 ___________________________________________________________________________ @@ -235,9 +235,9 @@ Example of mixed integer Gower Distance model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0082445 + Predicting - done. Time (sec): 0.0078776 - Prediction time/pt. (sec) : 0.0000824 + Prediction time/pt. (sec) : 0.0000788 ___________________________________________________________________________ @@ -246,9 +246,9 @@ Example of mixed integer Gower Distance model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0082402 + Predicting - done. Time (sec): 0.0078387 - Prediction time/pt. (sec) : 0.0000824 + Prediction time/pt. (sec) : 0.0000784 .. figure:: Mixed_Hier_surr_TestMixedInteger_run_mixed_gower_example.png @@ -412,9 +412,9 @@ Example of mixed integer Compound Symmetry model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0098972 + Predicting - done. Time (sec): 0.0095315 - Prediction time/pt. (sec) : 0.0000990 + Prediction time/pt. (sec) : 0.0000953 ___________________________________________________________________________ @@ -423,9 +423,9 @@ Example of mixed integer Compound Symmetry model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0098805 + Predicting - done. Time (sec): 0.0095360 - Prediction time/pt. (sec) : 0.0000988 + Prediction time/pt. (sec) : 0.0000954 ___________________________________________________________________________ @@ -434,9 +434,9 @@ Example of mixed integer Compound Symmetry model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0099378 + Predicting - done. Time (sec): 0.0095096 - Prediction time/pt. (sec) : 0.0000994 + Prediction time/pt. (sec) : 0.0000951 .. figure:: Mixed_Hier_surr_TestMixedInteger_run_mixed_cs_example.png @@ -593,9 +593,9 @@ Example of mixed integer Homoscedastic Hypersphere model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0099890 + Predicting - done. Time (sec): 0.0094757 - Prediction time/pt. (sec) : 0.0000999 + Prediction time/pt. (sec) : 0.0000948 ___________________________________________________________________________ @@ -604,9 +604,9 @@ Example of mixed integer Homoscedastic Hypersphere model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0100174 + Predicting - done. Time (sec): 0.0094945 - Prediction time/pt. (sec) : 0.0001002 + Prediction time/pt. (sec) : 0.0000949 ___________________________________________________________________________ @@ -615,9 +615,9 @@ Example of mixed integer Homoscedastic Hypersphere model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0100038 + Predicting - done. Time (sec): 0.0095246 - Prediction time/pt. (sec) : 0.0001000 + Prediction time/pt. (sec) : 0.0000952 .. figure:: Mixed_Hier_surr_TestMixedInteger_run_mixed_homo_hyp_example.png @@ -774,9 +774,9 @@ Example of mixed integer Exponential Homoscedastic Hypersphere model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0099664 + Predicting - done. Time (sec): 0.0095108 - Prediction time/pt. (sec) : 0.0000997 + Prediction time/pt. (sec) : 0.0000951 ___________________________________________________________________________ @@ -785,9 +785,9 @@ Example of mixed integer Exponential Homoscedastic Hypersphere model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0101118 + Predicting - done. Time (sec): 0.0096247 - Prediction time/pt. (sec) : 0.0001011 + Prediction time/pt. (sec) : 0.0000962 ___________________________________________________________________________ @@ -796,9 +796,9 @@ Example of mixed integer Exponential Homoscedastic Hypersphere model # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0099428 + Predicting - done. Time (sec): 0.0095794 - Prediction time/pt. (sec) : 0.0000994 + Prediction time/pt. (sec) : 0.0000958 .. figure:: Mixed_Hier_surr_TestMixedInteger_run_mixed_homo_gaussian_example.png @@ -1000,9 +1000,9 @@ Example of mixed integer Kriging with hierarchical variables # eval points. : 15 Predicting ... - Predicting - done. Time (sec): 0.0084703 + Predicting - done. Time (sec): 0.0085273 - Prediction time/pt. (sec) : 0.0005647 + Prediction time/pt. (sec) : 0.0005685 diff --git a/doc/_src_docs/applications/Mixed_Hier_usage.rst b/doc/_src_docs/applications/Mixed_Hier_usage.rst index 027da06b4..b8c9642c3 100644 --- a/doc/_src_docs/applications/Mixed_Hier_usage.rst +++ b/doc/_src_docs/applications/Mixed_Hier_usage.rst @@ -46,6 +46,7 @@ The design space is then defined from a list of design variables and implements ) from smt.sampling_methods import LHS from smt.applications.mixed_integer import MixedIntegerSamplingMethod + ds = DesignSpace( [ CategoricalVariable( @@ -111,7 +112,10 @@ The hierarchy relationships are specified after instantiating the design space: OrdinalVariable, CategoricalVariable, ) - from smt.applications.mixed_integer import MixedIntegerKrigingModel, MixedIntegerSamplingMethod + from smt.applications.mixed_integer import ( + MixedIntegerKrigingModel, + MixedIntegerSamplingMethod, + ) from smt.surrogate_models import MixIntKernelType, MixHrcKernelType, KRG from smt.sampling_methods import LHS @@ -228,9 +232,9 @@ The hierarchy relationships are specified after instantiating the design space: # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.3314385 + Predicting - done. Time (sec): 0.3353465 - Prediction time/pt. (sec) : 0.0033144 + Prediction time/pt. (sec) : 0.0033535 Pred_RMSE 4.092408537263059e-13 @@ -273,6 +277,7 @@ Example of sampling a mixed-discrete design space ) from smt.sampling_methods import LHS from smt.applications.mixed_integer import MixedIntegerSamplingMethod + float_var = FloatVariable(0, 4) cat_var = CategoricalVariable(["blue", "red"]) @@ -319,7 +324,10 @@ Example of mixed integer context usage import matplotlib.pyplot as plt from smt.surrogate_models import KRG - from smt.applications.mixed_integer import MixedIntegerContext,MixedIntegerSamplingMethod + from smt.applications.mixed_integer import ( + MixedIntegerContext, + MixedIntegerSamplingMethod, + ) from smt.utils.design_space import ( DesignSpace, FloatVariable, @@ -376,9 +384,9 @@ Example of mixed integer context usage # eval points. : 50 Predicting ... - Predicting - done. Time (sec): 0.0133548 + Predicting - done. Time (sec): 0.0130029 - Prediction time/pt. (sec) : 0.0002671 + Prediction time/pt. (sec) : 0.0002601 .. figure:: Mixed_Hier_usage_TestMixedInteger_run_mixed_integer_context_example.png diff --git a/doc/_src_docs/applications/Mixed_Hier_usage_TestMixedInteger_run_mixed_integer_context_example.png b/doc/_src_docs/applications/Mixed_Hier_usage_TestMixedInteger_run_mixed_integer_context_example.png index 216f3d9f9..24d597da8 100644 Binary files a/doc/_src_docs/applications/Mixed_Hier_usage_TestMixedInteger_run_mixed_integer_context_example.png and b/doc/_src_docs/applications/Mixed_Hier_usage_TestMixedInteger_run_mixed_integer_context_example.png differ diff --git a/doc/_src_docs/applications/ego.rst b/doc/_src_docs/applications/ego.rst index 8b6e71c0b..84f8d75d8 100644 --- a/doc/_src_docs/applications/ego.rst +++ b/doc/_src_docs/applications/ego.rst @@ -549,7 +549,7 @@ Usage with mixed variable :: - Minimum in x=[-4.88913486 2. 0. 0. ] with f(x)=-14.7 + Minimum in x=[-4.88374647 2. 0. 0. ] with f(x)=-14.7 .. figure:: ego_TestEGO_run_ego_mixed_integer_example.png :scale: 80 % @@ -605,7 +605,7 @@ Options - ['str'] - Approximated q-EI maximization strategy * - evaluator - - + - - None - ['Evaluator'] - Object used to run function fun to optimize at x points (nsamples, nxdim) @@ -635,7 +635,7 @@ Options - ['bool'] - Enable the penalization of points that have been already evaluated in EI criterion * - surrogate - - + - - None - ['KRG', 'KPLS', 'KPLSK', 'GEKPLS', 'MGP'] - SMT kriging-based surrogate model used internaly diff --git a/doc/_src_docs/applications/mfk.rst b/doc/_src_docs/applications/mfk.rst index c5f1ed673..6d5147def 100644 --- a/doc/_src_docs/applications/mfk.rst +++ b/doc/_src_docs/applications/mfk.rst @@ -103,7 +103,7 @@ Usage Training Training ... - Training - done. Time (sec): 0.9827604 + Training - done. Time (sec): 0.9694319 ___________________________________________________________________________ Evaluation @@ -111,9 +111,9 @@ Usage # eval points. : 101 Predicting ... - Predicting - done. Time (sec): 0.0007160 + Predicting - done. Time (sec): 0.0007062 - Prediction time/pt. (sec) : 0.0000071 + Prediction time/pt. (sec) : 0.0000070 ___________________________________________________________________________ @@ -122,9 +122,9 @@ Usage # eval points. : 101 Predicting ... - Predicting - done. Time (sec): 0.0007083 + Predicting - done. Time (sec): 0.0007169 - Prediction time/pt. (sec) : 0.0000070 + Prediction time/pt. (sec) : 0.0000071 .. figure:: mfk_TestMFK_run_mfk_example.png diff --git a/doc/_src_docs/applications/mfkpls.rst b/doc/_src_docs/applications/mfkpls.rst index c188071ba..42a2b5acd 100644 --- a/doc/_src_docs/applications/mfkpls.rst +++ b/doc/_src_docs/applications/mfkpls.rst @@ -108,7 +108,7 @@ Usage Training Training ... - Training - done. Time (sec): 0.1955945 + Training - done. Time (sec): 0.2026711 ___________________________________________________________________________ Evaluation @@ -116,9 +116,9 @@ Usage # eval points. : 101 Predicting ... - Predicting - done. Time (sec): 0.0007906 + Predicting - done. Time (sec): 0.0007112 - Prediction time/pt. (sec) : 0.0000078 + Prediction time/pt. (sec) : 0.0000070 ___________________________________________________________________________ @@ -127,9 +127,9 @@ Usage # eval points. : 101 Predicting ... - Predicting - done. Time (sec): 0.0007710 + Predicting - done. Time (sec): 0.0007598 - Prediction time/pt. (sec) : 0.0000076 + Prediction time/pt. (sec) : 0.0000075 .. figure:: mfkpls_TestMFKPLS_run_mfkpls_example.png diff --git a/doc/_src_docs/applications/mfkplsk.rst b/doc/_src_docs/applications/mfkplsk.rst index 51deaeaae..0a8df811d 100644 --- a/doc/_src_docs/applications/mfkplsk.rst +++ b/doc/_src_docs/applications/mfkplsk.rst @@ -108,7 +108,7 @@ Usage Training Training ... - Training - done. Time (sec): 0.2852046 + Training - done. Time (sec): 0.2900028 ___________________________________________________________________________ Evaluation @@ -116,7 +116,7 @@ Usage # eval points. : 101 Predicting ... - Predicting - done. Time (sec): 0.0007157 + Predicting - done. Time (sec): 0.0007162 Prediction time/pt. (sec) : 0.0000071 @@ -127,7 +127,7 @@ Usage # eval points. : 101 Predicting ... - Predicting - done. Time (sec): 0.0007243 + Predicting - done. Time (sec): 0.0007234 Prediction time/pt. (sec) : 0.0000072 diff --git a/doc/_src_docs/applications/mgp.rst b/doc/_src_docs/applications/mgp.rst index 188851795..cd7d6cc60 100644 --- a/doc/_src_docs/applications/mgp.rst +++ b/doc/_src_docs/applications/mgp.rst @@ -128,7 +128,7 @@ Usage Training Training ... - Training - done. Time (sec): 0.9149678 + Training - done. Time (sec): 0.9189811 .. figure:: mgp_Test_test_mgp.png :scale: 80 % diff --git a/doc/_src_docs/applications/vfm.rst b/doc/_src_docs/applications/vfm.rst index 8c134b71c..22323a186 100644 --- a/doc/_src_docs/applications/vfm.rst +++ b/doc/_src_docs/applications/vfm.rst @@ -123,7 +123,7 @@ Usage Training Training ... - Training - done. Time (sec): 0.3257585 + Training - done. Time (sec): 0.3460555 .. figure:: vfm_TestVFM_run_vfm_example.png :scale: 80 % diff --git a/doc/_src_docs/applications/vfm_TestVFM_run_vfm_example.png b/doc/_src_docs/applications/vfm_TestVFM_run_vfm_example.png index 5f7984f08..4fb54533c 100644 Binary files a/doc/_src_docs/applications/vfm_TestVFM_run_vfm_example.png and b/doc/_src_docs/applications/vfm_TestVFM_run_vfm_example.png differ diff --git a/doc/_src_docs/examples/b777_engine/b777_engine.png b/doc/_src_docs/examples/b777_engine/b777_engine.png index d3d85390a..dc4142706 100644 Binary files a/doc/_src_docs/examples/b777_engine/b777_engine.png and b/doc/_src_docs/examples/b777_engine/b777_engine.png differ diff --git a/doc/_src_docs/problems/mixedcantileverbeam_Test_test_mixed_cantilever_beam.png b/doc/_src_docs/problems/mixedcantileverbeam_Test_test_mixed_cantilever_beam.png index 89ccfba12..11eeedb41 100644 Binary files a/doc/_src_docs/problems/mixedcantileverbeam_Test_test_mixed_cantilever_beam.png and b/doc/_src_docs/problems/mixedcantileverbeam_Test_test_mixed_cantilever_beam.png differ diff --git a/doc/_src_docs/sampling_methods/lhs_Test_run_lhs.png b/doc/_src_docs/sampling_methods/lhs_Test_run_lhs.png index 211ffd595..378dc4145 100644 Binary files a/doc/_src_docs/sampling_methods/lhs_Test_run_lhs.png and b/doc/_src_docs/sampling_methods/lhs_Test_run_lhs.png differ diff --git a/doc/_src_docs/sampling_methods_Test_run_random.png b/doc/_src_docs/sampling_methods_Test_run_random.png index 7077357b1..5a7a5b944 100644 Binary files a/doc/_src_docs/sampling_methods_Test_run_random.png and b/doc/_src_docs/sampling_methods_Test_run_random.png differ diff --git a/doc/_src_docs/surrogate_models.rst b/doc/_src_docs/surrogate_models.rst index 55738bfba..68fed852b 100644 --- a/doc/_src_docs/surrogate_models.rst +++ b/doc/_src_docs/surrogate_models.rst @@ -67,13 +67,13 @@ Usage Training ... Initializing linear solver ... Performing LU fact. (5 x 5 mtx) ... - Performing LU fact. (5 x 5 mtx) - done. Time (sec): 0.0001042 - Initializing linear solver - done. Time (sec): 0.0001271 + Performing LU fact. (5 x 5 mtx) - done. Time (sec): 0.0001369 + Initializing linear solver - done. Time (sec): 0.0001638 Solving linear system (col. 0) ... Back solving (5 x 5 mtx) ... - Back solving (5 x 5 mtx) - done. Time (sec): 0.0000641 - Solving linear system (col. 0) - done. Time (sec): 0.0000830 - Training - done. Time (sec): 0.0005043 + Back solving (5 x 5 mtx) - done. Time (sec): 0.0000687 + Solving linear system (col. 0) - done. Time (sec): 0.0000892 + Training - done. Time (sec): 0.0008070 ___________________________________________________________________________ Evaluation @@ -81,7 +81,7 @@ Usage # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0000305 + Predicting - done. Time (sec): 0.0000319 Prediction time/pt. (sec) : 0.0000003 diff --git a/doc/_src_docs/surrogate_models/krg.rst b/doc/_src_docs/surrogate_models/krg.rst index c1c6fdb65..850ae0fa0 100644 --- a/doc/_src_docs/surrogate_models/krg.rst +++ b/doc/_src_docs/surrogate_models/krg.rst @@ -42,7 +42,7 @@ Matérn 3/2 correlation function: Exponential Squared Sine correlation function: .. math :: - \prod\limits_{l=1}^{nx}\exp\left(-\theta_{l_1} \left( \theta_{l_2} \left( \sin \left( x_l^{(i)}-x_l^{(j)} \right)\right) \right)^{2} \right), \quad \forall\ \theta_l\in\mathbb{R}^+ + \prod\limits_{l=1}^{nx}\exp\left(-\theta_{l_1} \left( \sin \left( \theta_{l_2} \left( x_l^{(i)}-x_l^{(j)} \right)\right)^{2} \right) \right), \quad \forall\ \theta_l\in\mathbb{R}^+ These correlation functions are called by 'abs_exp' (exponential), 'squar_exp' (Gaussian), 'matern52','matern32' and 'squar_sin_exp' in SMT. @@ -142,7 +142,7 @@ Example 1 Training Training ... - Training - done. Time (sec): 0.1433256 + Training - done. Time (sec): 0.1495888 ___________________________________________________________________________ Evaluation @@ -150,9 +150,9 @@ Example 1 # eval points. : 100 Predicting ... - Predicting - done. Time (sec): 0.0025897 + Predicting - done. Time (sec): 0.0031855 - Prediction time/pt. (sec) : 0.0000259 + Prediction time/pt. (sec) : 0.0000319 ___________________________________________________________________________ @@ -161,9 +161,9 @@ Example 1 # eval points. : 5 Predicting ... - Predicting - done. Time (sec): 0.0004776 + Predicting - done. Time (sec): 0.0004728 - Prediction time/pt. (sec) : 0.0000955 + Prediction time/pt. (sec) : 0.0000946 .. figure:: krg_Test_test_krg.png @@ -229,9 +229,9 @@ Example 2 with mixed variables # eval points. : 500 Predicting ... - Predicting - done. Time (sec): 0.0096531 + Predicting - done. Time (sec): 0.0097091 - Prediction time/pt. (sec) : 0.0000193 + Prediction time/pt. (sec) : 0.0000194 .. figure:: krg_Test_test_mixed_int_krg.png diff --git a/doc/_src_docs/surrogate_models/krg.rstx b/doc/_src_docs/surrogate_models/krg.rstx index e790f0de5..93c824159 100644 --- a/doc/_src_docs/surrogate_models/krg.rstx +++ b/doc/_src_docs/surrogate_models/krg.rstx @@ -42,7 +42,7 @@ Matérn 3/2 correlation function: Exponential Squared Sine correlation function: .. math :: - \prod\limits_{l=1}^{nx}\exp\left(-\theta_{l_1} \left( \theta_{l_2} \left( \sin \left( x_l^{(i)}-x_l^{(j)} \right)\right) \right)^{2} \right), \quad \forall\ \theta_l\in\mathbb{R}^+ + \prod\limits_{l=1}^{nx}\exp\left(-\theta_{l_1} \left( \sin \left( \theta_{l_2} \left( x_l^{(i)}-x_l^{(j)} \right)\right)^{2} \right) \right), \quad \forall\ \theta_l\in\mathbb{R}^+ These correlation functions are called by 'abs_exp' (exponential), 'squar_exp' (Gaussian), 'matern52','matern32' and 'squar_sin_exp' in SMT.