metacountregressor 0.1.316__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.
- {metacountregressor-0.1.316/metacountregressor.egg-info → metacountregressor-0.1.318}/PKG-INFO +1 -1
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/solution.py +39 -9
- {metacountregressor-0.1.316 → metacountregressor-0.1.318/metacountregressor.egg-info}/PKG-INFO +1 -1
- metacountregressor-0.1.318/version.txt +1 -0
- metacountregressor-0.1.316/version.txt +0 -1
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/LICENSE.txt +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/MANIFEST.in +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/README.md +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/README.rst +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/helperprocess.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/setup.cfg +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/setup.py +0 -0
- {metacountregressor-0.1.316 → metacountregressor-0.1.318}/tests/test.py +0 -0
@@ -611,6 +611,7 @@ class ObjectiveFunction(object):
|
|
611
611
|
|
612
612
|
modified_fit = self.modify_initial_fit(manual_fit) # Modify the initial fit based on manual_fit
|
613
613
|
self.significant = 1
|
614
|
+
#self.define_selfs_fixed_rdm_cor(modified_fit)
|
614
615
|
self.makeRegression(modified_fit) # Perform regression with the modified fit
|
615
616
|
|
616
617
|
|
@@ -4703,6 +4704,27 @@ class ObjectiveFunction(object):
|
|
4703
4704
|
|
4704
4705
|
return log_likelihood_value
|
4705
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
|
+
|
4706
4728
|
def _loglik_gradient(self, betas, Xd, y, draws=None, Xf=None, Xr=None, batch_size=None, return_gradient=False,
|
4707
4729
|
return_gradient_n=False, dispersion=0, test_set=0, return_EV=False, verbose=0, corr_list=None,
|
4708
4730
|
zi_list=None, exog_infl=None, draws_grouped=None, Xgroup=None, model_nature=None, kwarg=None,
|
@@ -4732,8 +4754,7 @@ class ObjectiveFunction(object):
|
|
4732
4754
|
penalty = self._penalty_betas(
|
4733
4755
|
betas, dispersion, penalty, float(len(y) / 10.0))
|
4734
4756
|
self.n_obs = len(y) # feeds into gradient
|
4735
|
-
if draws
|
4736
|
-
'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):
|
4737
4758
|
#TODO do i shuffle the draws
|
4738
4759
|
if type(Xd) == dict:
|
4739
4760
|
N, Kf, P = 0, 0, 0
|
@@ -5933,7 +5954,11 @@ class ObjectiveFunction(object):
|
|
5933
5954
|
"""
|
5934
5955
|
X, Xr, XG, XH = mod.get('X'), mod.get('Xr'), mod.get('XG'), mod.get('XH')
|
5935
5956
|
if XG is not None:
|
5936
|
-
|
5957
|
+
if XH is not None:
|
5958
|
+
return np.concatenate((X, XG, Xr, XH), axis=2)
|
5959
|
+
else:
|
5960
|
+
return np.concatenate((X, XG, Xr), axis=2)
|
5961
|
+
# return np.concatenate((X, XG, Xr, XH), axis=2)
|
5937
5962
|
elif XH is not None:
|
5938
5963
|
return np.concatenate((X, Xr, XH), axis=2)
|
5939
5964
|
else:
|
@@ -6287,11 +6312,14 @@ class ObjectiveFunction(object):
|
|
6287
6312
|
X_test, Xr_test, XG_test, XH_test = (
|
6288
6313
|
mod.get('X_test'), mod.get('Xr_test'), mod.get('XG_test'), mod.get('XH_test')
|
6289
6314
|
)
|
6290
|
-
if X_test is None
|
6315
|
+
if X_test is None and Xr_test is None:
|
6291
6316
|
return None
|
6292
6317
|
|
6293
6318
|
if XH_test is not None:
|
6294
|
-
|
6319
|
+
if XG_test is not None:
|
6320
|
+
return np.concatenate((X_test, XG_test, Xr_test, XH_test), axis=2)
|
6321
|
+
else:
|
6322
|
+
return np.concatenate((X_test, Xr_test, XH_test), axis=2)
|
6295
6323
|
elif XG_test is not None:
|
6296
6324
|
return np.concatenate((X_test, XG_test, Xr_test), axis=2)
|
6297
6325
|
else:
|
@@ -7638,6 +7666,8 @@ class ObjectiveFunction(object):
|
|
7638
7666
|
alpha_group_rdm = np.isin(select_data, data.get('group_rdm', [])).astype(int).tolist()
|
7639
7667
|
alpha_hetro = np.isin(select_data, [item.split(':')[0] for item in data.get('hetro_in_means', [])]).astype(
|
7640
7668
|
int).tolist()
|
7669
|
+
matching_names = [name for name in select_data if name in [item.split(':')[0] for item in data.get('hetro_in_means', [])]]
|
7670
|
+
self.hetro_fit = matching_names
|
7641
7671
|
for i in range(len(alpha_rdm)):
|
7642
7672
|
|
7643
7673
|
if alpha[i]:
|
@@ -7678,14 +7708,14 @@ class ObjectiveFunction(object):
|
|
7678
7708
|
# select_data = self._x_data.columns
|
7679
7709
|
|
7680
7710
|
select_data = self._characteristics_names
|
7681
|
-
alpha = np.
|
7682
|
-
alpha_rdm = np.
|
7711
|
+
alpha = np.isin(select_data, fix) * 1
|
7712
|
+
alpha_rdm = np.isin(select_data, rdm) * 1
|
7683
7713
|
alpha = alpha.tolist()
|
7684
7714
|
alpha_rdm = alpha_rdm.tolist()
|
7685
7715
|
|
7686
|
-
alpha_cor_rdm = np.
|
7716
|
+
alpha_cor_rdm = np.isin(select_data, cor_rdm) * 1
|
7687
7717
|
alpha_cor_rdm = alpha_cor_rdm.tolist()
|
7688
|
-
alpha_group_rdm = np.
|
7718
|
+
alpha_group_rdm = np.isin(select_data, group_rdm) * 1
|
7689
7719
|
alpha_group_rdm = alpha_group_rdm.tolist() #todo will this ever trigger
|
7690
7720
|
return alpha, alpha_rdm, alpha_cor_rdm
|
7691
7721
|
|
@@ -0,0 +1 @@
|
|
1
|
+
0.1.318
|
@@ -1 +0,0 @@
|
|
1
|
-
0.1.316
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/helperprocess.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/metaheuristics.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor.egg-info/requires.txt
RENAMED
File without changes
|
{metacountregressor-0.1.316 → metacountregressor-0.1.318}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|