metacountregressor 0.1.128__tar.gz → 0.1.129__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/PKG-INFO +1 -1
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/helperprocess.py +7 -1
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/PKG-INFO +1 -1
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/LICENSE.txt +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/README.rst +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/solution.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/setup.cfg +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/setup.py +0 -0
- {metacountregressor-0.1.128 → metacountregressor-0.1.129}/tests/test.py +0 -0
{metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/helperprocess.py
RENAMED
@@ -183,11 +183,13 @@ 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
|
+
mode_value = np.mode(series) # Get the most frequent value
|
187
|
+
series = pd.to_numeric(series, errors='coerce').fillna(mode_value)
|
186
188
|
low_threshold = np.quantile(series, 0.33)
|
187
189
|
high_threshold = np.quantile(series,0.66)
|
188
190
|
|
189
191
|
# Define the bins and labels
|
190
|
-
bins = [np.min(series) - 1, low_threshold, high_threshold, np.
|
192
|
+
bins = [np.min(series) - 1, low_threshold, high_threshold, np.max(series)]
|
191
193
|
labels = ['Low', 'Medium', 'High']
|
192
194
|
|
193
195
|
return {
|
@@ -238,6 +240,10 @@ def transform_dataframe(df, config):
|
|
238
240
|
|
239
241
|
# Helper function to guess column type and update `config`
|
240
242
|
def guess_column_type(column_name, series):
|
243
|
+
|
244
|
+
if series.empty:
|
245
|
+
raise ValueError(f"The column {column_name} contains no numeric data.")
|
246
|
+
|
241
247
|
if series.dtype == 'object' or series.dtype.name == 'category':
|
242
248
|
# If the column is categorical (e.g., strings), assume one-hot encoding
|
243
249
|
return {'type': 'one-hot', 'prefix': column_name}
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/metaheuristics.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/requires.txt
RENAMED
File without changes
|
{metacountregressor-0.1.128 → metacountregressor-0.1.129}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|