Last active
January 9, 2019 13:48
-
-
Save amineremache/6e10cbf5079341c1d191d24e1c1e9c86 to your computer and use it in GitHub Desktop.
Bee Swarm Optimization for feature selection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def bso(self): | |
| i=0 | |
| while(i<self.maxIterations): | |
| #print("refSol is : ",self.refSolution.solution) | |
| #print(self.refSolution.solution) | |
| self.tabou.append(self.refSolution) | |
| #print("Iteration N° : ",i) | |
| self.searchArea() | |
| print("********************************************************") | |
| print("Search zone is :") | |
| for k in range (self.nbrBees): | |
| print(self.beeList[k].id) | |
| print(self.beeList[k].solution) | |
| print("*******************************************************") | |
| # The local search | |
| for j in range(self.nbrBees): | |
| #self.beeList[j].localSearch() | |
| for episode in range(5): | |
| self.beeList[j].ql_localSearch() | |
| print( "Fitness of bee " + str(j) + " " + str(self.beeList[j].fitness) ) | |
| self.refSolution=self.selectRefSol() | |
| i+=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment