Analysis of fuzzy cognitive maps in prediction of individual household electric power consumption

Aleksander Jastriebow*,**, Katarzyna Piotrowska*

*Kielce University of Technology, **Kazimierz Pulaski University of Technology and Humanities in Radom

Abstract: This paper is devoted to the simulation analysis of application of a fuzzy cognitive map (FCM) in prediction of electric power consumption by an individual household. Fuzzy cognitive maps and multi-step supervised learning based on gradient method and real data were described. Model of the system for prediction of individual household electric power consumption was implemented on prepared software tool ISEMK (intelligent expert system based on cognitive maps). Simulation research of multi-step learning and testing of FCM were done based on real data. Chosen results of simulation were presented.

Keywords: fuzzy cognitive maps, prediction system, multi-step supervised learning, gradient method

Modeling of prediction systems can be done by developing a model based on selecting crucial concepts for the analyzed issue and defining the relations between them. Model of this type is called a fuzzy cognitive map (FCM) [11]. This paper is devoted to the analysis of FCM in prediction of individual household electric power consumption.

1. Introduction

Fuzzy cognitive map is a directed graph, whose nodes denote concepts relevant to the analyzed issue. The concepts influence each other with the intensity described by the relation weight between them [17].

FCM is widely used in decision support systems, e.g. in socio-economic models [9], in logistics [8], in supplier selection [19], in road transport [13], in intrusion detection [16] and medical expert systems [1, 4, 10, 12]. Fuzzy cognitive maps are especially popular in prediction systems, for example, in stock market decision support system [2], in predicting autistic disorder [10] and pulmonary infection [12], in numerical and linguistic prediction of time series [18].

This paper presents system for prediction of individual household electric power consumption based on fuzzy cognitive map. Part 2 describes the structure and dynamic model of FCM. In part 3 multi-step algorithm of supervised learning based on gradient method and real data is presented. Part 4 briefly characterizes the prepared software tool ISEMK (intelligent expert system based on cognitive maps), enabling the modeling of prediction systems. Part 5 describes system for prediction of individual household electric power consumption and contains chosen results of simulation research of learning and testing the system, done in ISEMK. Part 6 contains a summary of the work.

2. Fuzzy cognitive maps

The basis of the structure of FCM is a directed graph in the form [17]:

(1)

where X=[X1,…,Xn]T – the set of the concepts, n – the number of concepts; R={rj,i} – relations’ matrix, rj,i – the relation weight between the concept j and the concept i (value from the range [-1, 1]).

Dynamic models of FCM were presented in [5]. In this paper a nonlinear dynamic model described by the following equation was used:

(2)

where: t – discrete time, t=0,1,2,…,T, T – end time of simulation; Xi(t) – the value of the i concept (value from the range [0,1]), i=1,2,…,n; F(x) – sigmoid stabilizing function.

FCM as an intelligent system has the ability of learning of relations’ matrix based on real data. Below the idea of multi-step supervised learning of FCM was presented.

3. Multi-step supervised learning

Characteristic feature of multi-step supervised learning of FCM is the estimation of a current value of the relations’ matrix element on the basis of a few previous estimations, which can be achieved as follows [6, 7]:

(3)

where: ak, b l, h l – learning parameters (k=1,…,m1; l=1,…,m2); m1, m2 – the number of the steps of the algorithm; ΔJj,i(t) – gradient of error function; P[-1,1](x ) – operator design for the set [-1,1], described by the equation:

(4)

A special case of algorithm (3) is the known neural network learning algorithm (i.e. back propagation algorithm with the moment). Multi-step algorithms are some kind of generalization of known one-step methods of learning. Below multi-step supervised learning based on gradient method and real data was described.

3.1. Gradient method

Supervised learning based on gradient method is a modification of the weights in the direction of steepest descent of error function described by the equation [7]:

(5)

where: Zi(t) – the reference value of the i concept.

Reference values can be obtained through normalization of the real data as follows:

(6)

where: x – input numeric value; min – the minimum of the dataset, max – the maximum of the dataset.

Gradient of error function for the gradient method (3) is described with the equation [5]:

(7)

where: yj,i(t) – sensitivity function described as follows:

(8)

where: F’(x) – derivative of stabilizing function.

Learning parameters ak, b l, h l must satisfy conditions (9)–(12) to obtain the convergence of multi-step learning algorithm [6]:

(9)

(10)

(11)

(12)

A special case of multi-step supervised learning is one-step gradient method, which consists in modifying the relations’ matrix according to the formula:

(13)

Simulation analysis of the multi-step supervised learning was realized based on ISEMK system. Below basic functionality of ISEMK was presented.

