metacountregressor 0.1.346__tar.gz → 0.1.348__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.346/metacountregressor.egg-info → metacountregressor-0.1.348}/PKG-INFO +1 -1
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/solution.py +24 -7
- {metacountregressor-0.1.346 → metacountregressor-0.1.348/metacountregressor.egg-info}/PKG-INFO +1 -1
- metacountregressor-0.1.348/version.txt +1 -0
- metacountregressor-0.1.346/version.txt +0 -1
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/LICENSE.txt +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/MANIFEST.in +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/README.md +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/README.rst +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/helperprocess.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/setup.cfg +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/setup.py +0 -0
- {metacountregressor-0.1.346 → metacountregressor-0.1.348}/tests/test.py +0 -0
@@ -1737,7 +1737,7 @@ class ObjectiveFunction(object):
|
|
1737
1737
|
|
1738
1738
|
b = self.get_param_num(dispersion=vector[-1])
|
1739
1739
|
# b = sum(prmVect) + self.is_dispersion(vector[-1])
|
1740
|
-
max_loops =
|
1740
|
+
max_loops = 10 # Maximum number of loops
|
1741
1741
|
counter = 0 # Counter variable to keep track of the number of loops
|
1742
1742
|
|
1743
1743
|
|
@@ -1793,23 +1793,40 @@ class ObjectiveFunction(object):
|
|
1793
1793
|
|
1794
1794
|
counter = 0
|
1795
1795
|
while b < self._min_characteristics and counter < max_loops:
|
1796
|
-
|
1796
|
+
counter += 1
|
1797
1797
|
weights = [1 if x == 0 else 0 for x in only_ints_vals]
|
1798
1798
|
get_rdm_i = random.choices(only_ints, weights=weights)[0]
|
1799
1799
|
|
1800
|
-
#
|
1800
|
+
# Safeguard: Check if only one valid value exists to handle the "stuck" case
|
1801
|
+
if len(only_ints_vals) == 1 and only_ints_vals[0] == 0:
|
1802
|
+
print("Breaking out: only one valid value exists and it is 0.")
|
1803
|
+
break
|
1804
|
+
|
1801
1805
|
if vector[get_rdm_i] == 0:
|
1806
|
+
max_inner_loops = 100 # Limit for the inner loop
|
1807
|
+
inner_counter = 0
|
1802
1808
|
while new_j == 0:
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1809
|
+
inner_counter += 1
|
1810
|
+
if inner_counter > max_inner_loops:
|
1811
|
+
print("Breaking out of inner loop: exceeded maximum iterations.")
|
1812
|
+
break
|
1813
|
+
|
1814
|
+
get_rdm_j = random.randint(0, self.get_num_discrete_values(get_rdm_i) - 1)
|
1806
1815
|
new_j = self.get_value(get_rdm_i, get_rdm_j)
|
1816
|
+
|
1817
|
+
# If the inner loop exited early, check and continue
|
1818
|
+
if new_j == 0:
|
1819
|
+
print("Inner loop exited without finding a valid value.")
|
1820
|
+
break
|
1821
|
+
|
1822
|
+
# Assign the value after successfully exiting the inner loop
|
1807
1823
|
vector[get_rdm_i] = new_j
|
1808
1824
|
prmVect[get_rdm_i] = new_j
|
1809
1825
|
|
1810
1826
|
b += new_j
|
1811
1827
|
new_j = 0
|
1812
1828
|
|
1829
|
+
|
1813
1830
|
if hasattr(self, 'forced_variables'):
|
1814
1831
|
self.force_inclusion(vector)
|
1815
1832
|
|
@@ -2477,7 +2494,7 @@ class ObjectiveFunction(object):
|
|
2477
2494
|
layout = vector.copy()
|
2478
2495
|
|
2479
2496
|
while max_trial <= max_routine and trial_run == 1: # and max_trial <= 200:
|
2480
|
-
|
2497
|
+
|
2481
2498
|
obj_1, model_mod = self.makeRegression(model_nature, layout=layout, **a)
|
2482
2499
|
|
2483
2500
|
if obj_best is None:
|
@@ -0,0 +1 @@
|
|
1
|
+
0.1.348
|
@@ -1 +0,0 @@
|
|
1
|
-
0.1.346
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/helperprocess.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/metaheuristics.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor.egg-info/requires.txt
RENAMED
File without changes
|
{metacountregressor-0.1.346 → metacountregressor-0.1.348}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|