iam-git / WellMet (public) (License: MIT) (since 2021-08-31) (hash sha1)
WellMet is pure Python framework for spatial structural reliability analysis. Or, more specifically, for "failure probability estimation and detection of failure surfaces by adaptive sequential decomposition of the design domain".
List of commits:
Subject Hash Author Date (UTC)
blackbox: KechatoLukiskon comed back! 01237377ef931193951b7446561c88b4e10c0dae Олёш 2020-08-04 00:56:09
blackbox: WIP 897b4334a6a605702f9a3bfdccf57165a5dc1867 Олёш 2020-08-03 21:33:23
blackbox: WIP a59af121f46e67e275b39858ba38131c0002077d Олёш 2020-08-03 02:00:41
lukiskon comed back! blackbox WIP 2fc15ae88e89a4208149099a9e898e1a7448de31 Олёш 2020-08-02 21:56:24
every box got its own name to call him df268dcccc012fff6499d6a3427253f3d352072a Олёш 2020-08-01 22:28:36
estimation: little fix in Voronoi_2_point 84115e8d544a78bdaabcd624336ae181e61c845e Олёш 2020-08-01 19:35:48
candybox: reworked 07551958091f48d8f7eb62d27468c2abad030a33 Олёш 2020-08-01 17:24:33
IS_stat: defaultdict replaced by the own one, ISSI.add_single_event_data method added 131e8c23d8f164ae92b838451fc9976a888bffeb Олёш 2020-08-01 00:46:53
IS_stat: IS_like() and ISSI.delete_event_data() methods added a9b4514c9a802797bc15f518b3aeef61f4e3f24e Олёш 2020-07-31 19:58:21
blackbox: MinEnergyCensoredSampling at very begining a924d5d2991f624932d2f0165078e930bda65c58 Олёш 2020-07-31 01:04:09
estimation: --dtto-- 3816060e9da61b99593b7887ec66d6b0a8b239b9 Олёш 2020-07-28 11:27:22
estimation: nejde cell sampling pořadně zlepšit 824d5a2cf7bd10c0fec4b152549d61873cb897dc Олёш 2020-07-28 08:50:45
estimation: playing with cell sampling 78a8dc9a52993876b8a7991590590990efd98812 Олёш 2020-07-28 01:52:35
qt_plot: draw failure boundary by 1000 points d8737247d6cbdb52cc1b1a3d0935edd60234b515 Олёш 2020-07-27 10:38:57
estimation: Voronoi_2_point estimation node_pf_coloring fixed 35fc3d622fe9d5cfa519f1484862108b4003688b Олёш 2020-07-27 10:35:06
candybox: pandas index mess fix, __getattr__ will return numpyed array 10e7c39a69bd105780924319bbafb58602251a9d Олёш 2020-07-27 10:31:43
qt_plot: SimplexEstimationWidget: nodes size increased, VoronoiGraph: redraw item added 8176d66545bfcfa6ee4ea64cbdf3ffd9bbf5ca11 Олёш 2020-07-24 07:01:13
qt_plot: grafy aspoň něco kreslí c2c628d6edf48eb607e44902fa14022c97832cb1 Олёш 2020-07-22 14:40:30
qt_plot: с тех виӝетů на пока хватит 55ee0ccf1d72d6515a66b673c809b9548a2b1ecb Олёш 2020-07-22 09:01:26
qt_plot: WIP 65694b44be8b8f1da9d5c385d37964e65c3824e7 Олёш 2020-07-22 07:21:30
Commit 01237377ef931193951b7446561c88b4e10c0dae - blackbox: KechatoLukiskon comed back!
Author: Олёш
Author date (UTC): 2020-08-04 00:56
Committer name: Олёш
Committer date (UTC): 2020-08-04 00:56
Parent(s): 897b4334a6a605702f9a3bfdccf57165a5dc1867
Signer:
Signing key:
Signing status: N
Tree: ed18eacfbf90c8256a7d2a162624a03dd99c1d08
File Lines added Lines deleted
blackbox.py 73 2
candybox.py 6 5
File blackbox.py changed (mode: 100644) (index 5697200..b7128ae)
... ... import inspect # for ._log() function
24 24 from .samplebox import SampleBox # for candidates packing from .samplebox import SampleBox # for candidates packing
25 25 from . import lukiskon as lk from . import lukiskon as lk
26 26
27 from . import estimation as stm # for KechatoLukiskon
27 28
28 29
29 30
 
... ... class MinEnergyCensoredSampling(AdaptiveCensoring):
799 800
800 801 # invalidujeme staré # invalidujeme staré
801 802 if -2 in bx.candidates_index: if -2 in bx.candidates_index:
802 pass
803 pass
803 804 #D.pop(k[,d]) #D.pop(k[,d])
804 805
805 806 # pokud není splněná podmínka, # pokud není splněná podmínka,
 
... ... class MinEnergyCensoredSampling(AdaptiveCensoring):
887 888
888 889 def select_candidate(bx): def select_candidate(bx):
889 890
890
891 891 # krám, přece třidíme odpad! # krám, přece třidíme odpad!
892 892 # pokud v tohlenstom krámu najdeme něco slíbného, # pokud v tohlenstom krámu najdeme něco slíbného,
893 893 # tak tu celou skladku прошерстиме - prohrabáme # tak tu celou skladku прошерстиме - prohrabáme
 
