Você está na página 1de 3

Genetic Algorithm to the Formation of the Optimal

Structure of Fuzzy Neural Network


E. S. Filatova, D. M. Filatov, A. D. Stotсkaia
Saint Petersburg Electrotechnical University «LETI»

Abstract—Application of genetic algorithm to the formation As shown on Fig. 1 (graph e1 – training error, e2 –
of the optimal structure of fuzzy neural networks used in the forecasting error) training error significantly decreases with the
short-term forecasting of power consumption is presented. decrease of clustering radius, but rule base and forecasting
error increase. Thus, rule base increased from 8 to 33 rules with
Keywords—genetic algorithm, fuzzy neural networks, decreasing radius twice.
electrical load forecast
At the same time with the decrease of clustering radius
The idea of genetic algorithms as a method of optimal (despite having increased accuracy of training) the FNN loses
solutions formation has originally appeared in the late 60s, input information compilation ability due to rules quantity
early 70s of the XX century. At the present times genetic increasing, i. e. forecasting error increases. Clustering radius
algorithms are applied in different research and practice areas value is defined empirically in each case.
such as optimization function, databases query optimization,
graphs problems, artificial neural network setup and training It can be hard to manually select data clustering radius,
tasks, tasks of composition. especially for systems with multiple inputs and outputs. And it
is necessary to automate the procedure to implement FNN re-
Let us consider genetic algorithm in context of formation training. Matlab built-in genetic algorithm (GA) is used to
fuzzy neural networks (FNN) optimal structure that is use in form the optimal FNN structure for this reason.
the short-term forecasting of power consumption.
Classical GA is consist of following steps: initialization, or
The FNN was generated using built-in function of MatLab initial chromosome population selection; evaluation of
genfis2. Dividing space of input and output data into sub chromosome adaptation in population; condition of the
domains, genfis2 function generates ANFIS-structure using algorithm stop checking; chromosome selection; genetic
subtractive algorithm [1]. In this function the parameter having algorithm applying; new population formation; «best»
the most influence on structure of FNN and quality of training chromosome selection [2].
and forecasting is clustering radius (or border of variable
influenced areas). It is necessary to determine genetic algorithm parameters,
namely:
Let us examine building and training ANFIS-system to
demonstrate the influence of this parameter on the quality of • initial population;
training with two inputs and one output. Forecasting results for • adaptation function;
different clustering radiuses are shown on Fig. 1.
• genetic operators (selection, crossover and mutation);
6
e1 • genetic algorithm stop criterion.
5 e2
The most important of the parameters from above is the
4 adaptation function, because it determines quality of work and
convergence of genetic algorithm. As an adaptation function
3 was selected criterion that determines the final prediction error
committee of FNN [3].
2 Generalized implementation block-diagramm of the
developed genetic algorithm is fully consistent with the
1 classical block-diagramm. The difference is a realization of
each step of genetic algorithm. Let’s consider these in details.
0
0 0.1 0.2 0.3 0.4 0.5 1. Creating initial population. Population size selection
rad
substantially affects on performance and result of GA work. On
Fig. 1. Influence of clustering radius value on quality of training FNN and
Fig. 2 the time taken to search for the optimum is shown by the
forecasting dashed line, solid – the accuracy of the algorithm is shown by
solid line.

147 978-1-4673-6961-9/15/$31.00 ©2015 IEEE


