metacountregressor 1.0.6__py3-none-any.whl → 1.0.7__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/metaheuristics.py +12 -1
- metacountregressor/solution.py +17 -4
- {metacountregressor-1.0.6.dist-info → metacountregressor-1.0.7.dist-info}/METADATA +1 -1
- {metacountregressor-1.0.6.dist-info → metacountregressor-1.0.7.dist-info}/RECORD +7 -7
- {metacountregressor-1.0.6.dist-info → metacountregressor-1.0.7.dist-info}/WHEEL +1 -1
- {metacountregressor-1.0.6.dist-info → metacountregressor-1.0.7.dist-info}/licenses/LICENSE.txt +0 -0
- {metacountregressor-1.0.6.dist-info → metacountregressor-1.0.7.dist-info}/top_level.txt +0 -0
@@ -265,6 +265,10 @@ def simulated_annealing(objective_function, initial_slns=None, **kwargs):
|
|
265
265
|
# else:
|
266
266
|
# TEMP_ALPHA, MAX_STEPS, INTL_ACCEPT, STEPS, SWAP_PERC, NUM_INTL_SLNS, IS_MULTI= hyperparameters
|
267
267
|
man = None
|
268
|
+
try:
|
269
|
+
objective_function.instance_number = str(0)
|
270
|
+
except:
|
271
|
+
pass
|
268
272
|
if 'Manual_Fit' in kwargs:
|
269
273
|
if kwargs['Manual_Fit'] is not None:
|
270
274
|
man = kwargs['Manual_Fit']
|
@@ -292,7 +296,10 @@ def harmony_search(objective_function, initial_harmonies=None, hyperparameters=N
|
|
292
296
|
objective_function._hms = kwargs.get('_hms')
|
293
297
|
if kwargs.get('_hmcr') is not None:
|
294
298
|
objective_function._hmcr = kwargs.get('_hmcr')
|
295
|
-
|
299
|
+
try:
|
300
|
+
objective_function.instance_number = str(0)
|
301
|
+
except:
|
302
|
+
pass
|
296
303
|
|
297
304
|
man = None
|
298
305
|
if 'Manual_Fit' in kwargs:
|
@@ -416,6 +423,10 @@ class DifferentialEvolution(object):
|
|
416
423
|
|
417
424
|
def __init__(self, objective_function, **kwargs):
|
418
425
|
objective_function.algorithm = 'de'
|
426
|
+
try:
|
427
|
+
objective_function.instance_number = str(0)
|
428
|
+
except:
|
429
|
+
pass
|
419
430
|
self._obj_fun = objective_function
|
420
431
|
if self._obj_fun._obj_1 is None:
|
421
432
|
print('no objective found, automatically selecting BIC')
|
metacountregressor/solution.py
CHANGED
@@ -257,7 +257,7 @@ class ObjectiveFunction(object):
|
|
257
257
|
self.test_percentage = float(kwargs.get('test_percentage', 0))
|
258
258
|
self.val_percentage = float(kwargs.get('val_percentage', 0))
|
259
259
|
if self.test_percentage == 0:
|
260
|
-
print('test percentage is 0, please enter arg test_percentage as decimal, eg 0.8')
|
260
|
+
print('test percentage is 0, please enter arg test_percentage as decimal if intended for multi objective optimisation, eg 0.8')
|
261
261
|
print('continuing single objective')
|
262
262
|
time.sleep(2)
|
263
263
|
self.is_multi = False
|
@@ -296,6 +296,7 @@ class ObjectiveFunction(object):
|
|
296
296
|
ids = np.random.choice(N, training_size, replace=False)
|
297
297
|
id_unique = np.array([i for i in range(N)])
|
298
298
|
ids = id_unique[ids]
|
299
|
+
#todo make sure its split so counts are split
|
299
300
|
train_idx = [ii for ii in range(len(id_unique)) if id_unique[ii] in ids]
|
300
301
|
test_idx = [ii for ii in range(len(id_unique)) if id_unique[ii] not in ids]
|
301
302
|
df_train = x_data.loc[train_idx, :]
|
@@ -429,7 +430,7 @@ class ObjectiveFunction(object):
|
|
429
430
|
|
430
431
|
|
431
432
|
|
432
|
-
self.Ndraws = kwargs.get('Ndraws',
|
433
|
+
self.Ndraws = kwargs.get('Ndraws', 200)
|
433
434
|
self.draws1 = None
|
434
435
|
self.initial_sig = 1 # pass the test of a single model
|
435
436
|
self.pvalue_sig_value = .1
|
@@ -484,12 +485,24 @@ class ObjectiveFunction(object):
|
|
484
485
|
self._discrete_values = self._discrete_values + \
|
485
486
|
self.define_distributions_analyst(extra=kwargs.get('decisions', None))
|
486
487
|
|
487
|
-
if 'model_types' in kwargs:
|
488
|
-
|
488
|
+
if 'model_types' in kwargs or 'Model' in kwargs:
|
489
|
+
model_type_mapping = {
|
490
|
+
'POS': 0,
|
491
|
+
'NB': 1
|
492
|
+
}
|
493
|
+
model_types = kwargs.get('model_types', kwargs.get('Model', [[0,1]]))
|
494
|
+
converted_model_types = [
|
495
|
+
[model_type_mapping.get(item, item) for item in sublist]
|
496
|
+
for sublist in model_types
|
497
|
+
]
|
498
|
+
model_types = converted_model_types
|
499
|
+
#this should be a list of list like [[0, 1]]
|
500
|
+
# also if it is [['POS', 'NB']] then it will be converted to [0, 1]
|
489
501
|
else:
|
490
502
|
|
491
503
|
|
492
504
|
model_types = [[0, 1]] # add 2 for Generalized Poisson
|
505
|
+
|
493
506
|
#model_types = [[0]]
|
494
507
|
|
495
508
|
if self.linear_regression:
|
@@ -6,16 +6,16 @@ metacountregressor/halton.py,sha256=jhovA45UBoZYU9g-hl6Lb2sBIx_ZBTNdPrpgkzR9fng,
|
|
6
6
|
metacountregressor/helperprocess.py,sha256=wW45-i31zy6rwaXt5PZt0GyR83PzF30jc9Wl4SQtnUI,26372
|
7
7
|
metacountregressor/main.py,sha256=tGOm8DdbdyDf316qIxDAre6l6GzfJIWYNYIBaSeIemI,23685
|
8
8
|
metacountregressor/main_old.py,sha256=eTS4ygq27MnU-dZ_j983Ucb-D5XfbVF8OJQK2hVVLZc,24123
|
9
|
-
metacountregressor/metaheuristics.py,sha256=
|
9
|
+
metacountregressor/metaheuristics.py,sha256=lAtDmQslzAC4Xg2Ozx4bnycz235le7-qEStlJFPa5xA,107881
|
10
10
|
metacountregressor/pareto_file.py,sha256=whySaoPAUWYjyI8zo0hwAOa3rFk6SIUlHSpqZiLur0k,23096
|
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=nY9L3X3mBUqbIopriHIzp9zXQOdhSt8dWj4Nx5Gu40Y,324648
|
15
15
|
metacountregressor/test_code.py,sha256=_7Emm2JbhK_NVhxoqMhshN2JeHZtihZuSDl3Jpe7Ajk,1641
|
16
16
|
metacountregressor/test_generated_paper2.py,sha256=pwOoRzl1jJIIOUAAvbkT6HmmTQ81mwpsshn9SLdKOg8,3927
|
17
|
-
metacountregressor-1.0.
|
18
|
-
metacountregressor-1.0.
|
19
|
-
metacountregressor-1.0.
|
20
|
-
metacountregressor-1.0.
|
21
|
-
metacountregressor-1.0.
|
17
|
+
metacountregressor-1.0.7.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
18
|
+
metacountregressor-1.0.7.dist-info/METADATA,sha256=3-FuTS2ap0lEcxzmCiGjO6825DoAAqNuEuaEeaWVbnY,23618
|
19
|
+
metacountregressor-1.0.7.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
|
20
|
+
metacountregressor-1.0.7.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
|
21
|
+
metacountregressor-1.0.7.dist-info/RECORD,,
|
{metacountregressor-1.0.6.dist-info → metacountregressor-1.0.7.dist-info}/licenses/LICENSE.txt
RENAMED
File without changes
|
File without changes
|