Page 75 - 《软件学报》2020年第12期
P. 75
张鑫 等:自然进化策略的特征选择算法研究 3741
3: Initialize: the number of population genes ϕ
4: For population p=1,2,…,σ do
4
2
5: Initialize population feature sequence with zero ξ 1 ,ξξ 3 ,ξ
,
p p p p
6: Randomly divide the population gene into m Subpopulation
7: For subpopulation s=1,2,…,m do
8: Initialize distribution parameters θ (0)
, p s
9: End for
10: End for
11: Repeat
12: For generation g=1,2,…,τ do
13: g ← g + 1
14: For population p=1,2,…,σ do
15: For each subpopulation s=1,2,…,m do
16: Sample λ individual from distribution px θ ()g ) → x ,..., x
( |
, ps 1 λ
17: Feature selection for generated individuals according to Eq.9
18: Generating random sequences ξ according ξ
3
4
p
p
19: For each individual μ=1,2,…,λ do
2
4
20: Local exploration on four feature sequences ξ 1 p ,ξξ p 3 ,ξ to generates four new feature sequences
,
p
p
,ξξ
ξ 1 p 2 p 4
3
,ξ
,
p
p
21: Evaluate four new feature sequences ξ 1 p 2 4 p
,ξξ
3
,ξ using fitness function f(⋅)
,
p
p
22: Choose best fitness value on four feature sequences as individual fitness
23: For each new feature sequences ξ i p (1≤≤ 4) do
i
24: If f (ξ i p ) > ( f ξ p 3 ) do
i
25: ξ ← 1 p ξξ ← 2 p , 2 p ξ 3 p , ξ ← 3 p ξ
p
26: Else If f (ξ i p ) > ( f ξ p 2 ) do
i
27: ξ ← 1 p ξξ ← 2 p , 2 p ξ
p
28: Else if f (ξ i p ) > ( f ξ 1 p ) do
i
1
29: ξ ← ξ
p
p
30: End for
31: End for
32: Fitness shaping for each individual fitness value using function u(⋅)
33: Calculate log-derivatives ∇ θ logπ(x|θ)
1 λ
( )∇
34: ∇ J () θ ← ∑ u x log (xπ | ) θ
θ
λ g = 1 g θ g
35: Update distribution parameters using Adam
36: End for
37: End for
38: Evaluate all populations performance F(p i )(i=1,2,…,σ) by Equ.12
39: IF Eq.13 returns true and F(p i ) has the worst overall performance do
40: Reset the exploration ability of p i , Transfer the distribution of p i to the optimal population and reset