metacountregressor 0.1.315__tar.gz → 0.1.317__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.315/metacountregressor.egg-info → metacountregressor-0.1.317}/PKG-INFO +1 -1
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/metaheuristics.py +10 -4
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/solution.py +22 -12
- {metacountregressor-0.1.315 → metacountregressor-0.1.317/metacountregressor.egg-info}/PKG-INFO +1 -1
- metacountregressor-0.1.317/version.txt +1 -0
- metacountregressor-0.1.315/version.txt +0 -1
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/LICENSE.txt +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/MANIFEST.in +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/README.md +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/README.rst +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/helperprocess.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/setup.cfg +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/setup.py +0 -0
- {metacountregressor-0.1.315 → metacountregressor-0.1.317}/tests/test.py +0 -0
{metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/metaheuristics.py
RENAMED
@@ -65,7 +65,7 @@ def _plot(x, y, z, xlabel=None, ylabel=None, zlabel=None, filename=None):
|
|
65
65
|
def dict_mean(dict_list,
|
66
66
|
ignore=None):
|
67
67
|
if ignore is None:
|
68
|
-
ignore = ['AIC', 'layout', 'fixed_fit', 'rdm_fit', 'rdm_cor_fit', 'zi_fit', 'simple', 'pvalues']
|
68
|
+
ignore = ['AIC', 'layout', 'fixed_fit', 'rdm_fit', 'rdm_cor_fit', 'zi_fit', 'simple', 'pvalues', "CAIC"]
|
69
69
|
mean_dict = {}
|
70
70
|
if ignore is None:
|
71
71
|
for key in dict_list[0].keys():
|
@@ -76,7 +76,13 @@ def dict_mean(dict_list,
|
|
76
76
|
for key in dict_list[0].keys():
|
77
77
|
if key in ignore:
|
78
78
|
continue
|
79
|
-
|
79
|
+
# Filter out dictionaries that don't have the key
|
80
|
+
filtered_values = [d[key] for d in dict_list if key in d]
|
81
|
+
|
82
|
+
if filtered_values: # Ensure there are values to compute the mean
|
83
|
+
mean_dict[key] = sum(filtered_values) / len(filtered_values)
|
84
|
+
else:
|
85
|
+
mean_dict[key] = None # Or handle missing data differently if needed
|
80
86
|
return mean_dict
|
81
87
|
|
82
88
|
|
@@ -1198,7 +1204,7 @@ class SimulatedAnnealing(object):
|
|
1198
1204
|
Temp3 = (Temp1 + Temp2) / (w_1 * Temp2 + w_2 * Temp1)
|
1199
1205
|
|
1200
1206
|
self.best_energy = slns[0]
|
1201
|
-
low_best =
|
1207
|
+
low_best = 1e5
|
1202
1208
|
for i, val in enumerate(fitness_list):
|
1203
1209
|
low = w_1 * fitness_list[i] + w_2 * fitness_list_2[i]
|
1204
1210
|
if low < low_best:
|
@@ -2359,7 +2365,7 @@ class Mutlithreaded_Meta(DifferentialEvolution, SimulatedAnnealing, HarmonySearc
|
|
2359
2365
|
Temp3 = (Temp1 + Temp2) / (w_1 * Temp2 + w_2 * Temp1)
|
2360
2366
|
|
2361
2367
|
self.best_energy = slns[0]
|
2362
|
-
low_best =
|
2368
|
+
low_best = 1e5
|
2363
2369
|
for i, val in enumerate(fitness_list):
|
2364
2370
|
low = w_1 * fitness_list[i] + w_2 * fitness_list_2[i]
|
2365
2371
|
if low < low_best:
|
@@ -123,7 +123,7 @@ class ObjectiveFunction(object):
|
|
123
123
|
"""
|
124
124
|
|
125
125
|
def __init__(self, x_data, y_data, **kwargs):
|
126
|
-
self.gbl_best =
|
126
|
+
self.gbl_best = 1e5
|
127
127
|
self.run_numerical_hessian = kwargs.get('r_nu_hess', False)
|
128
128
|
self.run_bootstrap = kwargs.get('run_bootstrap', False)
|
129
129
|
self.linear_regression = kwargs.get('linear_model', False)
|
@@ -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
|
|
@@ -1571,9 +1572,9 @@ class ObjectiveFunction(object):
|
|
1571
1572
|
eVy = eVy.ravel()
|
1572
1573
|
|
1573
1574
|
|
1574
|
-
eVy = np.nan_to_num(eVy, nan=
|
1575
|
-
eVy = np.clip(eVy, None,
|
1576
|
-
mae = np.nan_to_num(MAE(np.squeeze(y), np.squeeze(eVy)), nan=
|
1575
|
+
eVy = np.nan_to_num(eVy, nan=1E5, posinf=1E5)
|
1576
|
+
eVy = np.clip(eVy, None, 1E5)
|
1577
|
+
mae = np.nan_to_num(MAE(np.squeeze(y), np.squeeze(eVy)), nan=1e5, posinf=1e5)
|
1577
1578
|
|
1578
1579
|
mspe = np.nan_to_num(MSPE(np.squeeze(y), np.squeeze(eVy)), nan=100000, posinf=100000)
|
1579
1580
|
RMSE = np.sqrt(mspe)
|
@@ -4797,7 +4798,7 @@ class ObjectiveFunction(object):
|
|
4797
4798
|
penalty = self.custom_penalty(betas, penalty)
|
4798
4799
|
|
4799
4800
|
if not np.isreal(loglik):
|
4800
|
-
loglik = -
|
4801
|
+
loglik = - 1e5
|
4801
4802
|
|
4802
4803
|
output = (-loglik + penalty,)
|
4803
4804
|
if return_gradient:
|
@@ -5933,7 +5934,11 @@ class ObjectiveFunction(object):
|
|
5933
5934
|
"""
|
5934
5935
|
X, Xr, XG, XH = mod.get('X'), mod.get('Xr'), mod.get('XG'), mod.get('XH')
|
5935
5936
|
if XG is not None:
|
5936
|
-
|
5937
|
+
if XH is not None:
|
5938
|
+
return np.concatenate((X, XG, Xr, XH), axis=2)
|
5939
|
+
else:
|
5940
|
+
return np.concatenate((X, XG, Xr), axis=2)
|
5941
|
+
# return np.concatenate((X, XG, Xr, XH), axis=2)
|
5937
5942
|
elif XH is not None:
|
5938
5943
|
return np.concatenate((X, Xr, XH), axis=2)
|
5939
5944
|
else:
|
@@ -6287,11 +6292,14 @@ class ObjectiveFunction(object):
|
|
6287
6292
|
X_test, Xr_test, XG_test, XH_test = (
|
6288
6293
|
mod.get('X_test'), mod.get('Xr_test'), mod.get('XG_test'), mod.get('XH_test')
|
6289
6294
|
)
|
6290
|
-
if X_test is None
|
6295
|
+
if X_test is None and Xr_test is None:
|
6291
6296
|
return None
|
6292
6297
|
|
6293
6298
|
if XH_test is not None:
|
6294
|
-
|
6299
|
+
if XG_test is not None:
|
6300
|
+
return np.concatenate((X_test, XG_test, Xr_test, XH_test), axis=2)
|
6301
|
+
else:
|
6302
|
+
return np.concatenate((X_test, Xr_test, XH_test), axis=2)
|
6295
6303
|
elif XG_test is not None:
|
6296
6304
|
return np.concatenate((X_test, XG_test, Xr_test), axis=2)
|
6297
6305
|
else:
|
@@ -7638,6 +7646,8 @@ class ObjectiveFunction(object):
|
|
7638
7646
|
alpha_group_rdm = np.isin(select_data, data.get('group_rdm', [])).astype(int).tolist()
|
7639
7647
|
alpha_hetro = np.isin(select_data, [item.split(':')[0] for item in data.get('hetro_in_means', [])]).astype(
|
7640
7648
|
int).tolist()
|
7649
|
+
matching_names = [name for name in select_data if name in [item.split(':')[0] for item in data.get('hetro_in_means', [])]]
|
7650
|
+
self.hetro_fit = matching_names
|
7641
7651
|
for i in range(len(alpha_rdm)):
|
7642
7652
|
|
7643
7653
|
if alpha[i]:
|
@@ -7678,14 +7688,14 @@ class ObjectiveFunction(object):
|
|
7678
7688
|
# select_data = self._x_data.columns
|
7679
7689
|
|
7680
7690
|
select_data = self._characteristics_names
|
7681
|
-
alpha = np.
|
7682
|
-
alpha_rdm = np.
|
7691
|
+
alpha = np.isin(select_data, fix) * 1
|
7692
|
+
alpha_rdm = np.isin(select_data, rdm) * 1
|
7683
7693
|
alpha = alpha.tolist()
|
7684
7694
|
alpha_rdm = alpha_rdm.tolist()
|
7685
7695
|
|
7686
|
-
alpha_cor_rdm = np.
|
7696
|
+
alpha_cor_rdm = np.isin(select_data, cor_rdm) * 1
|
7687
7697
|
alpha_cor_rdm = alpha_cor_rdm.tolist()
|
7688
|
-
alpha_group_rdm = np.
|
7698
|
+
alpha_group_rdm = np.isin(select_data, group_rdm) * 1
|
7689
7699
|
alpha_group_rdm = alpha_group_rdm.tolist() #todo will this ever trigger
|
7690
7700
|
return alpha, alpha_rdm, alpha_cor_rdm
|
7691
7701
|
|
@@ -0,0 +1 @@
|
|
1
|
+
0.1.317
|
@@ -1 +0,0 @@
|
|
1
|
-
0.1.315
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/helperprocess.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor.egg-info/requires.txt
RENAMED
File without changes
|
{metacountregressor-0.1.315 → metacountregressor-0.1.317}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|