metacountregressor 0.1.304__py3-none-any.whl → 0.1.306__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.
@@ -405,6 +405,7 @@ class DifferentialEvolution(object):
405
405
  """
406
406
 
407
407
  def __init__(self, objective_function, **kwargs):
408
+ objective_function.algorithm = 'de'
408
409
  self._obj_fun = objective_function
409
410
  if self._obj_fun._obj_1 is None:
410
411
  print('no objective found, automatically selecting BIC')
@@ -780,7 +781,7 @@ class SimulatedAnnealing(object):
780
781
  """
781
782
 
782
783
  def __init__(self, objective_function, **kwargs):
783
-
784
+ objective_function.algorithm = 'sa'
784
785
  self._STEPS_PER_TEMP = int(kwargs.get('STEPS_PER_TEMP', 2)) or int(kwargs.get('_ts', 2))
785
786
  self._INITAL_ACCEPT_RATE = float(kwargs.get('INTL_ACPT', 0.5))
786
787
  self._NUM_INITIAL_SLNS = int(kwargs.get('_num_intl_slns', 20))
@@ -1247,6 +1248,7 @@ class HarmonySearch(object):
1247
1248
  """
1248
1249
  Initialize HS with the specified objective function. Note that this objective function must implement ObjectiveFunctionInterface.
1249
1250
  """
1251
+ objective_function.algorithm = 'hs'
1250
1252
  self._obj_fun = objective_function
1251
1253
  ## NEW CODE, TRYING TO EXCTACT OUT THE PARAMATERS
1252
1254
  self._hms = kwargs.get('_hms', 20)
@@ -125,7 +125,7 @@ class ObjectiveFunction(object):
125
125
  self.gbl_best = 1000000.0
126
126
  self.run_bootstrap = kwargs.get('run_bootstrap', False)
127
127
  self.linear_regression = kwargs.get('linear_model', False)
128
- self.reg_penalty = 1
128
+ self.reg_penalty = kwargs.get('reg_penalty',1)
129
129
  self.power_up_ll = False
130
130
  self.nb_parma = 1
131
131
  self.bic = None
@@ -176,7 +176,6 @@ class ObjectiveFunction(object):
176
176
  self._max_imp = kwargs.get('_max_imp', 90000000)
177
177
  self._WIC = kwargs.get("WIC",10000) # Number of Iterations without Multiobjective Improvement #tod chuck into solution
178
178
  self._panels = None
179
- self.is_multi = True
180
179
  self.method_ll = 'Nelder-Mead-BFGS'
181
180
 
182
181
  self.method_ll = 'L-BFGS-B' # alternatives 'BFGS_2', 'BFGS
@@ -1157,16 +1156,16 @@ class ObjectiveFunction(object):
1157
1156
  x, 2) for x in self.pvalues]
1158
1157
  signif_list = self.pvalue_asterix_add(self.pvalues)
1159
1158
  if model == 1:
1160
-
1161
- #self.coeff_[-1] = 1/np.exp(self.coeff_[-1])
1159
+ # raise to the exponential
1160
+ self.coeff_[-1] = np.maximum([np.exp(self.coeff_[-1]),2])
1162
1161
  if self.no_extra_param:
1163
1162
  self.coeff_ = np.append(self.coeff_, self.nb_parma)
1164
1163
  self.stderr = np.append(self.stderr, 0.00001)
1165
1164
  self.zvalues = np.append(self.zvalues, 50)
1166
1165
 
1167
- elif self.coeff_[-1] < 0.25:
1166
+ #elif self.coeff_[-1] < 0.25:
1168
1167
  #print(self.coeff_[-1], 'Warning Check Dispersion')
1169
- print(f'dispession is para,aters {np.exp(self.coeff_[-1])}')
1168
+ #print(f'dispession is para,aters {np.exp(self.coeff_[-1])}')
1170
1169
  #self.coeff_[-1] = np.exp(self.coeff_[-1]) # min possible value for negbinom
1171
1170
 
1172
1171
 
@@ -1226,6 +1225,7 @@ class ObjectiveFunction(object):
1226
1225
  if model is not None:
