metacountregressor 0.1.130__py3-none-any.whl → 0.1.132__py3-none-any.whl
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/helperprocess.py +8 -1
- metacountregressor/main.py +1 -0
- {metacountregressor-0.1.130.dist-info → metacountregressor-0.1.132.dist-info}/METADATA +1 -1
- {metacountregressor-0.1.130.dist-info → metacountregressor-0.1.132.dist-info}/RECORD +7 -7
- {metacountregressor-0.1.130.dist-info → metacountregressor-0.1.132.dist-info}/LICENSE.txt +0 -0
- {metacountregressor-0.1.130.dist-info → metacountregressor-0.1.132.dist-info}/WHEEL +0 -0
- {metacountregressor-0.1.130.dist-info → metacountregressor-0.1.132.dist-info}/top_level.txt +0 -0
@@ -183,11 +183,14 @@ config = {
|
|
183
183
|
# Function to guess Low, Medium, High ranges
|
184
184
|
def guess_low_medium_high(column_name, series):
|
185
185
|
# Compute the tertiles (33rd and 66th percentiles)
|
186
|
+
print('why')
|
187
|
+
mode_value = np.mode(series) # Get the most frequent value
|
188
|
+
series = pd.to_numeric(series, errors='coerce').fillna(mode_value)
|
186
189
|
low_threshold = np.quantile(series, 0.33)
|
187
190
|
high_threshold = np.quantile(series,0.66)
|
188
191
|
|
189
192
|
# Define the bins and labels
|
190
|
-
bins = [np.min(series) - 1, low_threshold, high_threshold, np.
|
193
|
+
bins = [np.min(series) - 1, low_threshold, high_threshold, np.max(series)]
|
191
194
|
labels = ['Low', 'Medium', 'High']
|
192
195
|
|
193
196
|
return {
|
@@ -238,6 +241,10 @@ def transform_dataframe(df, config):
|
|
238
241
|
|
239
242
|
# Helper function to guess column type and update `config`
|
240
243
|
def guess_column_type(column_name, series):
|
244
|
+
|
245
|
+
if series.empty:
|
246
|
+
raise ValueError(f"The column {column_name} contains no numeric data.")
|
247
|
+
|
241
248
|
if series.dtype == 'object' or series.dtype.name == 'category':
|
242
249
|
# If the column is categorical (e.g., strings), assume one-hot encoding
|
243
250
|
return {'type': 'one-hot', 'prefix': column_name}
|
metacountregressor/main.py
CHANGED
@@ -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=A_DMW2uQdEpMvjI40gsGcfwDw5TD5wbET0pghbsLAAQ,17316
|
7
|
+
metacountregressor/main.py,sha256=_MVROd1y8qIhvGnG1iFzHw4_2e6-8INjXHDnYlDSLy8,22714
|
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=5UcQCCLR8Fm5odA3MX78WwahavxFq4mVD6oq0IuQvAY,9
|
|
13
13
|
metacountregressor/single_objective_finder.py,sha256=jVG7GJBqzSP4_riYr-kMMKy_LE3SlGmKMunNhHYxgRg,8011
|
14
14
|
metacountregressor/solution.py,sha256=6qAtCSKNvmrCpIpBCzp2Zt8wWKZBHRQtTriyiMHUo54,277519
|
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.132.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
17
|
+
metacountregressor-0.1.132.dist-info/METADATA,sha256=UfcorXlvrb1fAVeFjcInPbvt1FvgWNG8HorEMSYaJec,23434
|
18
|
+
metacountregressor-0.1.132.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
19
|
+
metacountregressor-0.1.132.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
|
20
|
+
metacountregressor-0.1.132.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|