metacountregressor 0.1.36__py3-none-any.whl → 0.1.38__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.
@@ -145,7 +145,7 @@ class ObjectiveFunction(object):
145
145
  self.best_obj_1 = 100000000
146
146
  self._obj_1 = 'bic'
147
147
  self._obj_2 = 'MSE'
148
- self.numerical_hessian_calc = 1 # calculates hessian by statsmodels otherwise scipy
148
+ self.numerical_hessian_calc = 0 # calculates hessian by statsmodels otherwise scipy
149
149
  self.full_model = None
150
150
  self.GP_pararameter = 0
151
151
  self.is_multi = 0
@@ -156,6 +156,7 @@ class ObjectiveFunction(object):
156
156
  #defualt paraamaters for hs
157
157
  self.agorithm ='hs'
158
158
  self._hms = 20
159
+ self._max_time = 60*60*24
159
160
  self._hmcr = .5
160
161
  self._max_imp = 100000
161
162
  self._panels = .3
@@ -5577,10 +5578,11 @@ class ObjectiveFunction(object):
5577
5578
  XX_test = mod.get('Xr_test')
5578
5579
 
5579
5580
 
5580
-
5581
-
5581
+ bb = np.random.normal(
5582
+ 0.1, 0.05, size=k + kr+kg+kh+dispersion_param_num)
5583
+ '''
5582
5584
  try:
5583
-
5585
+
5584
5586
  res = sm.GLM(mod.get('y')[:, 0], XX[:, 0, :], family=sm.families.Poisson(
5585
5587
  ), offset=self._offsets[:, 0, :].ravel()).fit()
5586
5588
  bb = res.params.copy()
@@ -5638,6 +5640,8 @@ class ObjectiveFunction(object):
5638
5640
  #bb = np.append(bb,1)
5639
5641
  #initial_beta2 = minimize(self._loglik_gradient, bb, bounds = bounds, jac = calc_gradient, args=(XX, y, None, None, None, None, calc_gradient, calc_gradient, 4, 0, False, 0, None, sub_zi, exog_infl), method=method, tol = tol['ftol'], options={'gtol': tol['gtol']})
5640
5642
  #print('did this work')
5643
+ '''
5644
+
5641
5645
  try:
5642
5646
  if method == 'L-BFGS-B' or method2 == 'L-BFGS-B':
5643
5647
  if dispersion == 0:
@@ -5750,10 +5754,13 @@ class ObjectiveFunction(object):
5750
5754
  # return sol, log_ll, initial_beta['x'], self.stderr, self.pvalues, self.zvalues, is_halton, is_delete_init
5751
5755
  return sol, log_ll_fixed, initial_beta['x'], stderr_fixed, pvalue_alt_fixed, zvalues_fixed, is_halton, is_delete_init
5752
5756
  # return obj_1, log_ll_fixed, initial_beta.x, stderr_fixed, pvalue_alt_fixed, zvalues_fixed, is_halton, is_delete_init
5753
- else:
5757
+ elif initial_beta is None:
5758
+
5754
5759
  self.convergance = None
5755
5760
  print('why does it do this, this should not happen')
5756
5761
  return sol, None, initial_beta['x'], None, None, None, 0, 1
5762
+ else:
5763
+ print('trying fit anyway')
5757
5764
 
5758
5765
  if dispersion == 0 or dispersion is None or dispersion == 1 or dispersion == 2 or dispersion == 3:
5759
5766
  if initial_beta is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: metacountregressor
3
- Version: 0.1.36
3
+ Version: 0.1.38
4
4
  Summary: A python package for count regression of rare events assisted by metaheuristics
5
5
  Author: zahern
6
6
  Author-email: zeke.ahern@hdr.qut.edu.au
@@ -38,7 +38,7 @@ metacountregressor/set_data.csv,sha256=68iJkW4O4HVM8GyNlO0drwp8ZMXkccXCUc7jnA8xn
38
38
  metacountregressor/set_data_s.csv,sha256=hELwnv6RjpmXcMheFafwrYbLbyYE21hFKyqJhA8L05o,11111
39
39
  metacountregressor/setup.py,sha256=CpbdBScFhvStc6WByFiAlP7T5wGdWetsLI8X5JRRpP4,268
40
40
  metacountregressor/single_objective_finder.py,sha256=QYXUpxJp7-ul5ZiIKGgYGaH_yFFGUbI7X3yKu5asogE,1960
41
- metacountregressor/solution.py,sha256=eq83FPyydYc_VPmBjdQs1AqUjeEWbcIEn5OnXNshVh0,290278
41
+ metacountregressor/solution.py,sha256=qQNpWCadMamou28o14FvgHQWmiv_H3dqMalr7iAp-7A,290567
42
42
  metacountregressor/Stage5A_1848_All_Initial_Columns.csv,sha256=uwsadEyupgIH1w5f8vnlwlo13ryww3VCGYlOnN0dEL0,188769
43
43
  metacountregressor/Stage5A_1848_All_Initial_Columns.xlsx,sha256=5U5Ab1jjGi5qoKp06Bw2tpdPjGaDGoyt5976AAFdEbs,699231
44
44
  metacountregressor/synth_dataset_generator.ipynb,sha256=caBMQJOaeINPZJw5aTsSOXhmenSqrpS7GycINAzUUxs,27153
@@ -48,6 +48,6 @@ metacountregressor/testML.R,sha256=UbTsLFUhoJG9bJnU2rbUKlfcprAkROnhREK41qKzbvQ,2
48
48
  metacountregressor/TestSetFake.csv,sha256=JPYAWYLAw7rgQHdGTz0rltMfapX8QYt3BVSyK_D-Lzg,1640
49
49
  metacountregressor/ThaiAccident.csv,sha256=NIi_uPyo5u-B6Hj0Ln9xuJ8fnvGbWK9GLdTWdpG5uug,418202
50
50
  metacountregressor/tk_app.py,sha256=0UM76hpQ-ha96ma_Z5ryxYQUSdF4PJBCsLuI1EGu6_E,59490
51
- metacountregressor-0.1.36.dist-info/METADATA,sha256=KGQAnPy7LHswiyCPkhEI0w8OhmFDgjz2YgRw8BxKqe8,28479
52
- metacountregressor-0.1.36.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
53
- metacountregressor-0.1.36.dist-info/RECORD,,
51
+ metacountregressor-0.1.38.dist-info/METADATA,sha256=QofiZ2BrvMOZAA8T0mAd4bdEcltulMF_YpFEXezrlGY,28479
52
+ metacountregressor-0.1.38.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
53
+ metacountregressor-0.1.38.dist-info/RECORD,,