... ... class MinEnergyCensoredSampling(AdaptiveCensoring):
1145 1145 events[found_simplices >= 0] = bx.get_events()[found_simplices[found_simplices >= 0]] events[found_simplices >= 0] = bx.get_events()[found_simplices[found_simplices >= 0]]
1146 1146 candidates.event = events candidates.event = events
1147 1147
1148
1149
1150
1151
1152
1153 class KechatoLukiskon(BlackBox):
1154 def __init__(kl, sample_object, model_space='Rn', sampling_space=None, kechato_space='Rn', p_norm=1, gradient=None, budget=20000):
1155 kl.model_space = model_space
1156 kl.sampling_space = sampling_space
1157 kl.kechato_space = kechato_space
1158 kl.p_norm = p_norm
1159 kl.gradient = gradient
1160 kl.budget = budget
1161
1162 super().__init__(sample_object)
1163
1164
1165 def __call__(kl):
1166 kl._logger(msg="умой! Умойлэсь но умой сэмпл шедьтоно")
1167
1168 if (len(kl.failure_points) < 1) or (len(kl.success_points) < 1):
1169 kl._logger(msg="Умоез сэмпл шедьтыны уг быгаты :( ")
1170 return kl.LHS_like_correction(kl.h(1))
1171
1172 else:
1173
1174 kl.ivortodon = 0
1175 kl.to_sample = None
1176
1177 # ty brdo, stm nedává číslo tečky. Nemusí, no...
1178 kl.i = 0
1179 stm.Voronoi_2_point_estimation(kl, model_space=kl.model_space, sampling_space=kl.sampling_space,\
1180 p_norm=kl.p_norm, gradient=kl.gradient, budget=kl.budget, callback=kl.callback)
1181
1182 if kl.to_sample is not None:
1183 # hrubě ošidíme s takovejhlema usilima námi pěčlivě vybraný vzorečiček
1184 return kl.LHS_like_correction(kl.to_sample)
1185 else:
1186 kl._logger(msg="Умоез сэмпл шедьтыны ӧй быгаты :( ")
1187 return kl.LHS_like_correction(kl.h(1))
1188
1189
1190 def callback(kl, *args, **kwargs):
1191 # spoléhám na to, že stm vrácí tečky v f-ku
1192 nodes = kwargs['nodes']
1193 node_pf = nodes.node_pf_estimations
1194
1195 mask = (node_pf > 0) * (node_pf < 1)
1196 nodes = nodes[mask]
1197 if len(nodes) > 0:
1198 node_pf = node_pf[mask]
1199
1200 # !!!! ENTROPY !!!
1201 nodes.entropy = -node_pf*np.log(node_pf) - (1-node_pf)*np.log(1-node_pf)
1202
1203 nodes.ksee = lk.kechato_potential(kl.f_model[kl.i], nodes, kechato_space=kl.kechato_space)
1204
1205 nodes.ivortodon = nodes.entropy * nodes.ksee
1206
1207 if np.max(nodes.ivortodon) > kl.ivortodon:
1208 # side effects
1209 kl.ivortodon = np.max(nodes.ivortodon)
1210 kl.to_sample = nodes[np.argmax(nodes.ivortodon)]
1211
1212 # side effect
1213 kl.i += 1
1214
1215
1216
1217
1218
File candybox.py changed (mode: 100644) (index dfa1372..e5ef3df)
... ... class CandyBox:
95 95 df = pd.DataFrame(df).T df = pd.DataFrame(df).T
96 96
97 97 # chcem jednoduché numpy-like chovaní # chcem jednoduché numpy-like chovaní
98 df.reset_index(inplace=True)
98 # dělá problémy
99 #df.reset_index(inplace=True)
99 100 return CandyBox(cb.sampling_plan[slice], df=df) return CandyBox(cb.sampling_plan[slice], df=df)
100 101 # if not # if not
101 102 else: else:
 
... ... class CandyBox:
237 238 # we'll see, if .new_sample will be needed # we'll see, if .new_sample will be needed
238 239 # year, we need it # year, we need it
239 240 # мыным выль сэмпл кулэ! # мыным выль сэмпл кулэ!
240 def new_sample(cb, input):
241 def new_sample(cb, input=None, space='R'):
241 242 # čo to je za vstup? # čo to je za vstup?
242 243 if hasattr(input, 'sampling_plan'): #sweety_input: if hasattr(input, 'sampling_plan'): #sweety_input:
243 244 # if pandas # if pandas
244 245 if hasattr(input, 'df'): if hasattr(input, 'df'):
245 return CandyBox(cb.sampling_plan.new_sample(input.sampling_plan), df=input.df)
246 return CandyBox(cb.sampling_plan.new_sample(input.sampling_plan, space=space), df=input.df)
246 247
247 248 # if there is no pandas DataFrame # if there is no pandas DataFrame
248 249 # we suppose there is dictionary in input.kwargs # we suppose there is dictionary in input.kwargs
249 250 else: else:
250 return CandyBox(cb.sampling_plan.new_sample(input.sampling_plan), **input.kwargs)
251 return CandyBox(cb.sampling_plan.new_sample(input.sampling_plan, space=space), **input.kwargs)
251 252
252 253 # nesladký vstup # nesladký vstup
253 254 else: else:
254 return cb.sampling_plan.new_sample(input)
255 return cb.sampling_plan.new_sample(input, space)
255 256
256 257
257 258
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/iam-git/WellMet

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/iam-git/WellMet

Clone this repository using git:
git clone git://git.rocketgit.com/user/iam-git/WellMet

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main