metacountregressor 0.1.319__py3-none-any.whl → 0.1.320__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.
- metacountregressor/solution.py +22 -2
- {metacountregressor-0.1.319.dist-info → metacountregressor-0.1.320.dist-info}/METADATA +1 -1
- {metacountregressor-0.1.319.dist-info → metacountregressor-0.1.320.dist-info}/RECORD +6 -6
- {metacountregressor-0.1.319.dist-info → metacountregressor-0.1.320.dist-info}/WHEEL +0 -0
- {metacountregressor-0.1.319.dist-info → metacountregressor-0.1.320.dist-info}/licenses/LICENSE.txt +0 -0
- {metacountregressor-0.1.319.dist-info → metacountregressor-0.1.320.dist-info}/top_level.txt +0 -0
metacountregressor/solution.py
CHANGED
@@ -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
|
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
|
@@ -11,10 +11,10 @@ metacountregressor/pareto_file.py,sha256=whySaoPAUWYjyI8zo0hwAOa3rFk6SIUlHSpqZiL
|
|
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=
|
14
|
+
metacountregressor/solution.py,sha256=X-MDt7273QxzBiWyfUR_X-e3zYS1f5yWqpc2o3toL5A,323033
|
15
15
|
metacountregressor/test_generated_paper2.py,sha256=pwOoRzl1jJIIOUAAvbkT6HmmTQ81mwpsshn9SLdKOg8,3927
|
16
|
-
metacountregressor-0.1.
|
17
|
-
metacountregressor-0.1.
|
18
|
-
metacountregressor-0.1.
|
19
|
-
metacountregressor-0.1.
|
20
|
-
metacountregressor-0.1.
|
16
|
+
metacountregressor-0.1.320.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
17
|
+
metacountregressor-0.1.320.dist-info/METADATA,sha256=whZHogckomJwc0pJ1YUbP03PmRXBP3heEb0y8cr3xL4,23581
|
18
|
+
metacountregressor-0.1.320.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
19
|
+
metacountregressor-0.1.320.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
|
20
|
+
metacountregressor-0.1.320.dist-info/RECORD,,
|
File without changes
|
{metacountregressor-0.1.319.dist-info → metacountregressor-0.1.320.dist-info}/licenses/LICENSE.txt
RENAMED
File without changes
|
File without changes
|