metacountregressor 0.1.148__tar.gz → 0.1.150__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.148 → metacountregressor-0.1.150}/PKG-INFO +1 -1
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/helperprocess.py +14 -3
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/solution.py +9 -6
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/PKG-INFO +1 -1
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/LICENSE.txt +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/README.rst +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/setup.cfg +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/setup.py +0 -0
- {metacountregressor-0.1.148 → metacountregressor-0.1.150}/tests/test.py +0 -0
{metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/helperprocess.py
RENAMED
|
@@ -302,11 +302,22 @@ def transform_dataframe(df, config):
|
|
|
302
302
|
for column, settings in config.items():
|
|
303
303
|
if settings['type'] == 'bin':
|
|
304
304
|
# Apply binning
|
|
305
|
+
# Get unique bins (remove duplicates)
|
|
306
|
+
unique_bins = sorted(set(settings['bins']))
|
|
307
|
+
|
|
308
|
+
# Adjust labels if necessary
|
|
309
|
+
if len(unique_bins) - 1 != len(settings['labels']):
|
|
310
|
+
print(f"Adjusting labels to match bins: {len(unique_bins) - 1} bins detected.")
|
|
311
|
+
labels = [f'Bin {i+1}' for i in range(len(unique_bins) - 1)]
|
|
312
|
+
else:
|
|
313
|
+
labels = settings['labels']
|
|
314
|
+
|
|
315
|
+
# Perform the binning
|
|
305
316
|
binned_d = pd.cut(
|
|
306
317
|
df[column],
|
|
307
|
-
bins=
|
|
308
|
-
labels=
|
|
309
|
-
right=False
|
|
318
|
+
bins=unique_bins, # Deduplicated bins
|
|
319
|
+
labels=labels, # Adjusted or original labels
|
|
320
|
+
right=False # Adjust based on whether to include the right edge
|
|
310
321
|
)
|
|
311
322
|
# One-hot encode the binned column
|
|
312
323
|
binned_dummies = pd.get_dummies(binned_d, prefix=settings['prefix'])
|
|
@@ -829,15 +829,18 @@ class ObjectiveFunction(object):
|
|
|
829
829
|
def rename_distro(self, distro):
|
|
830
830
|
# Mapping dictionary
|
|
831
831
|
mapping = {
|
|
832
|
-
'
|
|
833
|
-
'
|
|
834
|
-
'
|
|
835
|
-
'
|
|
836
|
-
'
|
|
832
|
+
'normal': ['normal', 'n', 'Normal'],
|
|
833
|
+
'triangular': ['triangular', 't', 'Triangular'],
|
|
834
|
+
'uniform': ['uniform', 'u', 'Uniform'],
|
|
835
|
+
'ln_normal': ['ln_normal', 'ln_n', 'Ln_Normal'],
|
|
836
|
+
'tn_normal': ['tn_normal', 'tn_n', 'trunc_normal']
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
# Use list comprehension with the mapping
|
|
840
|
-
|
|
840
|
+
reversed_mapping = {value: key for key, values in mapping.items() for value in values}
|
|
841
|
+
|
|
842
|
+
# Use the reversed mapping to find the corresponding key
|
|
843
|
+
new_distro = [reversed_mapping.get(i, i) for i in distro]
|
|
841
844
|
return new_distro
|
|
842
845
|
|
|
843
846
|
def define_distributions_analyst(self, extra = None):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/_device_cust.py
RENAMED
|
File without changes
|
|
File without changes
|
{metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/data_split_helper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/metaheuristics.py
RENAMED
|
File without changes
|
|
File without changes
|
{metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor/pareto_logger__plot.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/requires.txt
RENAMED
|
File without changes
|
{metacountregressor-0.1.148 → metacountregressor-0.1.150}/metacountregressor.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|