metacountregressor 0.1.122__py3-none-any.whl → 0.1.123__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- metacountregressor/helperprocess.py +26 -1
- metacountregressor/main.py +1 -1
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.123.dist-info}/METADATA +1 -1
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.123.dist-info}/RECORD +7 -7
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.123.dist-info}/LICENSE.txt +0 -0
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.123.dist-info}/WHEEL +0 -0
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.123.dist-info}/top_level.txt +0 -0
@@ -2,7 +2,7 @@ import numpy as np
|
|
2
2
|
import pandas as pd
|
3
3
|
import csv
|
4
4
|
import matplotlib.pyplot as plt
|
5
|
-
|
5
|
+
from sklearn.preprocessing import StandardScaler
|
6
6
|
|
7
7
|
plt.style.use('https://github.com/dhaitz/matplotlib-stylesheets/raw/master/pitayasmoothie-dark.mplstyle')
|
8
8
|
|
@@ -219,6 +219,31 @@ def transform_dataframe(df, config):
|
|
219
219
|
|
220
220
|
return output_df
|
221
221
|
|
222
|
+
# Helper function to guess column type and update `config`
|
223
|
+
def guess_column_type(column_name, series):
|
224
|
+
if series.dtype == 'object' or series.dtype.name == 'category':
|
225
|
+
# If the column is categorical (e.g., strings), assume one-hot encoding
|
226
|
+
return {'type': 'one-hot', 'prefix': column_name}
|
227
|
+
elif pd.api.types.is_numeric_dtype(series):
|
228
|
+
unique_values = series.nunique()
|
229
|
+
if unique_values < 10:
|
230
|
+
# If there are few unique values, assume binning with default bins
|
231
|
+
min_val, max_val = series.min(), series.max()
|
232
|
+
bins = np.linspace(min_val, max_val, num=unique_values + 1)
|
233
|
+
labels = [f'Bin_{i}' for i in range(1, len(bins))]
|
234
|
+
return {'type': 'bin', 'bins': bins, 'labels': labels, 'prefix': f'{column_name}_Binned'}
|
235
|
+
else:
|
236
|
+
# # Otherwise, assume continuous data with normalization
|
237
|
+
# Otherwise, fallback to continuous standardization
|
238
|
+
return {
|
239
|
+
'type': 'continuous',
|
240
|
+
'apply_func': (lambda x: (x - series.mean()) / series.std()) # Z-Score Standardization
|
241
|
+
}
|
242
|
+
else:
|
243
|
+
# Default fallback (leave the column unchanged)
|
244
|
+
return {'type': 'none'}
|
245
|
+
|
246
|
+
|
222
247
|
|
223
248
|
def as_wide_factor(x_df, yes=1, min_factor=2, max_factor=8, keep_original=0, exclude=[]):
|
224
249
|
if not yes:
|
metacountregressor/main.py
CHANGED
@@ -389,7 +389,7 @@ def main(args, **kwargs):
|
|
389
389
|
print('test') #FIXME
|
390
390
|
else:
|
391
391
|
print('PROCESS THE PACKAGE ARGUMENTS SIMULIAR TO HOW ONE WOULD DEFINE THE ENVIRONMENT')
|
392
|
-
data_info =
|
392
|
+
data_info =process_package_arguments()
|
393
393
|
|
394
394
|
|
395
395
|
if args['Keep_Fit'] == str(2) or args['Keep_Fit'] == 2:
|
@@ -3,8 +3,8 @@ metacountregressor/_device_cust.py,sha256=759fnKmTYccJm4Lpi9_1reurh6OB9d6q9soPR0
|
|
3
3
|
metacountregressor/app_main.py,sha256=vY3GczTbGbBRalbzMkl_9jVW7RMgEOc6z2Dr1IZJv9c,10014
|
4
4
|
metacountregressor/data_split_helper.py,sha256=M2fIMdIO8znUaYhx5wlacRyNWdQjNYu1z1wkE-kFUYU,3373
|
5
5
|
metacountregressor/halton.py,sha256=jhovA45UBoZYU9g-hl6Lb2sBIx_ZBTNdPrpgkzR9fng,9463
|
6
|
-
metacountregressor/helperprocess.py,sha256=
|
7
|
-
metacountregressor/main.py,sha256=
|
6
|
+
metacountregressor/helperprocess.py,sha256=4aSoyKP1GfzjwCzZ_dXlTbokOiMt_8sbzB6_tu0GPDg,16290
|
7
|
+
metacountregressor/main.py,sha256=A3XGwbwhhKVgMxnEgbAmMpgYaWkS8Rk30-cYs3FxvEk,22713
|
8
8
|
metacountregressor/main_old.py,sha256=eTS4ygq27MnU-dZ_j983Ucb-D5XfbVF8OJQK2hVVLZc,24123
|
9
9
|
metacountregressor/metaheuristics.py,sha256=Kkx1Jfox6NBlm5zVrI26Vc_NI7NFQSS9dinrZU9SpV8,105871
|
10
10
|
metacountregressor/pareto_file.py,sha256=whySaoPAUWYjyI8zo0hwAOa3rFk6SIUlHSpqZiLur0k,23096
|
@@ -13,8 +13,8 @@ metacountregressor/setup.py,sha256=8w6IqX0tJsbYrOI1BJLIJCIvOnunKli5I9fsF5PhHv4,9
|
|
13
13
|
metacountregressor/single_objective_finder.py,sha256=jVG7GJBqzSP4_riYr-kMMKy_LE3SlGmKMunNhHYxgRg,8011
|
14
14
|
metacountregressor/solution.py,sha256=OJqB00cvGMLFei6RsjphPamOdLm3EWOOzK7k-uVbvFY,277671
|
15
15
|
metacountregressor/test_generated_paper2.py,sha256=pwOoRzl1jJIIOUAAvbkT6HmmTQ81mwpsshn9SLdKOg8,3927
|
16
|
-
metacountregressor-0.1.
|
17
|
-
metacountregressor-0.1.
|
18
|
-
metacountregressor-0.1.
|
19
|
-
metacountregressor-0.1.
|
20
|
-
metacountregressor-0.1.
|
16
|
+
metacountregressor-0.1.123.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
17
|
+
metacountregressor-0.1.123.dist-info/METADATA,sha256=e4jQ9vtFxhHtA98q1Vd8PJ9gJiIz91iSUKgGPt78kg8,23415
|
18
|
+
metacountregressor-0.1.123.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
19
|
+
metacountregressor-0.1.123.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
|
20
|
+
metacountregressor-0.1.123.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|