pyfemtet 0.4.14__py3-none-any.whl → 0.4.15__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.
Potentially problematic release.
This version of pyfemtet might be problematic. Click here for more details.
- pyfemtet/__init__.py +1 -1
- pyfemtet/opt/prediction/single_task_gp.py +12 -5
- {pyfemtet-0.4.14.dist-info → pyfemtet-0.4.15.dist-info}/METADATA +1 -1
- {pyfemtet-0.4.14.dist-info → pyfemtet-0.4.15.dist-info}/RECORD +7 -7
- {pyfemtet-0.4.14.dist-info → pyfemtet-0.4.15.dist-info}/LICENSE +0 -0
- {pyfemtet-0.4.14.dist-info → pyfemtet-0.4.15.dist-info}/WHEEL +0 -0
- {pyfemtet-0.4.14.dist-info → pyfemtet-0.4.15.dist-info}/entry_points.txt +0 -0
pyfemtet/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.4.
|
|
1
|
+
__version__ = "0.4.15"
|
|
@@ -52,6 +52,9 @@ class SingleTaskGPModel(PredictionModelBase):
|
|
|
52
52
|
train_x = torch.tensor(x).double()
|
|
53
53
|
train_y = torch.tensor(y).double()
|
|
54
54
|
|
|
55
|
+
# check y shape (if single objective problem, output dimension is (n,) )
|
|
56
|
+
self._is_single_objective = len(y[0]) == 1
|
|
57
|
+
|
|
55
58
|
# Normalize the input data to the unit cube
|
|
56
59
|
self.scaler_x = MyMinMaxScaler()
|
|
57
60
|
train_x = self.scaler_x.fit_transform(train_x)
|
|
@@ -73,10 +76,14 @@ class SingleTaskGPModel(PredictionModelBase):
|
|
|
73
76
|
scaled_x = self.scaler_x.transform(x)
|
|
74
77
|
# predict
|
|
75
78
|
pred = self.gp(scaled_x)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
if self._is_single_objective:
|
|
80
|
+
scaled_mean = pred.mean.reshape((-1, 1))
|
|
81
|
+
scaled_var = pred.variance.reshape((-1, 1))
|
|
82
|
+
else:
|
|
83
|
+
scaled_mean = torch.permute(pred.mean, (1, 0))
|
|
84
|
+
scaled_var = torch.permute(pred.variance, (1, 0))
|
|
85
|
+
# unscaling
|
|
86
|
+
mean = self.scaler_y.inverse_transform_mean(scaled_mean).numpy()
|
|
87
|
+
var = self.scaler_y.inverse_transform_var(scaled_var).numpy()
|
|
81
88
|
std = np.sqrt(var)
|
|
82
89
|
return mean, std
|
|
@@ -12,7 +12,7 @@ pyfemtet/FemtetPJTSample/her_ex40_parametric.py,sha256=B5PQoh71Q3KN2CyLU1gP_Yh9g
|
|
|
12
12
|
pyfemtet/FemtetPJTSample/wat_ex14_parallel_parametric.py,sha256=UfhJffuXyhzdIWNpOrpV6xLTK1fuVvgyhlyg4Rp-628,2148
|
|
13
13
|
pyfemtet/FemtetPJTSample/wat_ex14_parametric.femprj,sha256=pxacKe0NPNUPAcxqo2cATFApsMKiVt2g2e_FOk4fpjA,172895
|
|
14
14
|
pyfemtet/FemtetPJTSample/wat_ex14_parametric.py,sha256=LGbWxCek0Ad2YrDCKykiQkE3aIypM4g8P3mLd_2anEE,2052
|
|
15
|
-
pyfemtet/__init__.py,sha256=
|
|
15
|
+
pyfemtet/__init__.py,sha256=q9wjjCZKB7wCnkaPzjXnqmTf1it-OQDdOrqMvJhYKSE,22
|
|
16
16
|
pyfemtet/_test_util.py,sha256=VLRyeLrBbaZ-tBoncyiR9-1BgT5N91SPR8u1j0AI6dU,4445
|
|
17
17
|
pyfemtet/core.py,sha256=3lqfBGJ5IuKz2Nqj5pRo7YQqKwx_0ZDL72u95Ur_1p0,1386
|
|
18
18
|
pyfemtet/dispatch_extensions.py,sha256=XVZajbjh7mb6NG4Hq8qff2TJWab75r4Hd59cIvCRsVg,16213
|
|
@@ -121,7 +121,7 @@ pyfemtet/opt/opt/_scipy.py,sha256=HkEZTjMRJvOoIWIpIEbJaZJjZQkQ73FjD9c4NZADeIc,41
|
|
|
121
121
|
pyfemtet/opt/opt/_scipy_scalar.py,sha256=6nFAnERtQIMnPJCwR5HkpKetxrVJaSFWHxJfXMPn3wg,2815
|
|
122
122
|
pyfemtet/opt/prediction/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
123
123
|
pyfemtet/opt/prediction/base.py,sha256=q4lDqrOtAkiWG-OblQEddnEVj29Q-EJE3-O5QTOb3Q4,1761
|
|
124
|
-
pyfemtet/opt/prediction/single_task_gp.py,sha256=
|
|
124
|
+
pyfemtet/opt/prediction/single_task_gp.py,sha256=VbsVllzXzCGqkM1fC61Ouqwuv3ddS5INbFwDG8v-d6g,3303
|
|
125
125
|
pyfemtet/opt/visualization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
126
126
|
pyfemtet/opt/visualization/_create_wrapped_components.py,sha256=XpOv_iEEB3lFT3vYuCnCCbwUwRFbCYgvsZDpaiSzmZY,2511
|
|
127
127
|
pyfemtet/opt/visualization/base.py,sha256=XhZodLEr5PPHmtNai6uZcPJobKurENepuGCUaqDOI7I,7588
|
|
@@ -144,8 +144,8 @@ pyfemtet/opt/visualization/wrapped_components/dbc.py,sha256=wzR1ZMOb4uwPNTMFn5up
|
|
|
144
144
|
pyfemtet/opt/visualization/wrapped_components/dcc.py,sha256=hcW7SR6VIMn4S4-JMyohvOzdc0Aw8A4chIeHqQEUbFU,17499
|
|
145
145
|
pyfemtet/opt/visualization/wrapped_components/html.py,sha256=sE2XHTDY1GvA1NW7y6SKWf-WglVXFKKvXhU9h3z53_g,95652
|
|
146
146
|
pyfemtet/opt/visualization/wrapped_components/str_enum.py,sha256=NZqbh2jNEAckvJyZv__MWeRs2F2Q-dkJCWo30rU2rrM,1383
|
|
147
|
-
pyfemtet-0.4.
|
|
148
|
-
pyfemtet-0.4.
|
|
149
|
-
pyfemtet-0.4.
|
|
150
|
-
pyfemtet-0.4.
|
|
151
|
-
pyfemtet-0.4.
|
|
147
|
+
pyfemtet-0.4.15.dist-info/LICENSE,sha256=sVQBhyoglGJUu65-BP3iR6ujORI6YgEU2Qm-V4fGlOA,1485
|
|
148
|
+
pyfemtet-0.4.15.dist-info/METADATA,sha256=uZW9fUUysTygyub0pti4AE85ZdN2wgPR1DIkNNNiz4Q,3421
|
|
149
|
+
pyfemtet-0.4.15.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
150
|
+
pyfemtet-0.4.15.dist-info/entry_points.txt,sha256=ZfYqRaoiPtuWqFi2_msccyrVF0LurMn-IHlYamAegZo,104
|
|
151
|
+
pyfemtet-0.4.15.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|