4. ISEMK system

Intelligent expert system based on cognitive maps ISEMK [14, 15] is a software tool for modeling decision support systems using FCM. The application was developed using the Visual Studio by Microsoft. ISEMK enables:

• the construction of FCM,

• the initialization of values of relations’ matrix and map concepts based on expert knowledge or real data,

• reading and writing of FCM parameters using .xml files,

• dynamic monitoring of FCM,

• multi-step supervised and unsupervised learning of FCM,

• the analysis of designed learned FCM by testing system operation based on real data,

• exporting data of learning and FCM analysis to .xls files,

• proper visualizations of done research on devised computer software.

Fig. 1. Visualization of multi-step supervised learning results in the ISEMK system
Rys. 1. Wizualizacja wyników wielokrokowego uczenia nadzorowanego w systemie ISEMK

Fig. 1 shows an exemplary visualization of multi-step supervised learning results in the ISEMK system.

Fig. 2 shows an exemplary visualization of testing of the learned FCM operation in the ISEMK system.

Fig. 2. Visualization of testing of learned FCM operation in the ISEMK system
Rys. 2. Wizualizacja testowania działania nauczonej FCM w systemie ISEMK

5. Simulation analysis of fuzzy cognitive maps

Application of FCM was analyzed on the example of prediction of individual household electric power consumption. Below the system of prediction and chosen results of simulation analysis were presented.

5.1. System of prediction of individual household electric power consumption

The aim of the modeled system is prediction of individual household electric power consumption. Initialization, multi-step supervised learning and testing of the FCM were realized in ISEMK based on real data taken from Machine Learning Repository [3]. The dataset contains the measurements of electric power consumption obtained within 47 months. On the basis of normalized numerical data, the fuzzy cognitive map with the following concepts was implemented:

X1 – global_active_power: household global minute-averaged active power (in kilowatt),

X2 – global_reactive_power: household global minute-averaged reactive power (in kilowatt),

X3 – voltage: minute-averaged voltage (in volt),

X4 – global_intensity: household global minute-averaged current intensity (in ampere),

X5 – sub_metering_1: energy sub-metering No. 1 (in watt-hour of active energy),

X6 – sub_metering_2: energy sub-metering No. 2 (in watt-hour of active energy),

X7 – sub_metering_3: energy sub-metering No. 3 (in watt-hour of active energy).

The relations’ matrix was initialized with random values from the interval [–0.2, 0.2]. Fig. 3 presents the structure of the initialized FCM.

Fig. 3. Structure of the initialized FCM
Rys. 3. Struktura zainicjalizowanej FCM

The initialized FCM was learned using multi-step supervised learning for various parameters based on 1600 records with the measurements of electric power consumption. Another 100 records were used in testing of learned maps operation. Below, chosen results of learning end testing of the analyzed system were presented.

5.2. Chosen results of FCM learning

The initialized FCM learned with multi-step gradient method described in part 3. The learning process was realized for the number of steps: m1≤2, m2≤2. Figs. 4–6 show an example of the learning results for the following parameters: m1=0, m2=2, a0=1, a1=0, a2=0, b0=5, b1=3, b2=2, h0(0)=h1(0)=h2(0)=0.01.

Tab. 1. presents the relations’ matrix of the FCM learned with the following parameters: m1=1, m2=2, a0=0.7, a1=0.3, a2=0, b0=2, b1=2, b2=1, h0(0)=h1(0)=h2(0)=0.1.

Tab. 1. Exemplary relations’ matrix
Tab. 1. Przykładowa macierz relacji

X1

X2

X3

X4

X5

X6

X7

X1

0

–0.5

–0.3

–0.3

–0.7

–0.6

0

X2

–0.4

0

–0.4

–0.3

–0.7

–0.6

0.1

X3

–0.3

–0.4

0

–0.4

–0.6

–0.7

0

X4

–0.4

–0.5

–0.3

0

–0.6

–0.7

–0.1

X5

–0.2

–0.2

–0.1

–0.2

0

–0.4

0

X6

–0.2

–0.2

–0.1

–0.1

–0.5

0

0

X7

–0.5

–0.8

–0.3

–0.5

–0.9

–0.8

0

Fig. 4. Changes of the error function value during learning
Rys. 4. Zmiany wartości funkcji błędu w czasie uczenia

Fig. 5. Changes of the value of the concept X1 during learning
Rys. 5. Zmiany wartości czynnika X1 w czasie uczenia

Fig. 6. Changes of the value of the relation r1,3 during learning
Rys. 6. Zmiany wartości relacji r1,3 w czasie uczenia

5.3. Chosen results of FCM testing

