metacountregressor 0.1.128__py3-none-any.whl → 0.1.130__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.128
3
+ Version: 0.1.130
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
@@ -3,7 +3,7 @@ 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=NUWI4Y6eWYK6n2supbtCim3iI6QdzwlTobBlUHR8zdc,17054
6
+ metacountregressor/helperprocess.py,sha256=gotuODIzxpQ_t90cPth01afQI7ykSYnHfF414sRmDG4,17061
7
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
@@ -11,10 +11,10 @@ metacountregressor/pareto_file.py,sha256=whySaoPAUWYjyI8zo0hwAOa3rFk6SIUlHSpqZiL
11
11
  metacountregressor/pareto_logger__plot.py,sha256=mEU2QN4wmsM7t39GJ_XhJ_jjsdl09JOmG0U2jICrAkI,30037
12
12
  metacountregressor/setup.py,sha256=5UcQCCLR8Fm5odA3MX78WwahavxFq4mVD6oq0IuQvAY,936
13
13
  metacountregressor/single_objective_finder.py,sha256=jVG7GJBqzSP4_riYr-kMMKy_LE3SlGmKMunNhHYxgRg,8011
14
- metacountregressor/solution.py,sha256=_InL6f_DHPuP518NfYXhQJQwDejR5CVEXdWyU1kKY7E,277562
14
+ metacountregressor/solution.py,sha256=6qAtCSKNvmrCpIpBCzp2Zt8wWKZBHRQtTriyiMHUo54,277519
15
15
  metacountregressor/test_generated_paper2.py,sha256=pwOoRzl1jJIIOUAAvbkT6HmmTQ81mwpsshn9SLdKOg8,3927
16
- metacountregressor-0.1.128.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
17
- metacountregressor-0.1.128.dist-info/METADATA,sha256=Qg1irZBxERwunEhMcdJg_ZHuB49tXCRFL0eExGRPnjg,23434
18
- metacountregressor-0.1.128.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
19
- metacountregressor-0.1.128.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
20
- metacountregressor-0.1.128.dist-info/RECORD,,
16
+ metacountregressor-0.1.130.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
17
+ metacountregressor-0.1.130.dist-info/METADATA,sha256=eRZ1OYTIibQlyOIwqL771Tr5k9oQlqqOf-7-ptQEYXM,23434
18
+ metacountregressor-0.1.130.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
19
+ metacountregressor-0.1.130.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
20
+ metacountregressor-0.1.130.dist-info/RECORD,,