metacountregressor 0.1.317__tar.gz → 0.1.320__tar.gz

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.
Files changed (31) hide show
  1. {metacountregressor-0.1.317/metacountregressor.egg-info → metacountregressor-0.1.320}/PKG-INFO +2 -2
  2. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/solution.py +25 -3
  3. {metacountregressor-0.1.317 → metacountregressor-0.1.320/metacountregressor.egg-info}/PKG-INFO +2 -2
  4. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor.egg-info/requires.txt +1 -1
  5. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/setup.py +1 -1
  6. metacountregressor-0.1.320/version.txt +1 -0
  7. metacountregressor-0.1.317/version.txt +0 -1
  8. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/LICENSE.txt +0 -0
  9. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/MANIFEST.in +0 -0
  10. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/README.md +0 -0
  11. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/README.rst +0 -0
  12. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/__init__.py +0 -0
  13. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/_device_cust.py +0 -0
  14. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/app_main.py +0 -0
  15. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/data_split_helper.py +0 -0
  16. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/halton.py +0 -0
  17. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/helperprocess.py +0 -0
  18. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/main.py +0 -0
  19. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/main_old.py +0 -0
  20. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/metaheuristics.py +0 -0
  21. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/pareto_file.py +0 -0
  22. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/pareto_logger__plot.py +0 -0
  23. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/setup.py +0 -0
  24. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/single_objective_finder.py +0 -0
  25. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor/test_generated_paper2.py +0 -0
  26. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor.egg-info/SOURCES.txt +0 -0
  27. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor.egg-info/dependency_links.txt +0 -0
  28. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor.egg-info/not-zip-safe +0 -0
  29. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/metacountregressor.egg-info/top_level.txt +0 -0
  30. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/setup.cfg +0 -0
  31. {metacountregressor-0.1.317 → metacountregressor-0.1.320}/tests/test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metacountregressor
3
- Version: 0.1.317
3
+ Version: 0.1.320
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
@@ -9,7 +9,7 @@ License: MIT
9
9
  Requires-Python: >=3.10
10
10
  Description-Content-Type: text/markdown
11
11
  License-File: LICENSE.txt
12
- Requires-Dist: numpy>=2.2.2
12
+ Requires-Dist: numpy>=2.2.4
13
13
  Requires-Dist: scipy>=1.0.0
14
14
  Requires-Dist: requests
15
15
  Requires-Dist: latextable
@@ -3570,7 +3570,7 @@ class ObjectiveFunction(object):
3570
3570
  def _chol_mat(self, correlationLength, br, Br_w, correlation):
3571
3571
  # if correlation = True correlation pos is randpos, if list get correct pos
3572
3572
 
3573
- print(self.rdm_grouped_fit, 'i think this causes the errror')
3573
+ #print(self.rdm_grouped_fit, 'i think this causes the errror')
3574
3574
 
3575
3575
  varnames = self.none_handler(self.grouped_rpm)+ self.none_handler(
3576
3576
  self.rdm_fit) + self.none_handler(self.rdm_cor_fit)
@@ -4704,6 +4704,27 @@ class ObjectiveFunction(object):
4704
4704
 
4705
4705
  return log_likelihood_value
4706
4706
 
4707
+ def _no_draws(self, draws, grouped_draws, model_nature):
4708
+ # Check if 'draws_hetro' exists and has the required attributes
4709
+ if 'draws_hetro' in model_nature:
4710
+ draws_hetro = model_nature.get('draws_hetro')
4711
+ try:
4712
+ # Check if the condition is met
4713
+ if draws_hetro.shape[1] == 0:
4714
+ return False
4715
+ else: return True
4716
+ except AttributeError:
4717
+ pass
4718
+ else:
4719
+ # If 'draws_hetro' does not exist, return False
4720
+ if draws is None and grouped_draws is None:
4721
+ return False
4722
+ else: return True
4723
+
4724
+ # Return True if none of the conditions for False are met
4725
+ return True
4726
+
4727
+
4707
4728
  def _loglik_gradient(self, betas, Xd, y, draws=None, Xf=None, Xr=None, batch_size=None, return_gradient=False,
4708
4729
  return_gradient_n=False, dispersion=0, test_set=0, return_EV=False, verbose=0, corr_list=None,
4709
4730
  zi_list=None, exog_infl=None, draws_grouped=None, Xgroup=None, model_nature=None, kwarg=None,
@@ -4733,8 +4754,7 @@ class ObjectiveFunction(object):
4733
4754
  penalty = self._penalty_betas(
4734
4755
  betas, dispersion, penalty, float(len(y) / 10.0))
4735
4756
  self.n_obs = len(y) # feeds into gradient
4736
- if draws is None and draws_grouped is None and (model_nature is None or
4737
- 'draws_hetro' not in model_nature or model_nature.get('draws_hetro').shape[1] == 0):
4757
+ if not self._no_draws(draws, draws_grouped, model_nature):
4738
4758
  #TODO do i shuffle the draws
4739
4759
  if type(Xd) == dict:
4740
4760
  N, Kf, P = 0, 0, 0
@@ -4962,6 +4982,8 @@ class ObjectiveFunction(object):
4962
4982
  np.matmul(chol_mat[:len(br), :len(br)], draws_)
4963
4983
  self.Br = Br.copy()
4964
4984
  else:
4985
+ if 'draws_hetro' in model_nature:
4986
+ self.naming_for_printing(betas, dispersion=dispersion, model_nature=model_nature)
4965
4987
  Br = br.reshape((N, 0, self.Ndraws))
4966
4988
  draws_ = np.zeros((N, 0, self.Ndraws))
4967
4989
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metacountregressor
3
- Version: 0.1.317
3
+ Version: 0.1.320
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
@@ -9,7 +9,7 @@ License: MIT
9
9
  Requires-Python: >=3.10
10
10
  Description-Content-Type: text/markdown
11
11
  License-File: LICENSE.txt
12
- Requires-Dist: numpy>=2.2.2
12
+ Requires-Dist: numpy>=2.2.4
13
13
  Requires-Dist: scipy>=1.0.0
14
14
  Requires-Dist: requests
15
15
  Requires-Dist: latextable
@@ -1,4 +1,4 @@
1
- numpy>=2.2.2
1
+ numpy>=2.2.4
2
2
  scipy>=1.0.0
3
3
  requests
4
4
  latextable
@@ -44,7 +44,7 @@ setuptools.setup(
44
44
  zip_safe=False,
45
45
  python_requires='>=3.10',
46
46
  install_requires=[
47
- 'numpy>=2.2.2',
47
+ 'numpy>=2.2.4',
48
48
  'scipy>=1.0.0',
49
49
  'requests',
50
50
  'latextable',
@@ -0,0 +1 @@
1
+ 0.1.320
@@ -1 +0,0 @@
1
- 0.1.317