metacountregressor 0.1.89__py3-none-any.whl → 0.1.97__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 +11 -1
- metacountregressor/solution.py +19 -13
- {metacountregressor-0.1.89.dist-info → metacountregressor-0.1.97.dist-info}/METADATA +1 -1
- {metacountregressor-0.1.89.dist-info → metacountregressor-0.1.97.dist-info}/RECORD +7 -7
- {metacountregressor-0.1.89.dist-info → metacountregressor-0.1.97.dist-info}/WHEEL +1 -1
- {metacountregressor-0.1.89.dist-info → metacountregressor-0.1.97.dist-info}/LICENSE.txt +0 -0
- {metacountregressor-0.1.89.dist-info → metacountregressor-0.1.97.dist-info}/top_level.txt +0 -0
|
@@ -271,7 +271,17 @@ def guess_low_medium_high(column_name, series):
|
|
|
271
271
|
# Compute the tertiles (33rd and 66th percentiles)
|
|
272
272
|
#print('did it make it...')
|
|
273
273
|
#mode_value = st.mode(series) # Get the most frequent value
|
|
274
|
-
#
|
|
274
|
+
#i dont think this works cayse its not a seriers any other way
|
|
275
|
+
is_binary = series.isin([0, 1]).all()
|
|
276
|
+
if is_binary:
|
|
277
|
+
return {
|
|
278
|
+
'type': 'binary',
|
|
279
|
+
'bins': [0,1],
|
|
280
|
+
'labels': ['Off', 'On'],
|
|
281
|
+
'prefix': f'{column_name}'
|
|
282
|
+
|
|
283
|
+
}
|
|
284
|
+
|
|
275
285
|
# series = pd.to_numeric(series, errors='coerce').fillna(mode_value)
|
|
276
286
|
low_threshold = np.quantile(series, 0.33)
|
|
277
287
|
high_threshold = np.quantile(series,0.66)
|
metacountregressor/solution.py
CHANGED
|
@@ -256,10 +256,11 @@ class ObjectiveFunction(object):
|
|
|
256
256
|
self.is_multi = False
|
|
257
257
|
|
|
258
258
|
if 'panels' in kwargs and not (kwargs.get('panels') == None):
|
|
259
|
-
|
|
259
|
+
if kwargs.get('group') is not None:
|
|
260
|
+
self.group_names = np.asarray(x_data[kwargs['group']].astype('category').cat._parent.dtype.categories)
|
|
260
261
|
|
|
261
|
-
|
|
262
|
-
|
|
262
|
+
x_data[kwargs['group']] = x_data[kwargs['group']].astype(
|
|
263
|
+
'category').cat.codes
|
|
263
264
|
self.complexity_level = 6
|
|
264
265
|
# create test dataset
|
|
265
266
|
|
|
@@ -309,10 +310,13 @@ class ObjectiveFunction(object):
|
|
|
309
310
|
df_train[kwargs['panels']]) if kwargs['panels'] is not None else None
|
|
310
311
|
self.ids_test = np.asarray(
|
|
311
312
|
df_test[kwargs['panels']]) if kwargs['panels'] is not None else None
|
|
312
|
-
|
|
313
|
-
'
|
|
314
|
-
|
|
315
|
-
'
|
|
313
|
+
if kwargs.get('group') is not None:
|
|
314
|
+
groupll = np.asarray(df_train[kwargs['group']].astype(
|
|
315
|
+
'category').cat.codes)
|
|
316
|
+
group_test = np.asarray(df_test[kwargs['group']].astype(
|
|
317
|
+
'category').cat.codes)
|
|
318
|
+
else:
|
|
319
|
+
groupll = None
|
|
316
320
|
X, Y, panel, group = self._arrange_long_format(
|
|
317
321
|
df_train, y_train, self.ids, self.ids, groupll)
|
|
318
322
|
self.group_halton = group.copy()
|
|
@@ -501,7 +505,7 @@ class ObjectiveFunction(object):
|
|
|
501
505
|
self._max_hurdle = 4
|
|
502
506
|
|
|
503
507
|
#Manually fit from analyst specification
|
|
504
|
-
manual_fit = kwargs.get('Manual_Fit')
|
|
508
|
+
manual_fit = kwargs.get('Manual_Fit', None)
|
|
505
509
|
if manual_fit is not None:
|
|
506
510
|
print('fitting manual')
|
|
507
511
|
self.process_manual_fit(manual_fit)
|
|
@@ -538,7 +542,7 @@ class ObjectiveFunction(object):
|
|
|
538
542
|
if self.is_multi:
|
|
539
543
|
self._offsets_test = self._x_data_test[:, :, val_od]
|
|
540
544
|
self._x_data_test = self.remove_offset(self._x_data_test, val_od)
|
|
541
|
-
print(self._offsets)
|
|
545
|
+
#print(self._offsets)
|
|
542
546
|
else:
|
|
543
547
|
self.initialize_empty_offsets()
|
|
544
548
|
|
|
@@ -2361,7 +2365,7 @@ class ObjectiveFunction(object):
|
|
|
2361
2365
|
sorted(my_dict, key=lambda x: x[0]['pval_percentage'])
|
|
2362
2366
|
|
|
2363
2367
|
def get_fitness(self, vector, multi=False, verbose=False, max_routine=3):
|
|
2364
|
-
obj_1 = 10.0 **
|
|
2368
|
+
obj_1 = 10.0 ** 4
|
|
2365
2369
|
obj_best = None
|
|
2366
2370
|
sub_slns = list()
|
|
2367
2371
|
|
|
@@ -2453,7 +2457,7 @@ class ObjectiveFunction(object):
|
|
|
2453
2457
|
|
|
2454
2458
|
|
|
2455
2459
|
if not self.is_quanitifiable_num(obj_1[self._obj_1]):
|
|
2456
|
-
obj_1[self._obj_1] = 10 **
|
|
2460
|
+
obj_1[self._obj_1] = 10 ** 5
|
|
2457
2461
|
else:
|
|
2458
2462
|
if obj_1[self._obj_1] <= 0:
|
|
2459
2463
|
obj_1[self._obj_1] = 10 ** 9
|
|
@@ -3561,8 +3565,10 @@ class ObjectiveFunction(object):
|
|
|
3561
3565
|
# Compute: betas = mean + sd*draws
|
|
3562
3566
|
if len(br_sd) != draws.shape[1]:
|
|
3563
3567
|
#get the same size as the mean
|
|
3564
|
-
|
|
3565
|
-
|
|
3568
|
+
#if hasattr(self.Br):
|
|
3569
|
+
# betas_random = self.Br.copy()
|
|
3570
|
+
#else:
|
|
3571
|
+
betas_random = br_mean[None, :, None] + draws * br_sd[None, :, None]
|
|
3566
3572
|
'''
|
|
3567
3573
|
c = self.get_num_params()[3:5]
|
|
3568
3574
|
|
|
@@ -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=
|
|
6
|
+
metacountregressor/helperprocess.py,sha256=dfNLJzsl58YHWPa_--m1Wg6ttPubHc-m_DAxFI0rouA,22157
|
|
7
7
|
metacountregressor/main.py,sha256=xfpKN2w0kePHp_Q2HOPjtG15PLEN1L3sEnDw1PHBquw,23668
|
|
8
8
|
metacountregressor/main_old.py,sha256=eTS4ygq27MnU-dZ_j983Ucb-D5XfbVF8OJQK2hVVLZc,24123
|
|
9
9
|
metacountregressor/metaheuristics.py,sha256=rIdBa28EroIYqoE8ZI1isuj_o-tOWHo6jKi1HQJ06lU,106292
|
|
@@ -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=
|
|
14
|
+
metacountregressor/solution.py,sha256=PgGPqxIJhXV5kAOrhPrhY2HC3LtjW7qOkFByh9rpvUc,279566
|
|
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.97.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
17
|
+
metacountregressor-0.1.97.dist-info/METADATA,sha256=yJTPnzZKd1Ncg8tV3yTqwiLjp2CgAnqkED5bMGhrQsE,23535
|
|
18
|
+
metacountregressor-0.1.97.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
19
|
+
metacountregressor-0.1.97.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
|
|
20
|
+
metacountregressor-0.1.97.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|