mirror of
				https://github.com/ejeanboris/MDAF.git
				synced 2025-10-31 13:38:14 +00:00 
			
		
		
		
	setting it up
This commit is contained in:
		
							
								
								
									
										5
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								.vscode/extensions.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| { | ||||
|     "recommendations": [ | ||||
|         "magicstack.magicpython" | ||||
|     ] | ||||
| } | ||||
							
								
								
									
										19
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.vscode/launch.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| { | ||||
|     // Use IntelliSense to learn about possible attributes. | ||||
|     // Hover to view descriptions of existing attributes. | ||||
|     // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||||
|     "version": "0.2.0", | ||||
|     "configurations": [ | ||||
|      | ||||
|          | ||||
|  | ||||
|         { | ||||
|             "name": "Python: Current File", | ||||
|             "type": "python", | ||||
|             "request": "launch", | ||||
|             "program": "${file}", | ||||
|             "console": "integratedTerminal", | ||||
|             "cwd": "${fileDirname}" | ||||
|         } | ||||
|     ] | ||||
| } | ||||
							
								
								
									
										9
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| { | ||||
|     "python.pythonPath": "/usr/bin/python3.8", | ||||
|     "python.testing.pytestArgs": [ | ||||
|         "Sample codes" | ||||
|     ], | ||||
|     "python.testing.unittestEnabled": false, | ||||
|     "python.testing.nosetestsEnabled": false, | ||||
|     "python.testing.pytestEnabled": true | ||||
| } | ||||
| @@ -20,6 +20,8 @@ from scipy import signal, misc, ndimage | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| def measure(heuristicpath, heuristic_name, funcpath, funcname, objs, args, scale, connection): | ||||
|     ''' | ||||
|     This function runs each optimization process of the heuristic with one test function | ||||
| @@ -126,8 +128,8 @@ def representfunc(funcpath): | ||||
|             # Valleys and Bassins | ||||
|              | ||||
|             # Alternative filter used for calculating derivatives | ||||
|             derfilt = array([1.0, -2, 1.0], dtype=float32) | ||||
|             alpha = signal.sepfir2d(ck, derfilt, [1]) + signal.sepfir2d(ck, [1], derfilt) | ||||
|             #derfilt = array([1.0, -2, 1.0], dtype=float32) | ||||
|             #alpha = signal.sepfir2d(ck, derfilt, [1]) + signal.sepfir2d(ck, [1], derfilt) | ||||
|              | ||||
|             # Currently used filter for Valley detection | ||||
|             hor = array([[0,1,1],[-1,0,1], [-1,-1,0]]) | ||||
| @@ -169,16 +171,16 @@ def representfunc(funcpath): | ||||
|             # Noisyness: use the previously generated DOE and calculate a noisyness factor; average of derivative | ||||
|              | ||||
|             # Displaying the plots for development purposes | ||||
|             img1 = plt.figure() | ||||
|             ax2 = img1.add_subplot(111) | ||||
|             ax2.imshow(alpha) | ||||
|             #img1 = plt.figure() | ||||
|             #ax2 = img1.add_subplot(111) | ||||
|             #ax2.imshow(alpha) | ||||
|              | ||||
|             img2 = plt.figure() | ||||
|             ax3 = img2.add_subplot(111) | ||||
|             ax3.imshow(beta) | ||||
|              | ||||
|             plt.show() | ||||
|              | ||||
|             print("should be plotted") | ||||
|              | ||||
|             # Writing the calculated representation into the test function file | ||||
|             # results['Represented'] = True | ||||
| @@ -242,7 +244,9 @@ if __name__ == '__main__': | ||||
|     args = {"high": 200, "low": -200, "t": 1000, "p": 0.95} | ||||
|     scale = 1 | ||||
|          | ||||
|     doe (heuristicpath, heuristic_name, testfunctionpaths, funcnames, objs, args, scale) | ||||
|     #doe (heuristicpath, heuristic_name, testfunctionpaths, funcnames, objs, args, scale) | ||||
|      | ||||
|     #representfunc("/home/remi/Documents/MDAF-GitLAB/SourceCode/TestFunctions/Bukin6.py") | ||||
|     representfunc("TestFunctions/Bukin6.py") | ||||
|  | ||||
|  | ||||
| # %% | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							| @@ -59,6 +59,30 @@ def main(args): | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	''' | ||||
|   | ||||
							
								
								
									
										86
									
								
								SourceCode/TestFunctions/Bukin6.py.old
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								SourceCode/TestFunctions/Bukin6.py.old
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,86 @@ | ||||
| from math import sqrt, fabs | ||||
|  | ||||
|  | ||||
| def main(args): | ||||
|     ''' | ||||
|     #_# dimmensions: 2 | ||||
|      | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	 | ||||
| 	#_# dimmensions: 2.0 | ||||
| 	#_# Valleys: True | ||||
| 	''' | ||||
|     return 100*sqrt(fabs(args[1]-0.01*args[0]**2))+0.01*fabs(args[0]+10) | ||||
							
								
								
									
										
											BIN
										
									
								
								SourceCode/TestFunctions/__pycache__/Brown.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SourceCode/TestFunctions/__pycache__/Brown.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SourceCode/TestFunctions/__pycache__/Bukin2.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SourceCode/TestFunctions/__pycache__/Bukin2.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SourceCode/TestFunctions/__pycache__/Bukin4.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SourceCode/TestFunctions/__pycache__/Bukin4.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								SourceCode/TestFunctions/__pycache__/Bukin6.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								SourceCode/TestFunctions/__pycache__/Bukin6.cpython-38.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user