This chapter contains results of the comparative analysis of multi-step algorithms of FCM learning to one-step methods, from the point of view of the obtained average percentage error of prediction for 100 test records, described as follows:

(14)

where: JP(t) – prediction error described by the formula:

(15)

Figs. 7–8 show an example of testing of the operation of FCM, that learned with the following parameters: m1=2, m2=2, a0=0.5, a1=0.3, a2=0.2, b0=5, b1=3, b2=2, h0(0)=h1(0)=h2(0)=0.01.

Fig. 7. Changes of the prediction error function value during testing
Rys. 7. Zmiany wartości funkcji błędu predykcji w czasie testowania

Fig. 8. Changes of the value of the concept X1 during testing
Rys. 8. Zmiany wartości czynnika X1 w czasie testowania

Tab. 2 presents chosen results of comparative analysis of error JP obtained by multi-step learning with error obtained by one-step gradient method for the following parameters: m1=0, m2=0, a0=1, a1=0, a2=0, b0=5, b1=0, b2=0, h0(0)=h1(0)=h2(0)=0.1 (simulation 1).

Prediction error equal to 3.011 % was obtained as a result of one-step gradient method (m1=0, m2=0). Increasing the steps number led to reduced average percentage prediction error. The error minimum equal to 2.983 % was obtained for the parameters: m1=1, m2=2, a0=0.7, a1=0.3, a2=0, b0=2, b1=2, b2=1, h0(0)=h1(0)=h2(0)=0.1.

Tab. 3 presents chosen results of comparative analysis of error JP obtained by multi-step learning with error obtained by one-step gradient method for the following parameters: m1=0, m2=0, a0=1, a1=0, a2=0, b0=10, b1=0, b2=0, h0(0)=h1(0)=h2(0)=0.01 (simulation 2).

Tab. 2. Used learning parameters and average percentage error of prediction for the simulation 1
Tab. 2. Zastosowane parametry uczenia i średni procentowy błąd predykcji dla symulacji 1

m1

m2

a0

a1

a2

b0

b1

b2

h0,1,2(0)

JP[%]

0

0

1

0

0

5

0

0

0.1

3.011

0

1

1

0

0

4

1

0

0.1

3.011

0

1

1

0

0

3

2

0

0.1

3.007

0

2

1

0

0

3

1

1

0.1

3.012

0

2

1

0

0

2

2

1

0.1

3.011

1

0

0.8

0.2

0

5

0

0

0.1

2.993

1

0

0.7

0.3

0

5

0

0

0.1

2.985

1

0

0.6

0.4

0

5

0

0

0.1

2.996

2

0

0.7

0.2

0.1

5

0

0

0.1

2.986

1

1

0.7

0.3

0

3

2

0

0.1

2.988

1

2

0.7

0.3

0

2

2

1

0.1

2.983

2

1

0.7

0.2

0.1

3

2

0

0.1

2.989

2

2

0.7

0.2

0.1

2

2

1

0.1

2.986

Tab. 3. Used learning parameters and average percentage error of prediction for the simulation 2
Tab. 3. Zastosowane parametry uczenia i średni procentowy błąd predykcji dla symulacji 2

m1

m2

a0

a1

a2

b0

b1

b2

h0,1,2(0)

JP[%]

0

0

1

0

0

10

0

0

0.01

3.793

0

1

1

0

0

8

2

0

0.01

3.792

0

1

1

0

0

6

4

0

0.01

3.789

0

2

1

0

0

6

3

1

0.01

3.789

0

2

1

0

0

5

3

2

0.01

3.789

1

0

0.8

0.2

0

10

0

0

0.01

3.734

1

0

0.6

0.4

0

10

0

0

0.01

3.714

2

0

0.6

0.3

0.1

10

0

0

0.01

3.713

2

0

0.5

0.3

0.2

10

0

0

0.01

3.711

2

1

0.5

0.3

0.2

6

4

0

0.01

3.707

1

2

0.6

0.4

0

5

3

2

0.01

3.711

2

2

0.5

0.3

0.2

5

3

2

0.01

3.707

0

0

1

0

0

10

0

0

0.01

3.793

Tab. 4. Used learning parameters and average percentage error of prediction for the simulation 3
Tab. 4. Zastosowane parametry uczenia i średni procentowy błąd predykcji dla symulacji 3

m1

m2

a0

a1

a2

b0

b1

b2

h0,1,2(0)

JP[%]

0

0

1

0

0

10

0

0

0.1

3.348

0

1

1

0

0

8

2

0

0.1

3.345

0

1

1

0

0

6

4

0

0.1

3.318

0

2

1

0

0

5

3

2

0.1

3.324

0

