metacountregressor 0.1.317__tar.gz → 0.1.318__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.318}/PKG-INFO +1 -1
  2. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/solution.py +22 -2
  3. {metacountregressor-0.1.317 → metacountregressor-0.1.318/metacountregressor.egg-info}/PKG-INFO +1 -1
  4. metacountregressor-0.1.318/version.txt +1 -0
  5. metacountregressor-0.1.317/version.txt +0 -1
  6. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/LICENSE.txt +0 -0
  7. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/MANIFEST.in +0 -0
  8. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/README.md +0 -0
  9. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/README.rst +0 -0
  10. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/__init__.py +0 -0
  11. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/_device_cust.py +0 -0
  12. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/app_main.py +0 -0
  13. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/data_split_helper.py +0 -0
  14. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/halton.py +0 -0
  15. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/helperprocess.py +0 -0
  16. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/main.py +0 -0
  17. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/main_old.py +0 -0
  18. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/metaheuristics.py +0 -0
  19. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/pareto_file.py +0 -0
  20. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/pareto_logger__plot.py +0 -0
  21. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/setup.py +0 -0
  22. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/single_objective_finder.py +0 -0
  23. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor/test_generated_paper2.py +0 -0
  24. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor.egg-info/SOURCES.txt +0 -0
  25. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor.egg-info/dependency_links.txt +0 -0
  26. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor.egg-info/not-zip-safe +0 -0
  27. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor.egg-info/requires.txt +0 -0
  28. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/metacountregressor.egg-info/top_level.txt +0 -0
  29. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/setup.cfg +0 -0
  30. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/setup.py +0 -0
  31. {metacountregressor-0.1.317 → metacountregressor-0.1.318}/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.318
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
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: metacountregressor
3
- Version: 0.1.317
3
+ Version: 0.1.318
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
@@ -0,0 +1 @@
1
+ 0.1.318
@@ -1 +0,0 @@
1
- 0.1.317