metacountregressor 0.1.121__tar.gz → 0.1.123__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/PKG-INFO +3 -2
  2. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/helperprocess.py +23 -5
  3. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/setup.py +3 -2
  4. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/solution.py +1 -2
  5. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor.egg-info/PKG-INFO +3 -2
  6. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor.egg-info/requires.txt +1 -0
  7. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/setup.py +3 -2
  8. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/LICENSE.txt +0 -0
  9. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/README.rst +0 -0
  10. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/__init__.py +0 -0
  11. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/_device_cust.py +0 -0
  12. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/app_main.py +0 -0
  13. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/data_split_helper.py +0 -0
  14. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/halton.py +0 -0
  15. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/main.py +0 -0
  16. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/main_old.py +0 -0
  17. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/metaheuristics.py +0 -0
  18. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/pareto_file.py +0 -0
  19. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/pareto_logger__plot.py +0 -0
  20. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/single_objective_finder.py +0 -0
  21. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor/test_generated_paper2.py +0 -0
  22. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor.egg-info/SOURCES.txt +0 -0
  23. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor.egg-info/dependency_links.txt +0 -0
  24. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor.egg-info/not-zip-safe +0 -0
  25. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/metacountregressor.egg-info/top_level.txt +0 -0
  26. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/setup.cfg +0 -0
  27. {metacountregressor-0.1.121 → metacountregressor-0.1.123}/tests/test.py +0 -0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: metacountregressor
3
- Version: 0.1.121
3
+ Version: 0.1.123
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
7
- Author-email: zeke.ahern@hdr.qut.edu.au
7
+ Author-email: z.ahern@qut.edu.au
8
8
  License: QUT
9
9
  Requires-Python: >=3.10
10
10
  Description-Content-Type: text/markdown
@@ -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
@@ -180,6 +180,23 @@ config = {
180
180
  '''
181
181
 
182
182
 
183
+ # Function to guess Low, Medium, High ranges
184
+ def guess_low_medium_high(column_name, series):
185
+ # Compute the tertiles (33rd and 66th percentiles)
186
+ low_threshold = series.quantile(0.33)
187
+ high_threshold = series.quantile(0.66)
188
+
189
+ # Define the bins and labels
190
+ bins = [series.min() - 1, low_threshold, high_threshold, series.max()]
191
+ labels = ['Low', 'Medium', 'High']
192
+
193
+ return {
194
+ 'type': 'bin',
195
+ 'bins': bins,
196
+ 'labels': labels,
197
+ 'prefix': f'{column_name}_Binned'
198
+ }
199
+
183
200
  def transform_dataframe(df, config):
184
201
  output_df = pd.DataFrame()
185
202
 
@@ -226,12 +243,13 @@ def guess_column_type(column_name, series):
226
243
  return {'type': 'one-hot', 'prefix': column_name}
227
244
  elif pd.api.types.is_numeric_dtype(series):
228
245
  unique_values = series.nunique()
229
- if unique_values < 10:
246
+ if unique_values < 5:
247
+ return {'type': 'one-hot', 'prefix': column_name}
248
+
249
+
250
+ elif series.range() > 20:
230
251
  # 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'}
252
+ guess_low_medium_high(column_name,series)
235
253
  else:
236
254
  # # Otherwise, assume continuous data with normalization
237
255
  # Otherwise, fallback to continuous standardization
@@ -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
- GPU-accelerated estimation of mixed logit models.',
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
  ])
@@ -3473,8 +3473,7 @@ class ObjectiveFunction(object):
3473
3473
  corr_pairs = list(itertools.combinations(self.Kr, 2))
3474
3474
  else:
3475
3475
  corr_pairs = list(itertools.combinations(corr_indices, 2))
3476
- if len(corr_pairs) >0:
3477
- print('maybe get the terms here')
3476
+
3478
3477
 
3479
3478
  for ii, corr_pair in enumerate(corr_pairs):
3480
3479
  # lower cholesky matrix
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: metacountregressor
3
- Version: 0.1.121
3
+ Version: 0.1.123
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
7
- Author-email: zeke.ahern@hdr.qut.edu.au
7
+ Author-email: z.ahern@qut.edu.au
8
8
  License: QUT
9
9
  Requires-Python: >=3.10
10
10
  Description-Content-Type: text/markdown
@@ -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
@@ -1,3 +1,4 @@
1
1
  numpy>=1.13.1
2
2
  scipy>=1.0.0
3
3
  requests
4
+ latextable
@@ -53,7 +53,7 @@ setuptools.setup(
53
53
  long_description_content_type='text/markdown', # Specify the content type as Markdown
54
54
  url='https://github.com/zahern/CountDataEstimation',
55
55
  author='Zeke Ahern',
56
- author_email='zeke.ahern@hdr.qut.edu.au',
56
+ author_email='z.ahern@qut.edu.au',
57
57
  license='QUT',
58
58
  packages=['metacountregressor'],
59
59
  zip_safe=False,
@@ -61,6 +61,7 @@ setuptools.setup(
61
61
  install_requires=[
62
62
  'numpy>=1.13.1',
63
63
  'scipy>=1.0.0',
64
- 'requests'
64
+ 'requests',
65
+ 'latextable'
65
66
  ]
66
67
  )