2

1

0

0

7

2

1

0.1

3.337

1

0

0.8

0.2

0

10

0

0

0.1

3.267

1

0

0.6

0.4

0

10

0

0

0.1

3.191

2

0

0.5

0.3

0.2

10

0

0

0.1

3.161

2

1

0.5

0.3

0.2

6

4

0

0.1

3.167

1

2

0.6

0.4

0

5

3

2

0.1

3.193

1

1

0.6

0.4

0

6

4

0

0.1

3.187

2

2

0.5

0.3

0.2

5

3

2

0.1

3.154

0

0

1

0

0

10

0

0

0.1

3.348

Prediction error equal to 3.793 % was obtained as a result of one-step gradient method (m1=0, m2=0). Increasing the steps number led to reduced average percentage prediction error. The error minimum equal to 3.707 % was obtained for the following parameters: m1=2, m2=1, a0=0.5, a1=0.3, a2=0.2, b0=6, b1=4, b2=0, h0(0)=h1(0)= =h2(0)=0.01 and m1=2, m2=2, a0=0.5, a1=0.3, a2=0.2, b0=5, b1=3, b2=2, h0(0)=h1(0)=h2(0)=0.01.

Tab. 4 presents chosen results of comparative analysis of error JP obtained by multi-step learning with error obtained by one-step gradient method for the parameters: m1=0, m2=0, a0=1, a1=0, a2=0, b0=10, b1=0, b2=0, h0(0)=h1(0)=h2(0)=0.1 (simulation 3).

Prediction error equal to 3.348 % was obtained as a result of one-step gradient method (m1=0, m2=0). Increasing the steps number led to reduced average percentage prediction error. The error minimum equal to 3.154 % was obtained for the parameters: m1=2, m2=2, a0=0.5, a1=0.3, a2=0.2, b0=5, b1=3, b2=2, h0(0)=h1(0)= =h2(0)=0.1.

Similar results were obtained in other simulations. It can be stated that the implementation of the multi-step technique enables higher accuracy of prediction by reduction of error JP.

6. Conclusion

This paper contains description of FCM and multi-step supervised learning based on gradient method and real data. Simulation analysis of FCM and multi-step algorithms was realized in ISEMK on the example of prediction of individual household electric power consumption. Learned system was tested from the point of view of prediction accuracy for 100 test records. Chosen results of simulations, that show sufficient effectiveness of modeling based on FCM, were presented. The advantage of the application of the multi-step technique is improvement of the operation of the analyzed system by reduction of prediction error. Moreover, there are plans of further development of multi-step algorithms, as possible generalization of known one-step methods of learning.

References