Time of GA work, hour calculates new values so that scaling value for object with rank
Prediction error, % n is obtained directly proportional 1 n .
2.5
Selection is done by tournament method. This method is
2 easily extended to multi-criteria optimization problems.
Researches show that this method is more effective than
1.5 roulette method [2]. Furthermore, tournament selection method
helps to avoid the main flaw of roulette method, when the
1 parent pool begin to be dominated by the best, but not optimal
individuals.
0.5
3. Crossing. Crossing is realized by function
crossoverscattered(), which execute random pairwise exchange
0
10 20 30 40 50 60 70 of chromosomes between formed pairs of parents.
the number of individuals in the population Starting from the first index the first couple of parents from
the parent pool is picked. The first half of selected patents
Fig. 2. Population size influence on performance and result of GA work
chromosomes assisted to descendant as it’s first pair of
chromosomes randomly. Then select second pair of
With more indiviuals in population GA defines solution
descendant’s chromosomes the same way. Then pick next pair
area more thoroughly. Thus probability local minimum finding
of parents and continue same way.
is decreasing instead of global one. But large population slows
GA down. It is obvious that as a result of this algorithm of crossing we
may get descendant completely identical from one of the
With the increasing in population size (ranging from 30
parents. In addition, the exchange of chromosomes occurs if
individuals), forecasting error remains almost unchanged,
strict conformity – the first parents’ chromosome will always
while the time spent on the form of an optimal FNN structure
be descendants’ first chromosome. In other words, as a result
continues to grow (see. fig. 2).
of such a crossing chromosomes of the individual can never
Thus, any population referenced to considered problem is a change places. To realize a mechanism that allow radically
matrix with 4x30 size, where 4 – number of chromosomes change individual applies mutation operation.
represented an individual, and 30 – is the number of
4. Mutation. Mutation exposed individuals were not
chromosomes in population. Number of chromosomes depends
included in the parent pool and non-elite descendant, i.e.
on number of parameters, determines the uniqueness of the
individuals with the worst adaptation function value. Mutation
individual. In this case each individual represents four
is realized by function mutationgaussian(), which uses
clustering radiuses for each FNN, that realize prediction system
Gaussian distribution.
[r1 r2 r3 r4], which are the chromosomes forming individual.
Thus, population is consist of individuals [ r1i r2i r3i r4i ], Each parent chromosome sum with number generated
randomly with Gaussian distribution. Каждая хромосома
i = 1 ÷ 30 . Binary coding is not used, each chromosome is родителя суммируется со случайным образом
represented in double format, supported by MatLab. сгенерированным числом с распределением Гаусса. As a
result of such a mutation is possible to obtain negative values
Initial population is set by random in [0, 1] interval, which
of chromosomes, which is unacceptable for the solution of the
defines the clustering radius
problem formulated in this work, built-in MatLab function was
2. Selection. It should make a reservation that the selection modified so that output chromosome for each descendant had
procedure involves selecting individuals in the parent pool and only positive values.
carried out not all of the population, but only from the part
5. Algorithm stop condition. Stop condition in this case are
intended for the crossing.
two criteria: 1) a finite number of iterations is reached of 50; 2)
The main feature of this algorithm in MatLab is specified algorithm stops in case of no improvements for target function
number of individuals (two by default) move in next generation for the sequence of ten successive generations.
(of population) unchanged. These are so called Elite Kids, that
Running time for algorithm was 10 minutes. As a result of
have the best adaptation function values. These individuals are
GA were received 4 FNN with different structures determines
not involved in crossing.
by features of the level of detail that they were designed to
To prevent premature convergence GA uses adaptation predict [3]. Prediction carried forward by one hour from the
function scaling. Proportional scaling does not allow to get rid history data and hour.
of large variability of the adaptation value of individuals in
In Table 1 are shown the results clustering radius values
population opposite to the ranking scaling. Second assigns
selected manually and using GA and the resulting accuracy of
individuals with the best adaptation function value the highest
the forecasting for each FNN
rank, equals one. Other individuals are ranked in order of
increasing their adaptation function. Rank scaling function

148
retraining of network when forecasting parameters changes or
TABLE I. CLUSTERING RADIUS SELECTION MANUALLY AND WITH GA if forecasting error became unacceptable.
Forecasting Forecasting
Selection r
system error, % ACKNOWLEDGMENT
GA 0,56
FNN 1 This work was financially supported by a grant of the
Manual 0,60
GA 3,54 President of the Russian Federation № 14.Z56.14.3734-МК
FNN 2
Manual 4,70
GA 4,13
FNN 3 REFERENCES
Manual 5,28
GA 6,29 [1] Diakonov V. MATLAB. Signal and image proccessing. Special
FNN 4 reference / V. Diakonov, I. Abramenkova. SPb.: Piter, 2002. 608 p.
Manual 6,80
GA 1,68% [2] Rutkovskaia D. Neural networks, genetic algorithms and fuzzy systems
Overall forecast
Manual 2,12% [Text] / D. Rutkovskaia, M. Pilin’skii, L Rutkovskii; translate from
Polish I. D. Ruinskii. M.: Hot line Telekom, 2004. 452 p.
As shown in Table 1, with GA forecasting accuracy [3] Filatova E.S., Filatov D.M., Stotskaia A.D. Method for constructing
increased by 0.44 %. Moreover application of GA to automate forecasting system of power consumption based on fuzzy neuro
generation optimal structure FNN allows to realize fast approach and wavelet theory // International journal of applied and basic
researches. 2014. № 11. P. 26-29

149

Você também pode gostar