metacountregressor 0.1.126__tar.gz → 0.1.128__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.126 → metacountregressor-0.1.128}/PKG-INFO +1 -1
  2. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/helperprocess.py +5 -6
  3. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/solution.py +2 -2
  4. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor.egg-info/PKG-INFO +1 -1
  5. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/LICENSE.txt +0 -0
  6. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/README.rst +0 -0
  7. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/__init__.py +0 -0
  8. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/_device_cust.py +0 -0
  9. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/app_main.py +0 -0
  10. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/data_split_helper.py +0 -0
  11. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/halton.py +0 -0
  12. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/main.py +0 -0
  13. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/main_old.py +0 -0
  14. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/metaheuristics.py +0 -0
  15. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/pareto_file.py +0 -0
  16. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/pareto_logger__plot.py +0 -0
  17. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/setup.py +0 -0
  18. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/single_objective_finder.py +0 -0
  19. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor/test_generated_paper2.py +0 -0
  20. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor.egg-info/SOURCES.txt +0 -0
  21. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor.egg-info/dependency_links.txt +0 -0
  22. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor.egg-info/not-zip-safe +0 -0
  23. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor.egg-info/requires.txt +0 -0
  24. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/metacountregressor.egg-info/top_level.txt +0 -0
  25. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/setup.cfg +0 -0
  26. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/setup.py +0 -0
  27. {metacountregressor-0.1.126 → metacountregressor-0.1.128}/tests/test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: metacountregressor
3
- Version: 0.1.126
3
+ Version: 0.1.128
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
@@ -183,18 +183,18 @@ 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
- low_threshold = series.quantile(0.33)
187
- high_threshold = series.quantile(0.66)
186
+ low_threshold = np.quantile(series, 0.33)
187
+ high_threshold = np.quantile(series,0.66)
188
188
 
189
189
  # Define the bins and labels
190
- bins = [series.min() - 1, low_threshold, high_threshold, series.max()]
190
+ bins = [np.min(series) - 1, low_threshold, high_threshold, np.min(series)]
191
191
  labels = ['Low', 'Medium', 'High']
192
192
 
193
193
  return {
194
194
  'type': 'bin',
195
195
  'bins': bins,
196
196
  'labels': labels,
197
- 'prefix': f'{column_name}_Binned'
197
+ 'prefix': f'{column_name}'
198
198
  }
199
199
 
200
200
  def transform_dataframe(df, config):
@@ -246,8 +246,7 @@ def guess_column_type(column_name, series):
246
246
  if unique_values < 5:
247
247
  return {'type': 'one-hot', 'prefix': column_name}
248
248
 
249
-
250
- elif series.max() - series.min() > 20:
249
+ elif np.max(series) - np.min(series) > 20:
251
250
  # If there are few unique values, assume binning with default bins
252
251
  guess_low_medium_high(column_name,series)
253
252
  else:
@@ -449,7 +449,7 @@ class ObjectiveFunction(object):
449
449
  if 'model_types' in kwargs:
450
450
  model_types = kwargs['model_types']
451
451
  else:
452
- print('the type of models possible are:')
452
+
453
453
 
454
454
  model_types = [[0, 1]] # add 2 for Generalized Poisson
455
455
  model_types = [[0]]
@@ -459,7 +459,7 @@ class ObjectiveFunction(object):
459
459
  # Retrieve the keys (model names) corresponding to the values in model_types
460
460
  model_keys = [key for key, value in model_t_dict.items() if value in model_types[0]]
461
461
  # Print the formatted result
462
- print(f'The type of models possible are: {", ".join(model_keys)}')
462
+ print(f'The type of models possible will consider: {", ".join(model_keys)}')
463
463
  self._discrete_values = self._discrete_values + self.define_poissible_transforms(
464
464
  self._transformations, kwargs.get('decisions',None)) + model_types
465
465
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: metacountregressor
3
- Version: 0.1.126
3
+ Version: 0.1.128
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