metacountregressor 0.1.147__tar.gz → 0.1.149__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/PKG-INFO +1 -1
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/helperprocess.py +16 -7
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/PKG-INFO +1 -1
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/LICENSE.txt +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/README.rst +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/solution.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/setup.cfg +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/setup.py +0 -0
- {metacountregressor-0.1.147 → metacountregressor-0.1.149}/tests/test.py +0 -0
{metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/helperprocess.py
RENAMED
@@ -302,16 +302,25 @@ def transform_dataframe(df, config):
|
|
302
302
|
for column, settings in config.items():
|
303
303
|
if settings['type'] == 'bin':
|
304
304
|
# Apply binning
|
305
|
-
|
306
|
-
|
307
|
-
bins=settings['bins'],
|
308
|
-
labels=settings['labels'],
|
309
|
-
right=False,
|
310
|
-
duplicates='drop'
|
305
|
+
# Get unique bins (remove duplicates)
|
306
|
+
unique_bins = sorted(set(settings['bins']))
|
311
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
|
316
|
+
binned_d = pd.cut(
|
317
|
+
df[column],
|
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
|
312
321
|
)
|
313
322
|
# One-hot encode the binned column
|
314
|
-
binned_dummies = pd.get_dummies(
|
323
|
+
binned_dummies = pd.get_dummies(binned_d, prefix=settings['prefix'])
|
315
324
|
output_df = pd.concat([output_df, binned_dummies], axis=1)
|
316
325
|
|
317
326
|
elif settings['type'] == 'one-hot':
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/metaheuristics.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/requires.txt
RENAMED
File without changes
|
{metacountregressor-0.1.147 → metacountregressor-0.1.149}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|