metacountregressor 0.1.144__tar.gz → 0.1.146__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/PKG-INFO +1 -1
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/helperprocess.py +7 -6
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/PKG-INFO +1 -1
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/LICENSE.txt +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/README.rst +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/solution.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/setup.cfg +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/setup.py +0 -0
- {metacountregressor-0.1.144 → metacountregressor-0.1.146}/tests/test.py +0 -0
{metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/helperprocess.py
RENAMED
@@ -302,11 +302,12 @@ 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
|
-
df[column],
|
305
|
+
pd.cut(
|
306
|
+
binned = df[column],
|
307
307
|
bins=settings['bins'],
|
308
308
|
labels=settings['labels'],
|
309
309
|
right=False,
|
310
|
+
duplicates='drop'
|
310
311
|
|
311
312
|
)
|
312
313
|
# One-hot encode the binned column
|
@@ -390,7 +391,7 @@ def PCA_code(X, n_components=5):
|
|
390
391
|
|
391
392
|
|
392
393
|
def interactions(df, keep=None, drop_this_perc=0.6, interact = False):
|
393
|
-
|
394
|
+
full_columns = df.columns
|
394
395
|
if interact:
|
395
396
|
interactions_list = []
|
396
397
|
for i, var_i in enumerate(df.columns):
|
@@ -419,11 +420,11 @@ def interactions(df, keep=None, drop_this_perc=0.6, interact = False):
|
|
419
420
|
# Remove `keep` columns from the correlation matrix
|
420
421
|
if keep is not None:
|
421
422
|
missing_columns = [col for col in keep if col not in df.columns]
|
422
|
-
|
423
|
+
|
423
424
|
if missing_columns:
|
424
425
|
print(f"The following columns are not in the DataFrame and will be ignored: {missing_columns}")
|
425
426
|
keep = [col for col in keep if col not in df.columns]
|
426
|
-
df_corr = df.drop(columns=keep, errors='ignore') # Exclude `keep` columns
|
427
|
+
df_corr = df.drop(columns=keep, errors='ignore', inplace=False) # Exclude `keep` columns
|
427
428
|
else:
|
428
429
|
df_corr = df
|
429
430
|
|
@@ -438,7 +439,7 @@ def interactions(df, keep=None, drop_this_perc=0.6, interact = False):
|
|
438
439
|
|
439
440
|
# Ensure `keep` columns are not dropped
|
440
441
|
if keep is not None:
|
441
|
-
to_drop = [column for column in to_drop if column not in
|
442
|
+
to_drop = [column for column in to_drop if column not in full_columns]
|
442
443
|
|
443
444
|
# Drop the identified features
|
444
445
|
df.drop(to_drop, axis=1, inplace=True)
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/metaheuristics.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/requires.txt
RENAMED
File without changes
|
{metacountregressor-0.1.144 → metacountregressor-0.1.146}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|