metacountregressor 0.1.122__py3-none-any.whl → 0.1.124__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 +26 -1
- metacountregressor/main.py +1 -1
- metacountregressor/setup.py +3 -2
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.124.dist-info}/METADATA +2 -1
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.124.dist-info}/RECORD +8 -8
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.124.dist-info}/LICENSE.txt +0 -0
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.124.dist-info}/WHEEL +0 -0
- {metacountregressor-0.1.122.dist-info → metacountregressor-0.1.124.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:
|
metacountregressor/setup.py
CHANGED
@@ -8,7 +8,7 @@ with codecs.open("README.rst", encoding='utf8') as fh:
|
|
8
8
|
setuptools.setup(name='metacountregressor',
|
9
9
|
version='0.1.63',
|
10
10
|
description='Extensions for a Python package for \
|
11
|
-
|
11
|
+
estimation of data count models.',
|
12
12
|
long_description=long_description,
|
13
13
|
long_description_content_type="text/x-rst",
|
14
14
|
url='https://github.com/zahern/CountDataEstimation',
|
@@ -20,5 +20,6 @@ setuptools.setup(name='metacountregressor',
|
|
20
20
|
python_requires='>=3.10',
|
21
21
|
install_requires=[
|
22
22
|
'numpy>=1.13.1',
|
23
|
-
'scipy>=1.0.0'
|
23
|
+
'scipy>=1.0.0',
|
24
|
+
'latextable'
|
24
25
|
])
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: metacountregressor
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.124
|
4
4
|
Summary: Extensions for a Python package for estimation of count models.
|
5
5
|
Home-page: https://github.com/zahern/CountDataEstimation
|
6
6
|
Author: Zeke Ahern
|
@@ -12,6 +12,7 @@ License-File: LICENSE.txt
|
|
12
12
|
Requires-Dist: numpy>=1.13.1
|
13
13
|
Requires-Dist: scipy>=1.0.0
|
14
14
|
Requires-Dist: requests
|
15
|
+
Requires-Dist: latextable
|
15
16
|
Dynamic: author
|
16
17
|
Dynamic: author-email
|
17
18
|
Dynamic: description
|
@@ -3,18 +3,18 @@ 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
|
11
11
|
metacountregressor/pareto_logger__plot.py,sha256=mEU2QN4wmsM7t39GJ_XhJ_jjsdl09JOmG0U2jICrAkI,30037
|
12
|
-
metacountregressor/setup.py,sha256=
|
12
|
+
metacountregressor/setup.py,sha256=5UcQCCLR8Fm5odA3MX78WwahavxFq4mVD6oq0IuQvAY,936
|
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.124.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
17
|
+
metacountregressor-0.1.124.dist-info/METADATA,sha256=8d5RG71XKfReAVDxLlVwVbDMJXZqnCEElx7AUwrY_2E,23441
|
18
|
+
metacountregressor-0.1.124.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
19
|
+
metacountregressor-0.1.124.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
|
20
|
+
metacountregressor-0.1.124.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|