Descriptor Combination using Firefly Algorithm - Iris.sel.eesc.sc.usp.br

Descriptor Combination using Firefly Algorithm - Iris.sel.eesc.sc.usp.br Descriptor Combination using Firefly Algorithm - Iris.sel.eesc.sc.usp.br

sel.eesc.usp.br
from sel.eesc.usp.br More from this publisher
13.07.2015 Views

• δ D is a similarity function which combines the similarityvalues obtained from each descriptor D i ∈ D,i = 1,2,...,k.Figure 2 illustrates the use a composite descriptor ˆD tocompute the distance between images ÎA and ÎB.D:δ Dd 1 d 2 d kδ D1 δ D2δ Dkε D ε 1 D ε 1 D ε 2 D... ε 2 D ε k D kFig. 2.I^Ad^I BComposite descriptor.III. OPTIMIZATION ALGORITHMSIn this section we briefly describe the evolutionary-basedtechniques for descriptor combination addressed in this paper:Firefly Algorithm, Harmony Search and Particle SwarmOptimization.A. Firefly AlgorithmAs most of the optimization algorithms, the Firefly algorithm(FFA) is another nature-inspired algorithm designed byYang [7]. The Firefly algorithm is a metaheuristic algorithmbased on Lévy flights and firefly’s flashing light which is usedto attract mating partners, preys and as a protective warning.Also, fireflies can imitate other fireflies’ flashing pattern inorder to attract and eat them. Lévy flights represent the flightpatterns of many animals and insects and is used in thisalgorithm to model the flight of fireflies on their search foran optimum solution.Thus, FFA explores how light intensity is used to attractother fireflies and Lévy flights for optimization problems asparticles attract each other and move toward an optimumsolution in the Particle Swarm Optimization algorithm. FFAis designed according to three rules: (i) fireflies are unisex sothat they attract each other, (ii) attractiveness is proportionalto their brightness, in which the less bright moves toward thebrighter one, and (iii) the landscape of the objective functionaffects the brightness.Light intensity and attractiveness are formulated in whichattractiveness can be associated to the firefly’s brightness andthe brightness can be associated to the solution of the problem.However, light intensity is relative to the distance between thefirefly source and the firefly that is receiving the light. Yangformulates the light intensity I(r) varying according to theinverse square law:I(r) = I sr2, (1)in which I s is the source’s intensity and r the distance.Attractiveness is proportional to the light intensity and definedas:β = β 0 e −γr2 , (2)where β 0 is the attractiveness at r = 0.So, when the firefly is near the optimum solution itsbrightness increases and attracts other fireflies which startmoving toward the brighter firefly. Their movements in thesearch space are defined by the Lévy-Flight which is randomwalks in the space (Algorithm 1).Algorithm 1. – FIREFLY ALGORITHMINPUT:OUTPUT:Set of fireflies.Best solution.1. Generate the initial population of z fireflies.2. Set light intensity I for each firefly a according to x.3. For each firefly a = 1:z4. For each firefly b = 1:z5. If I a > I b ,then6. Firefly b moves toward a using the Levy-flight.7. Evaluate the solution and update light intensity.8. Rank fireflies according to their brightness9. Return the best solution.In line 2, x stands for the location of the firefly in thespace, and fireflies are ranked (Line 8) in order to find the bestsolution. The distance between two fireflies is their respectiveCartesian distance and the movement of a fireflyato a brighterfirefly b is:x a = x a +β 0 e −γr2 ab (xb −x a )+αsign[rand− 1 ]⊕Levy, (3)2where sign[rand− 1 2] with rand ∈ [0,1] provides a randomdirection and Levy provides the lenght of the step. Also, themovement is based on the attraction (second term) and arandomization via Lévy-Flight where α is the randomizationparameter.B. Harmony SearchThe Harmony Search algorithm is an evolutionary algorithmbased on music composition, considering a process in whichmusicians improvise to create music [8]. Its main characteristicsare the simple concept, a few parameters and speed tofind a solution.The idea is to use the process of creating new songs inorder to find solutions for optimization problems, in whichsolutions are modeled as harmonies and each parameter to beoptimized is represented as a note. The final solution will bethe best harmony computed by the algorithm. The main stepsare:1) Initialize algorithm parameters;2) Initialize Harmony Memory (HM) with random values;

