metacountregressor 0.1.236__tar.gz → 0.1.239__tar.gz
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-0.1.236/metacountregressor.egg-info → metacountregressor-0.1.239}/PKG-INFO +1 -1
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/helperprocess.py +37 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/metaheuristics.py +3 -3
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/solution.py +896 -53
- {metacountregressor-0.1.236 → metacountregressor-0.1.239/metacountregressor.egg-info}/PKG-INFO +1 -1
- metacountregressor-0.1.239/version.txt +1 -0
- metacountregressor-0.1.236/version.txt +0 -1
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/LICENSE.txt +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/MANIFEST.in +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/README.md +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/README.rst +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/__init__.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/_device_cust.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/app_main.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/data_split_helper.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/halton.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/main.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/main_old.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/pareto_file.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/pareto_logger__plot.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/setup.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/single_objective_finder.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/test_generated_paper2.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor.egg-info/SOURCES.txt +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor.egg-info/dependency_links.txt +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor.egg-info/not-zip-safe +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor.egg-info/requires.txt +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor.egg-info/top_level.txt +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/setup.cfg +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/setup.py +0 -0
- {metacountregressor-0.1.236 → metacountregressor-0.1.239}/tests/test.py +0 -0
{metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/helperprocess.py
RENAMED
|
@@ -45,6 +45,43 @@ def delete_all_folders(directory_path):
|
|
|
45
45
|
except Exception as e:
|
|
46
46
|
print(f"An error occurred: {e}")
|
|
47
47
|
|
|
48
|
+
def delete_all_contents(directory_path):
|
|
49
|
+
try:
|
|
50
|
+
# Check if the directory exists
|
|
51
|
+
if not os.path.exists(directory_path):
|
|
52
|
+
print(f"The directory '{directory_path}' does not exist.")
|
|
53
|
+
return
|
|
54
|
+
|
|
55
|
+
# Iterate through items in the directory
|
|
56
|
+
for item in os.listdir(directory_path):
|
|
57
|
+
item_path = os.path.join(directory_path, item)
|
|
58
|
+
|
|
59
|
+
# If the item is a directory, delete it
|
|
60
|
+
if os.path.isdir(item_path):
|
|
61
|
+
shutil.rmtree(item_path) # Recursively delete the folder
|
|
62
|
+
print(f"Deleted folder: {item_path}")
|
|
63
|
+
else:
|
|
64
|
+
# If the item is a file, delete it
|
|
65
|
+
os.remove(item_path)
|
|
66
|
+
print(f"Deleted file: {item_path}")
|
|
67
|
+
|
|
68
|
+
print("All contents deleted successfully.")
|
|
69
|
+
except Exception as e:
|
|
70
|
+
print(f"An error occurred: {e}")
|
|
71
|
+
|
|
72
|
+
def delete_folder_and_contents(directory_path):
|
|
73
|
+
try:
|
|
74
|
+
# Check if the directory exists
|
|
75
|
+
if not os.path.exists(directory_path):
|
|
76
|
+
print(f"The directory '{directory_path}' does not exist.")
|
|
77
|
+
return
|
|
78
|
+
|
|
79
|
+
# Delete the entire folder and its contents
|
|
80
|
+
shutil.rmtree(directory_path)
|
|
81
|
+
print(f"Deleted folder and all its contents: {directory_path}")
|
|
82
|
+
except Exception as e:
|
|
83
|
+
print(f"An error occurred: {e}")
|
|
84
|
+
|
|
48
85
|
|
|
49
86
|
|
|
50
87
|
##Select the best Features Based on RF
|
{metacountregressor-0.1.236 → metacountregressor-0.1.239}/metacountregressor/metaheuristics.py
RENAMED
|
@@ -236,15 +236,15 @@ def differential_evolution(objective_function, initial_slns=None, **kwargs):
|
|
|
236
236
|
else:
|
|
237
237
|
de = DifferentialEvolution(objective_function, **kwargs)
|
|
238
238
|
|
|
239
|
-
iterations, solutions, best_solutions, best_fitness, best_struct
|
|
239
|
+
iterations, solutions, best_solutions, best_fitness, best_struct = de.differential_evolution_run(
|
|
240
240
|
initial_slns=initial_slns, mod_init=man)
|
|
241
|
-
|
|
241
|
+
AVERAGE_BEST = st.mean(best_solutions)
|
|
242
242
|
end = datetime.now()
|
|
243
243
|
elapsed_time = end - start
|
|
244
244
|
return DifferentialEvolutionResults(elapsed_time=elapsed_time, iteration=iterations,
|
|
245
245
|
iter_solution=solutions, best_solutions=best_solutions,
|
|
246
246
|
best_fitness=best_fitness,
|
|
247
|
-
best_struct=best_struct, average_best=
|
|
247
|
+
best_struct=best_struct, average_best=AVERAGE_BEST)
|
|
248
248
|
|
|
249
249
|
|
|
250
250
|
def simulated_annealing(objective_function, initial_slns=None, **kwargs):
|