1. Douali N., Roo J.D., Papageorgiou E.I., Jaulent M.C., Case Based Fuzzy Cognitive Maps (CBFCMs: New method for medical reasoning, IEEE International Conference of Fuzzy Systems, 2011, 844–850.

2. Froelich W., Wakulicz-Deja A., Learning Fuzzy Cognitive Maps from the Web for Stock Market Decision Support System, [in:] Węgrzyn-Wolska K.M., Szczepaniak P.S. (eds.) Adv. In Intel. Web, ASC 43, Springer-Verlag, Heidelberg, 2007, 106–111.

3. [http://archive.ics.uci.edu/ml] – UCI Machine Learning Repository, Irvine, CA, University of California, School of Information and Computer Science – Dataset by Hébrail G. and Bérard A. (January 2013).

4. Iakovidis D.K., Papageorgiou E.I., Intuitionistic Fuzzy Cognitive Maps for Medical Decision Making, IEEE Transactions on Information Technology in Biomedicine, Vol. 15, No. 1, 2011, 100–107.

5. Jastriebow A., Gad S., Słoń G., Mapy kognitywne w monitorowaniu decyzyjnym, Studia i Materiały Polskiego Stowarzyszenia Zarządzania Wiedzą, Vol. 47, 2011, 64–77.

6. Jastriebow A.I., Grzywaczewski M., Gad S., Analysis of a certain class of discrete multidimensional system of extremal control, “Systems Analysis Modelling Simulation”, Vol. 24, 1996, 121–133.

7. Jastriebow A., Piotrowska K., Simulation analysis of multistep algorithms of relational cognitive maps learning, [in:] Jastriebow A., Kuźmińska-Sołśnia B., Raczyńska M. (eds.) Computer Technologies in Science, Technology and Education, Institute for Sustainable Technologies – National Research Institute, 2012, 126–237.

8. Jastriebow A., Słoń G., Logistyczne zastosowania modelu rozmytej relacyjnej mapy kognitywnej, „Logistyka” 3/2012, 2012, 879–886.

9. Kandasamy W.B.V., Smarandache F., Ilanthenral K., Elementary Fuzzy Matrix and Fuzzy Models For Social Scientists, AUTOMATON, Los Angeles, USA, 2007.

10. Kannappan A., Tamilarasi A., Papageorgiou E.I., Analyzing the performance of fuzzy cognitive maps with non-linear hebbian learning algorithm in predicting autistic disorder, “Expert Systems with Applications”, Vol. 38, 2011, 1282–1292.

11. Kosko B., Fuzzy cognitive maps, “Int. J. Man-Machine Studies“, Vol. 24, 1986, 65–75.

12. Papageorgiou E.I., Froelich W., Multi-step prediction of pulmonary infection with the use of evolutionary fuzzy cognitive maps, “Neurocomputing”, Vol. 92, 2012, 28–35.

13. Piotrowska K., Zastosowanie map kognitywnych w inteligentnych systemach wspomagania podejmowania decyzji, „Logistyka”, 6/2011, 3433–3442.

14. Piotrowska K., Implementacja inteligentnego systemu ekspertowego opartego na mapach kognitywnych, [in:] Jastriebow A., Kuźmińska-Sołśnia B., Raczyńska M. (red.), Technologie komputerowe w rozwoju nauki, techniki i edukacji, Wydawnictwo Naukowe Instytutu Technologii Eksploatacji – PIB, 2012, 91–101.

15. Piotrowska K., Inteligentny system ekspertowy oparty na mapach kognitywnych, „Zeszyty Naukowe Politechniki Śląskiej”, seria INFORMATYKA, Vol. 33, No. 2A (105), 2012, 605–616.

16. Siraj A., Bridges S.M., Vaughn R.B., Fuzzy Cognitive Maps for decision support in an intelligent intrusion detection system, [in:] IFSA World Congress and 20th NAFIPS International Conference, Vol. 4, 2010, 2165–2170.

17. Słoń G., Jastriebow A., Optimization and Adaptation of Dynamic Models of Fuzzy Relational Cognitive Maps, [in:] Kuznetsov S.O. et al. (eds.), Rough Sets, Fuzzy Sets, Data Mining and Granular Computing. Lecture Notes in Artificial Intelligence, Vol. 6743, Springer-Verlag, Heidelberg, 2011, 95–192.

18. Stach W., Kurgan L., Pedrycz W., Numerical and Linguistic Prediction of Time Series With the Use of Fuzzy Cognitive Maps, IEEE Transactions on Fuzzy Systems, Vol. 16, No. 1, 2008, 61–72.

19. Xiao Z., Chen W., Li L., An integrated FCM and fuzzy soft set for supplier selection problem based on risk evaluation, “Applied Mathematical Modeling”, Vol. 36, 2012, 1444–1454.

Analiza rozmytych map kognitywnych w predykcji zużycia energii elektrycznej przez gospodarstwo domowe

Streszczenie: Praca poświęcona jest analizie symulacyjnej zastosowania rozmytej mapy kognitywnej (FCM) w predykcji zużycia energii elektrycznej przez gospodarstwo domowe. Opisano rozmyte mapy kognitywne oraz wielokrokowe uczenie nadzorowane oparte na metodzie gradientowej i rzeczywistych danych. Przy pomocy opracowanego środowiska ISEMK (inteligentny system ekspertowy oparty na mapach kognitywnych) zaimplementowano model systemu predykcji zużycia energii elektrycznej przez gospodarstwo domowe. Przeprowadzono badania symulacyjne wielokrokowego uczenia oraz testowania działania rozmytej mapy kognitywnej na podstawie rzeczywistych danych. Przedstawiono wybrane wyniki symulacji.

Słowa kluczowe: rozmyte mapy kognitywne, system predykcji, wielokrokowe uczenie nadzorowane, metoda gradientowa

Prof. Aleksander Jastriebow, DSc

Prof. Aleksander Jastriebow, DSc, is Professor at Dept. of Computer Science Applications at the Kielce University of Technology and the Kazimierz Pulaski University of Technology and Humanities in Radom. He is a specialist in the field of mathematics and applied informatics. He is author and coauthor of more than 250 scientific papers. His research interests include automation, informatics, diagnostics and artificial intelligence.

e-mail: a.jastriebow@tu.kielce.pl

Katarzyna Piotrowska, MSc

Katarzyna Piotrowska is assistant at Dept. of Computer Science Applications at the Kielce University of Technology. She is author and coauthor of 8 scientific papers. Her research interests include expert systems, fuzzy cognitive maps, machine learning and decision support systems.

e-mail: k.piotrowska@tu.kielce.pl