metacountregressor 0.1.120__tar.gz → 0.1.122__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/PKG-INFO +2 -1
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/helperprocess.py +26 -1
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/main.py +1 -1
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/setup.py +3 -2
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/PKG-INFO +2 -1
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/requires.txt +1 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/setup.py +1 -1
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/LICENSE.txt +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/README.rst +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/metaheuristics.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/solution.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/setup.cfg +0 -0
- {metacountregressor-0.1.120 → metacountregressor-0.1.122}/tests/test.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: metacountregressor
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.122
|
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
|
{metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/helperprocess.py
RENAMED
@@ -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:
|
@@ -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:
|
@@ -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
|
])
|
{metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: metacountregressor
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.122
|
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
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/_device_cust.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/data_split_helper.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/metaheuristics.py
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor/pareto_logger__plot.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/not-zip-safe
RENAMED
File without changes
|
{metacountregressor-0.1.120 → metacountregressor-0.1.122}/metacountregressor.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|