metacountregressor 0.1.141__py3-none-any.whl → 0.1.143__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- metacountregressor/metaheuristics.py +2 -2
- metacountregressor/solution.py +7 -6
- {metacountregressor-0.1.141.dist-info → metacountregressor-0.1.143.dist-info}/METADATA +1 -1
- {metacountregressor-0.1.141.dist-info → metacountregressor-0.1.143.dist-info}/RECORD +7 -7
- {metacountregressor-0.1.141.dist-info → metacountregressor-0.1.143.dist-info}/LICENSE.txt +0 -0
- {metacountregressor-0.1.141.dist-info → metacountregressor-0.1.143.dist-info}/WHEEL +0 -0
- {metacountregressor-0.1.141.dist-info → metacountregressor-0.1.143.dist-info}/top_level.txt +0 -0
@@ -1239,7 +1239,7 @@ class HarmonySearch(object):
|
|
1239
1239
|
self._obj_fun = objective_function
|
1240
1240
|
## NEW CODE, TRYING TO EXCTACT OUT THE PARAMATERS
|
1241
1241
|
self._hms = kwargs.get('_hms', 20)
|
1242
|
-
self._par = kwargs.get(
|
1242
|
+
self._par = kwargs.get('_par', .30)
|
1243
1243
|
self.F = kwargs.get('_AI', 2) # mutation scale
|
1244
1244
|
self.iter = kwargs.get('_max_iter', 10000)
|
1245
1245
|
self.cr = kwargs.get('_crossover_perc') or kwargs.get('_cr', 0.2)
|
@@ -1248,7 +1248,7 @@ class HarmonySearch(object):
|
|
1248
1248
|
|
1249
1249
|
|
1250
1250
|
# for printing basics metrics
|
1251
|
-
self.print_verbose =
|
1251
|
+
self.print_verbose = kwargs.get('verbose', False)
|
1252
1252
|
# harmony_memory stores the best hms harmonies
|
1253
1253
|
self._harmony_memory = list()
|
1254
1254
|
# harmony_history stores all hms harmonies every nth improvisations (i.e., one 'generation')
|
metacountregressor/solution.py
CHANGED
@@ -136,10 +136,10 @@ class ObjectiveFunction(object):
|
|
136
136
|
self.constant_value = 0
|
137
137
|
self.negative_binomial_value = 1
|
138
138
|
|
139
|
-
self.verbose_safe =
|
139
|
+
self.verbose_safe = kwargs.get('verbose', 0)
|
140
140
|
self.please_print = kwargs.get('please_print', 0)
|
141
141
|
self.group_halton = None
|
142
|
-
self.grad_yes =
|
142
|
+
self.grad_yes = kwargs.get('grad_est', False)
|
143
143
|
self.hess_yes = False
|
144
144
|
self.group_halton_test = None
|
145
145
|
self.panels = None
|
@@ -177,13 +177,14 @@ class ObjectiveFunction(object):
|
|
177
177
|
self.method_ll = 'Nelder-Mead-BFGS'
|
178
178
|
|
179
179
|
self.method_ll = 'L-BFGS-B' # alternatives 'BFGS_2', 'BFGS
|
180
|
-
self.method_ll = '
|
180
|
+
self.method_ll = kwargs.get('method', 'Nealder-Mead-BFGS')
|
181
|
+
|
181
182
|
#self.method_ll = 'Nelder-Mead-BFGS'
|
182
183
|
self.Keep_Fit = 2
|
183
184
|
self.MP = 0
|
184
185
|
# Nelder-Mead-BFGS
|
185
186
|
|
186
|
-
self._max_characteristics = 26
|
187
|
+
self._max_characteristics = self.get('_max_vars', 26)
|
187
188
|
|
188
189
|
self.beta_dict = dict
|
189
190
|
|
@@ -4858,7 +4859,7 @@ class ObjectiveFunction(object):
|
|
4858
4859
|
proba.append(dev.to_cpu(proba_))
|
4859
4860
|
|
4860
4861
|
lik = np.stack(proba).sum(axis=0) / R # (N, )
|
4861
|
-
lik = np.clip(lik, min_comp_val,
|
4862
|
+
lik = np.clip(lik, min_comp_val, max_comp_val)
|
4862
4863
|
# lik = np.nan_to_num(lik, )
|
4863
4864
|
loglik = np.log(lik)
|
4864
4865
|
llf_main = loglik
|
@@ -5188,7 +5189,7 @@ class ObjectiveFunction(object):
|
|
5188
5189
|
H = self.numerical_hessian(lambda x: self._loglik_gradient(x, *argbs), result.x, eps=1e-7 * self.n_obs)
|
5189
5190
|
result['Hessian'] = H
|
5190
5191
|
result['hess_inv'] = np.linalg.pinv(H)
|
5191
|
-
|
5192
|
+
|
5192
5193
|
standard_errors = np.sqrt(np.diag(np.linalg.pinv(H)))
|
5193
5194
|
return result
|
5194
5195
|
# return minimize(loglik_fn, x, args=args, jac=args[6], hess=args[7], method='BFGS', options= {'gtol':1e-7*self.N}*self.Ndraws)
|
@@ -6,15 +6,15 @@ metacountregressor/halton.py,sha256=jhovA45UBoZYU9g-hl6Lb2sBIx_ZBTNdPrpgkzR9fng,
|
|
6
6
|
metacountregressor/helperprocess.py,sha256=05698FXkXiAZi2JvVxCtaBwSf9LbW1lY8q_eFmEF5Nc,20739
|
7
7
|
metacountregressor/main.py,sha256=2Rx_mGIGzl4lhwkMb7DHvsBaawqEakKiVR1Yr2uG9Yo,22819
|
8
8
|
metacountregressor/main_old.py,sha256=eTS4ygq27MnU-dZ_j983Ucb-D5XfbVF8OJQK2hVVLZc,24123
|
9
|
-
metacountregressor/metaheuristics.py,sha256=
|
9
|
+
metacountregressor/metaheuristics.py,sha256=1Tm_BS8HxumEo9fteIwTTkfiJXbfH6wlfSmY0tSt77A,106289
|
10
10
|
metacountregressor/pareto_file.py,sha256=whySaoPAUWYjyI8zo0hwAOa3rFk6SIUlHSpqZiLur0k,23096
|
11
11
|
metacountregressor/pareto_logger__plot.py,sha256=mEU2QN4wmsM7t39GJ_XhJ_jjsdl09JOmG0U2jICrAkI,30037
|
12
12
|
metacountregressor/setup.py,sha256=5UcQCCLR8Fm5odA3MX78WwahavxFq4mVD6oq0IuQvAY,936
|
13
13
|
metacountregressor/single_objective_finder.py,sha256=jVG7GJBqzSP4_riYr-kMMKy_LE3SlGmKMunNhHYxgRg,8011
|
14
|
-
metacountregressor/solution.py,sha256=
|
14
|
+
metacountregressor/solution.py,sha256=y5YO5kHvipn82uOj8buYSQZFohzjMti5LkMZcTdkleU,278334
|
15
15
|
metacountregressor/test_generated_paper2.py,sha256=pwOoRzl1jJIIOUAAvbkT6HmmTQ81mwpsshn9SLdKOg8,3927
|
16
|
-
metacountregressor-0.1.
|
17
|
-
metacountregressor-0.1.
|
18
|
-
metacountregressor-0.1.
|
19
|
-
metacountregressor-0.1.
|
20
|
-
metacountregressor-0.1.
|
16
|
+
metacountregressor-0.1.143.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
17
|
+
metacountregressor-0.1.143.dist-info/METADATA,sha256=ykaOHFpVeb_segLwOTdJsahDwqcyq03u4nswEmo_mXE,23434
|
18
|
+
metacountregressor-0.1.143.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
19
|
+
metacountregressor-0.1.143.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
|
20
|
+
metacountregressor-0.1.143.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|