metacountregressor 0.1.139__py3-none-any.whl → 0.1.140__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- metacountregressor/helperprocess.py +14 -0
- metacountregressor/metaheuristics.py +14 -4
- metacountregressor/solution.py +6 -6
- {metacountregressor-0.1.139.dist-info → metacountregressor-0.1.140.dist-info}/METADATA +1 -1
- {metacountregressor-0.1.139.dist-info → metacountregressor-0.1.140.dist-info}/RECORD +8 -8
- {metacountregressor-0.1.139.dist-info → metacountregressor-0.1.140.dist-info}/LICENSE.txt +0 -0
- {metacountregressor-0.1.139.dist-info → metacountregressor-0.1.140.dist-info}/WHEEL +0 -0
- {metacountregressor-0.1.139.dist-info → metacountregressor-0.1.140.dist-info}/top_level.txt +0 -0
@@ -10,6 +10,20 @@ from win32comext.shell.demos.IActiveDesktop import existing_item
|
|
10
10
|
|
11
11
|
plt.style.use('https://github.com/dhaitz/matplotlib-stylesheets/raw/master/pitayasmoothie-dark.mplstyle')
|
12
12
|
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
from itertools import product
|
18
|
+
|
19
|
+
# Function to create a list of dictionaries from a parameter grid
|
20
|
+
def generate_param_combinations(param_grid):
|
21
|
+
keys = param_grid.keys()
|
22
|
+
values = param_grid.values()
|
23
|
+
combinations = [dict(zip(keys, v)) for v in product(*values)]
|
24
|
+
return combinations
|
25
|
+
|
26
|
+
|
13
27
|
##Select the best Features Based on RF
|
14
28
|
def select_features(X_train, y_train, n_f=16):
|
15
29
|
try:
|
@@ -787,7 +787,7 @@ class SimulatedAnnealing(object):
|
|
787
787
|
self.accept = 0
|
788
788
|
self.profiler = []
|
789
789
|
self.update_t = self.cooling_linear_m
|
790
|
-
self.
|
790
|
+
self.get_directory()
|
791
791
|
self._crossover_perc = float(kwargs.get('_crossover_perc', 0.2)) or float(kwargs.get('_cr', 0.2))
|
792
792
|
self._obj_fun = objective_function
|
793
793
|
if objective_function.is_multi: # TODO Define more specific objectives in the intialiser
|
@@ -801,7 +801,7 @@ class SimulatedAnnealing(object):
|
|
801
801
|
self.pf = Pareto(self.obj_1, self.obj_2, False)
|
802
802
|
self._sa_memory = list()
|
803
803
|
|
804
|
-
def
|
804
|
+
def get_directory(self):
|
805
805
|
# checking if the directory demo_folder2
|
806
806
|
# exist or not.
|
807
807
|
if not os.path.isdir(self.instance_number):
|
@@ -1237,6 +1237,16 @@ class HarmonySearch(object):
|
|
1237
1237
|
Initialize HS with the specified objective function. Note that this objective function must implement ObjectiveFunctionInterface.
|
1238
1238
|
"""
|
1239
1239
|
self._obj_fun = objective_function
|
1240
|
+
## NEW CODE, TRYING TO EXCTACT OUT THE PARAMATERS
|
1241
|
+
self._hms = kwargs.get('_hms', 20)
|
1242
|
+
self._par = kwargs.get(_'par', .30)
|
1243
|
+
self.F = kwargs.get('_AI', 2) # mutation scale
|
1244
|
+
self.iter = kwargs.get('_max_iter', 10000)
|
1245
|
+
self.cr = kwargs.get('_crossover_perc') or kwargs.get('_cr', 0.2)
|
1246
|
+
self.instance_number = str(kwargs.get('instance_number', 1))
|
1247
|
+
|
1248
|
+
|
1249
|
+
|
1240
1250
|
# for printing basics metrics
|
1241
1251
|
self.print_verbose = True
|
1242
1252
|
# harmony_memory stores the best hms harmonies
|
@@ -1245,7 +1255,7 @@ class HarmonySearch(object):
|
|
1245
1255
|
self._harmony_history = list()
|
1246
1256
|
# saves the best fitness
|
1247
1257
|
self.instance_number = str(objective_function.instance_number)
|
1248
|
-
self.
|
1258
|
+
self.get_directory()
|
1249
1259
|
self._harmony_trace_best = list()
|
1250
1260
|
self._harmony_trace_incumbent = list()
|
1251
1261
|
if self._obj_fun.is_multi: # TODO Define more specific objectives in the intialiser
|
@@ -1261,7 +1271,7 @@ class HarmonySearch(object):
|
|
1261
1271
|
|
1262
1272
|
self.pf = Pareto(self.obj_1, self.obj_2, False)
|
1263
1273
|
|
1264
|
-
def
|
1274
|
+
def get_directory(self):
|
1265
1275
|
# checking if the directory demo_folder2
|
1266
1276
|
# exist or not.
|
1267
1277
|
if not os.path.isdir(self.instance_number):
|
metacountregressor/solution.py
CHANGED
@@ -153,14 +153,14 @@ class ObjectiveFunction(object):
|
|
153
153
|
|
154
154
|
self.MAE = None
|
155
155
|
self.best_obj_1 = 1000000.0
|
156
|
-
self._obj_1 = 'bic'
|
157
|
-
self._obj_2 = 'MSE'
|
156
|
+
self._obj_1 = kwargs.get('_obj_1', 'bic')
|
157
|
+
self._obj_2 = kwargs.get('_obj_2', 'MSE')
|
158
158
|
self.numerical_hessian_calc = 0 # calculates hessian by statsmodels otherwise scipy
|
159
159
|
self.full_model = None
|
160
160
|
self.GP_parameter = 0
|
161
|
-
self.is_multi =
|
161
|
+
self.is_multi = kwargs.get('is_multi', False)
|
162
162
|
self.complexity_level = 6
|
163
|
-
self._max_iterations_improvement =
|
163
|
+
self._max_iterations_improvement = 10000
|
164
164
|
self.generated_sln = set()
|
165
165
|
self.ave_mae = 0
|
166
166
|
# defalt paramaters for hs #TODO unpack into harmony search class
|
@@ -168,7 +168,7 @@ class ObjectiveFunction(object):
|
|
168
168
|
self._hms = 20
|
169
169
|
self._max_time = 60 * 60 * 24
|
170
170
|
self._hmcr = .5
|
171
|
-
self._par = 0.3
|
171
|
+
self._par = 0.3 #dont think this gets useted
|
172
172
|
self._mpai = 1
|
173
173
|
self._max_imp = 100000
|
174
174
|
self._WIC = 1000 # Number of Iterations without Multiobjective Improvement #tod chuck into solution
|
@@ -395,7 +395,7 @@ class ObjectiveFunction(object):
|
|
395
395
|
|
396
396
|
|
397
397
|
|
398
|
-
self.Ndraws = 200
|
398
|
+
self.Ndraws = kwargs.get('Ndraws', 200)
|
399
399
|
self.draws1 = None
|
400
400
|
self.initial_sig = 1 # pass the test of a single model
|
401
401
|
self.pvalue_sig_value = .1
|
@@ -3,18 +3,18 @@ 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=ee4R9SfRK8bRZrzijzhulNIGPXWNfdFihiM2RhHvbEU,20804
|
7
7
|
metacountregressor/main.py,sha256=2Rx_mGIGzl4lhwkMb7DHvsBaawqEakKiVR1Yr2uG9Yo,22819
|
8
8
|
metacountregressor/main_old.py,sha256=eTS4ygq27MnU-dZ_j983Ucb-D5XfbVF8OJQK2hVVLZc,24123
|
9
|
-
metacountregressor/metaheuristics.py,sha256=
|
9
|
+
metacountregressor/metaheuristics.py,sha256=f3Jgg6NkPalcAeY2Nz8AePSDHQkVASxfceOLs_OMCug,106265
|
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=c4zEb7L4qYghVyE3gOH9Q7ylrweRNbVEnHnNeKOnLVE,277625
|
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.140.dist-info/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
17
|
+
metacountregressor-0.1.140.dist-info/METADATA,sha256=1vHV72AJOpC5EvLlXtbw_9MGMBomiRsd6FnlJVAQrYc,23434
|
18
|
+
metacountregressor-0.1.140.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
19
|
+
metacountregressor-0.1.140.dist-info/top_level.txt,sha256=zGG7UC5WIpr76gsFUpwJ4En2aCcoNTONBaS3OewwjR0,19
|
20
|
+
metacountregressor-0.1.140.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|