metacountregressor 1.0.13__py3-none-any.whl → 1.0.18__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.
@@ -188,7 +188,7 @@ def main(args, **kwargs):
188
188
  # some example argument, these are defualt so the following line is just for claritity
189
189
  AMALAN = False
190
190
  if AMALAN:
191
-
191
+ print('testing code')
192
192
  args = {'algorithm': 'hs', 'test_percentage': 0.15, 'test_complexity': 6, 'instance_number': 1,
193
193
  'val_percentage': 0.15, 'obj_1': 'bic', '_obj_2': 'RMSE_TEST', "MAX_TIME": 600, 'desicions':a_des, 'is_multi': 1}
194
194
  else:
@@ -227,6 +227,11 @@ class ObjectiveFunction(object):
227
227
  print(
228
228
  'Making a Directory, if you want to stop from storing the files to this directory set argumet: make_directory:False')
229
229
  os.makedirs(self.instance_name)
230
+ else:
231
+ if not kwargs.get('delete_directory', False):
232
+ print('to clear the directory clear')
233
+ os.d
234
+
230
235
  else:
231
236
  self.save_state = False
232
237
  if not hasattr(self, '_obj_1'):
@@ -574,7 +579,7 @@ class ObjectiveFunction(object):
574
579
  # Harmony search parameters
575
580
  self.algorithm = kwargs.get('algorithm', 'hs')
576
581
  self._hms = 20
577
- self._max_time = kwargs.get('_max_time', 0.8 * 60 * 60 * 24)
582
+ # self._max_time = kwargs.get('_max_time', 0.8 * 60 * 60 * 24)
578
583
  self._hmcr = kwargs.get('_hmcr', 0.5)
579
584
  self._par = 0.3
580
585
  self._mpai = 1
@@ -724,7 +729,7 @@ class ObjectiveFunction(object):
724
729
  # defalt paramaters for hs #TODO unpack into harmony search class
725
730
  self.algorithm = kwargs.get('algorithm', 'hs') # 'sa' 'de' also avialable
726
731
  self._hms = 20
727
- self._max_time = self._max_time = kwargs.get('_max_time', kwargs.get('MAX_TIME', 0.8 * 60 * 60 * 24))
732
+ self._max_time = kwargs.get('_max_time', kwargs.get('MAX_TIME', 0.8 * 60 * 60 * 24))
728
733
  self._hmcr = kwargs.get('_hmcr', .5)
729
734
  self._par = 0.3 #dont think this gets useted
730
735
  self._mpai = 1
@@ -2083,6 +2088,7 @@ class ObjectiveFunction(object):
2083
2088
 
2084
2089
  # Calculate dispersion
2085
2090
  dispersion = residual_deviance / degrees_of_freedom
2091
+
2086
2092
  except:
2087
2093
  dispersion =1
2088
2094
 
@@ -6887,7 +6893,7 @@ class ObjectiveFunction(object):
6887
6893
  else:
6888
6894
  initial_params = np.random.uniform(-0.01, 0.3, size=num_coefficients)
6889
6895
  except:
6890
- print('pre fit failed')
6896
+ print('pre fit failed, continie')
6891
6897
  initial_params = np.random.uniform(-0.01, 0.01, size=num_coefficients)
6892
6898
 
6893
6899
 
@@ -6897,6 +6903,13 @@ class ObjectiveFunction(object):
6897
6903
  initial_params[parma_sum:-dispersion] =0.0001
6898
6904
 
6899
6905
  # Add dispersion parameter if applicable
6906
+ if dispersion == 1:
6907
+ print('checking for dispersion')
6908
+ calculated_dispersion = self.poisson_mean_get_dispersion(initial_params[:-1], XX, y)
6909
+ print('calculated dispersion', calculated_dispersion)
6910
+ print('estimated dispersion', initial_params[-1])
6911
+
6912
+
6900
6913
  if dispersion > 0:
6901
6914
  initial_params[-1] = 0.0
6902
6915
  #initial_params[0] =3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metacountregressor
3
- Version: 1.0.13
3
+ Version: 1.0.18
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, Alexander Paz
@@ -4,18 +4,18 @@ metacountregressor/app_main.py,sha256=vY3GczTbGbBRalbzMkl_9jVW7RMgEOc6z2Dr1IZJv9
4
4
  metacountregressor/data_split_helper.py,sha256=M2fIMdIO8znUaYhx5wlacRyNWdQjNYu1z1wkE-kFUYU,3373
5
5
  metacountregressor/halton.py,sha256=jhovA45UBoZYU9g-hl6Lb2sBIx_ZBTNdPrpgkzR9fng,9463
6
6
  metacountregressor/helperprocess.py,sha256=wW45-i31zy6rwaXt5PZt0GyR83PzF30jc9Wl4SQtnUI,26372
7
- metacountregressor/main.py,sha256=UFx9FONEjrVGIdoHdkwCejbi62OmIcM3_vGW0FSoXP4,24363
7
+ metacountregressor/main.py,sha256=v1W9XuXkvOr5SXHdOBuQ3KUSFW6mpGR3ydO0DqAjxqY,24396
8
8
  metacountregressor/main_old.py,sha256=eTS4ygq27MnU-dZ_j983Ucb-D5XfbVF8OJQK2hVVLZc,24123
9
9
  metacountregressor/metaheuristics.py,sha256=gVqJRNiHOa48-dHZxaJNgu2OLiYOpSYvWHJ1VFPqFWY,107817
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=Tzi7ZojYS8H4ZGJzKrmfqohnvpOtLtPqqhpWbW4Zo74,346466
14
+ metacountregressor/solution.py,sha256=ufrKyd1MOVi9SnWmvNKh9h913UAPeLNjJuyBEEvUsXk,346926
15
15
  metacountregressor/test_code.py,sha256=_7Emm2JbhK_NVhxoqMhshN2JeHZtihZuSDl3Jpe7Ajk,1641
16
16
  metacountregressor/test_generated_paper2.py,sha256=pwOoRzl1jJIIOUAAvbkT6HmmTQ81mwpsshn9SLdKOg8,3927
17
- metacountregressor-1.0.13.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
18
- metacountregressor-1.0.13.dist-info/METADATA,sha256=gByJzUWaUNb16lb5htmQ3TfW85_DQa5SipENnAtsGFI,23635
19
- metacountregressor-1.0.13.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
20
- metacountregressor-1.0.13.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
21
- metacountregressor-1.0.13.dist-info/RECORD,,
17
+ metacountregressor-1.0.18.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
18
+ metacountregressor-1.0.18.dist-info/METADATA,sha256=9l4G8HZtBunSQYosC6TXH99IxlXbfATdC2LXGY6cJCA,23635
19
+ metacountregressor-1.0.18.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
20
+ metacountregressor-1.0.18.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
21
+ metacountregressor-1.0.18.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5