1227
1226
  caption_parts = []
1228
1227
  if self.algorithm is not None:
1228
+
1229
1229
  caption_parts.append(
1230
1230
  f"{self._model_type_codes[model]} model found through the {self.algorithm} algorithm.")
1231
1231
 
@@ -1236,7 +1236,8 @@ class ObjectiveFunction(object):
1236
1236
  caption_parts.append(f"Log-Likelihood: {self.round_with_padding(self.log_lik, 2)}")
1237
1237
 
1238
1238
  if solution is not None:
1239
- caption_parts.append(f"{self._obj_2}: {self.round_with_padding(solution[self._obj_2], 2)}")
1239
+ if self.is_multi:
1240
+ caption_parts.append(f"{self._obj_2}: {self.round_with_padding(solution[self._obj_2], 2)}")
1240
1241
 
1241
1242
  caption = " ".join(caption_parts)
1242
1243
  # print(latextable.draw_latex(table, caption=caption, caption_above = True))
@@ -5936,7 +5937,7 @@ class ObjectiveFunction(object):
5936
5937
 
5937
5938
  # Optimization method and options
5938
5939
  method = self.method_ll if bounds is None else 'L-BFGS-B'
5939
- print('updataing methods')
5940
+
5940
5941
 
5941
5942
  #method = 'Nelder-Mead-BFGS'
5942
5943
  options = {'gtol': tol['gtol'], 'ftol': tol['ftol'], 'maxiter': 4000}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metacountregressor
3
- Version: 0.1.304
3
+ Version: 0.1.306
4
4
  Summary: Extensive Testing for Estimation of Data Count Models
5
5
  Home-page: https://github.com/zahern/CountDataEstimation
6
6
  Author: Zeke Ahern
@@ -6,15 +6,15 @@ metacountregressor/halton.py,sha256=jhovA45UBoZYU9g-hl6Lb2sBIx_ZBTNdPrpgkzR9fng,
6
6
  metacountregressor/helperprocess.py,sha256=ufdB6BcCIYN6btWdxyFlRCReuYEbVh6es1sdLsd8RTg,25917
7
7
  metacountregressor/main.py,sha256=xfpKN2w0kePHp_Q2HOPjtG15PLEN1L3sEnDw1PHBquw,23668
8
8
  metacountregressor/main_old.py,sha256=eTS4ygq27MnU-dZ_j983Ucb-D5XfbVF8OJQK2hVVLZc,24123
9
- metacountregressor/metaheuristics.py,sha256=bDyK5K4SFboWjaUIDlBR0H04a64XabXO_74SX0q_nsk,106813
9
+ metacountregressor/metaheuristics.py,sha256=eVlP9FO8StVxj7D6m8n6ekRR45sOtjZuoakr5tzb-H4,106944
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=j1jzIKn74LNvxjGyVJn9CUrUpvugM6I2duGRXTCOA3A,317500
14
+ metacountregressor/solution.py,sha256=OfhD7J28SSJ-dNLL0DTJ5T5vlqxhsclkDVtJMIIoJJM,317591
15
15
  metacountregressor/test_generated_paper2.py,sha256=pwOoRzl1jJIIOUAAvbkT6HmmTQ81mwpsshn9SLdKOg8,3927
16
- metacountregressor-0.1.304.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
17
- metacountregressor-0.1.304.dist-info/METADATA,sha256=-Yn7gguicyi13SlwYXvUjrcC0gJPBw320AtbAjtk27M,23581
18
- metacountregressor-0.1.304.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
19
- metacountregressor-0.1.304.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
20
- metacountregressor-0.1.304.dist-info/RECORD,,
16
+ metacountregressor-0.1.306.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
17
+ metacountregressor-0.1.306.dist-info/METADATA,sha256=ij4GJpcGRVnvBXdLVhj1tdh7T1SFnsOEdg6S0pHQCcs,23581
18
+ metacountregressor-0.1.306.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
19
+ metacountregressor-0.1.306.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
20
+ metacountregressor-0.1.306.dist-info/RECORD,,