3) Improvise a new harmony to HM;4) Updates the HM if the new harmony is better than theworst harmony in HM, inserts the new harmony in HMand removes the worst from it;5) If the stop criteria has not been reached, return to step3.In Step 3, a new harmony vector ⃗x ′ =(x ′1 ,x ′2 ,. . . , x ′N )is generated from the HM based on memory considerations,pitch adjustments, and randomization (music improvisation).As follows:(i) position (⃗x i ) and (ii) velocity (⃗v i ). First, we define thenumber of particles that will be initialized with random valuesfor both velocity and position. Each particle is evaluated toupdate the local maximum through its fitness function. Finally,the best position is update with respect to the best of the localmaximum particles.This process is repeated until some convergence criterionis reached, i.e. number of iterations. The given particle p i hasthe velocity and position equations at time step t, respectively,given byx ′j←{x ′j ∈x ′j ∈ φ j{ }x j 1 ,xj 2 ,...,xj HMSwith probability HMCR,with probability (1-HMCR),in which φ j denotes the range of values for variable j, for φ =(φ i ,φ 2 ,...,φ N ). The HMCR is the probability of choosingone value from the historic values stored in the HM, and (1-HMCR) is the probability of randomly choosing one feasiblevalue not limited to those stored in the HM. In order to makeit clear, an HMCR=0.7 means that 70% of the notes (decisionvariables) to compose the new harmony h ′ = (⃗x ′ ) will bepicked from HM, and the remaining ones will be randomlygenerated within the interval φ j .The pitch adjustment for each harmony is often used toimprove solutions and to escape from local optimum. Thismechanism concerns shifting the neighboring values of somedecision variable in the harmony:x ′j ← x ′j +rb, (5)where x j is the note j that composes the new harmony vector,b is an arbitrary distance bandwidth for the continuous designvariable, and r is a uniform distribution between 0 and 1. Inthis paper, we set b = 1.In Step 4, if the new harmony h ′ is better than the worstharmony in the HM, the latter is replaced by this new harmony.Finally, in Step 5, the HS algorithm finishes when it satisfiesthe stopping criterion. Otherwise, Steps 3 and 4 are repeatedin order to improvise a new harmony again.C. Particle Swarm OptimizationThe Particle Swarm Optimization (PSO) algorithm wasproposed by [9] in order to find solutions for optimizationproblems. The algorithm is based on social behavior dynamicsin which each solution for a given problem is represented byparticles which “fly” in the search space.Particle Swarm Optimization (PSO) is an optimization algorithmbased on social behavior dynamics [9], that finds asolution in a search space. Each solution is modeled as aparticle in the swarm, which has a memory that stores itsbest local solution (local maxima) and the best global solution(global maxima). Each particle compares its value with theneighborhood based on a objective function, and decides ifcopies it in order to get the best local and global maxima.The swarm is modeled in a multidimensional space R N , inwhich each particle p i = (⃗x i ,⃗v i ) ∈ R N has two main features:(4)v j i (t+1) = wvj i (t)+c 1r 1 (ˆx i (t)−x j i (t))+c 2r 2 (⃗g−x j i (t)) (6)andx j i (t+1) = xj i (t)+vj i (t+1), (7)where w is the inertia weight that controls the interactionbetween particles, and r 1 ,r 2 ∈ [0,1] are random variablesthat give the stochastic idea to Particle Swarm Optimization.The variables c 1 and c 2 are used to guide the particles ontogood directions.IV. OPTIMUM-PATH FOREST CLASSIFICATIONThe OPF classifier works by modeling the problem ofpattern recognition as a graph partition in a given featurespace. The nodes are represented by the feature vectors and theedges connect all pairs of them, defining a full connectednessgraph. This kind of representation is straightforward, given thatthe graph does not need to be explicitly represented, allowingus to save memory. The partition of the graph is carried out bya competition process between some key samples (prototypes),which offer optimum paths to the remaining nodes of thegraph. Each prototype sample defines its optimum-path tree(OPT), and the collection of all OPTs defines an optimumpathforest, which gives the name to the classifier [10], [11].The OPF can be seen as a generalization of the well-knownDijkstra’s algorithm to compute optimum paths from a sourcenode to the remaining ones [12]. The main difference relieson the fact that OPF uses a set of source nodes (prototypes)with any smooth path-cost function [13]. In case of Dijkstra’salgorithm, a function that summed the arc-weights along a pathwas applied. In regard to the supervised OPF version addressedhere, we have used a function that gives the maximum arcweightalong a path, as explained below.Let Z = Z 1 ∪Z 2 ∪Z 3 be a dataset labeled with a functionλ, in which Z 1 , Z 2 and Z 3 are, respectively, a training,validation and test sets. LetS ⊆ Z 1 a set of prototype samples.Essentially, the OPF classifier creates a discrete optimumpartition of the feature space such that any sample s ∈ Z 2 ∪Z 3can be classified according to this partition. This partition isan optimum path forest (OPF) computed in R n by the ImageForesting Transform (IFT) algorithm [13].The OPF algorithm may be used with any smooth path-costfunction which can group samples with similar properties [13].Particularly, we used the path-cost function f max , which is

• δ D is a similarity function which combines the similarityvalues obtained from each de<strong>sc</strong>riptor D i ∈ D,i = 1,2,...,k.Figure 2 illustrates the use a composite de<strong>sc</strong>riptor ˆD tocompute the distance between images ÎA and ÎB.D:δ Dd 1 d 2 d kδ D1 δ D2δ Dkε D ε 1 D ε 1 D ε 2 D... ε 2 D ε k D kFig. 2.I^Ad^I BComposite de<strong>sc</strong>riptor.III. OPTIMIZATION ALGORITHMSIn this section we <strong>br</strong>iefly de<strong>sc</strong>ribe the evolutionary-basedtechniques for de<strong>sc</strong>riptor combination addressed in this paper:<strong>Firefly</strong> <strong>Algorithm</strong>, Harmony Search and Particle SwarmOptimization.A. <strong>Firefly</strong> <strong>Algorithm</strong>As most of the optimization algorithms, the <strong>Firefly</strong> algorithm(FFA) is another nature-inspired algorithm designed byYang [7]. The <strong>Firefly</strong> algorithm is a metaheuristic algorithmbased on Lévy flights and firefly’s flashing light which is usedto attract mating partners, preys and as a protective warning.Also, fireflies can imitate other fireflies’ flashing pattern inorder to attract and eat them. Lévy flights represent the flightpatterns of many animals and insects and is used in thisalgorithm to model the flight of fireflies on their search foran optimum solution.Thus, FFA explores how light intensity is used to attractother fireflies and Lévy flights for optimization problems asparticles attract each other and move toward an optimumsolution in the Particle Swarm Optimization algorithm. FFAis designed according to three rules: (i) fireflies are unisex sothat they attract each other, (ii) attractiveness is proportionalto their <strong>br</strong>ightness, in which the less <strong>br</strong>ight moves toward the<strong>br</strong>ighter one, and (iii) the land<strong>sc</strong>ape of the objective functionaffects the <strong>br</strong>ightness.Light intensity and attractiveness are formulated in whichattractiveness can be associated to the firefly’s <strong>br</strong>ightness andthe <strong>br</strong>ightness can be associated to the solution of the problem.However, light intensity is relative to the distance between thefirefly source and the firefly that is receiving the light. Yangformulates the light intensity I(r) varying according to theinverse square law:I(r) = I sr2, (1)in which I s is the source’s intensity and r the distance.Attractiveness is proportional to the light intensity and definedas:β = β 0 e −γr2 , (2)where β 0 is the attractiveness at r = 0.So, when the firefly is near the optimum solution its<strong>br</strong>ightness increases and attracts other fireflies which startmoving toward the <strong>br</strong>ighter firefly. Their movements in thesearch space are defined by the Lévy-Flight which is randomwalks in the space (<strong>Algorithm</strong> 1).<strong>Algorithm</strong> 1. – FIREFLY ALGORITHMINPUT:OUTPUT:Set of fireflies.Best solution.1. Generate the initial population of z fireflies.2. Set light intensity I for each firefly a according to x.3. For each firefly a = 1:z4. For each firefly b = 1:z5. If I a > I b ,then6. <strong>Firefly</strong> b moves toward a <strong>using</strong> the Levy-flight.7. Evaluate the solution and update light intensity.8. Rank fireflies according to their <strong>br</strong>ightness9. Return the best solution.In line 2, x stands for the location of the firefly in thespace, and fireflies are ranked (Line 8) in order to find the bestsolution. The distance between two fireflies is their respectiveCartesian distance and the movement of a fireflyato a <strong>br</strong>ighterfirefly b is:x a = x a +β 0 e −γr2 ab (xb −x a )+αsign[rand− 1 ]⊕Levy, (3)2where sign[rand− 1 2] with rand ∈ [0,1] provides a randomdirection and Levy provides the lenght of the step. Also, themovement is based on the attraction (second term) and arandomization via Lévy-Flight where α is the randomizationparameter.B. Harmony SearchThe Harmony Search algorithm is an evolutionary algorithmbased on music composition, considering a process in whichmusicians improvise to create music [8]. Its main characteristicsare the simple concept, a few parameters and speed tofind a solution.The idea is to use the process of creating new songs inorder to find solutions for optimization problems, in whichsolutions are modeled as harmonies and each parameter to beoptimized is represented as a note. The final solution will bethe best harmony computed by the algorithm. The main stepsare:1) Initialize algorithm parameters;2) Initialize Harmony Memory (HM) with random values;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!