Sie sind auf Seite 1von 44

Novel Fuzzy Approach to Time Series

Analysis and Prediction


epnicka, Viktor Pavliska, Vilem Novak, Irina
Martin St
Perfilieva, Antonn Dvorak
Institute for Research and Applications of Fuzzy Modeling
University of Ostrava, 30. dubna 22, Ostrava 1
martin.stepnicka@osu.cz

Employed methods

Time Series

Outline

Employed methods

Time Series

Forecasting

Results and Conclusions

Forecasting

Results and Conclusions

Employed methods

Time Series

Outline

Employed methods

Time Series

Forecasting

Results and Conclusions

Forecasting

Results and Conclusions

Employed methods

Time Series

Forecasting

Results and Conclusions

Basic Principles

Fuzzy transform (F-transform)

Basic principle
The time series is mapped to another space where one basic
characteristics prevails
Perception-based logical deduction (PbLD)

Basic principle
The conclusion is obtained on the basis of linguistically formulated
knowledge and linguistically characterized observation

Employed methods

Time Series

Forecasting

Results and Conclusions

Basic Principles

Fuzzy transform (F-transform)

Basic principle
The time series is mapped to another space where one basic
characteristics prevails
Perception-based logical deduction (PbLD)

Basic principle
The conclusion is obtained on the basis of linguistically formulated
knowledge and linguistically characterized observation

Employed methods

Time Series

Forecasting

Results and Conclusions

Fuzzy Partition A1 , . . . , An
%

%R

%







%






%


%R







 %






%R

%












Fuzzy partition is defined formally without precise specification of


shapes of fuzzy sets

Employed methods

Time Series

Forecasting

Results and Conclusions

Fuzzy Transform in Steps


Direct Fuzzy Transform of f -- [F1,F2,...,Fn]
y

Fn-1

Fn

Fk
a

Fk-1

x
F2

A1

A2

Function to Vector
Original function f : [a, b] [c, d]
Transformation:

x A1 A2
Fn,f F1 F2
Result: Fn,f = [F1 , . . . , Fn ]
f

b
b

F1

An
Fn

Ak

An

Employed methods

Time Series

Forecasting

Results and Conclusions

Fuzzy Transform in Steps


Direct Fuzzy Transform of f -- [F1,F2,...,Fn]
y

Fn-1

Fn

Fk
a

Fk-1

x
F2

A1

A2

Function to Vector
Original function f : [a, b] [c, d]
Transformation:

x A1 A2
Fn,f F1 F2
Result: Fn,f = [F1 , . . . , Fn ]
f

b
b

F1

An
Fn

Ak

An

Employed methods

Time Series

Forecasting

Results and Conclusions

Fuzzy Transform in Steps


Direct Fuzzy Transform of f -- [F1,F2,...,Fn]
y

Fn-1

Fn

Fk
a

Fk-1

x
F2

A1

A2

Function to Vector
Original function f : [a, b] [c, d]
Transformation:

x A1 A2
Fn,f F1 F2
Result: Fn,f = [F1 , . . . , Fn ]
f

b
b

F1

An
Fn

Ak

An

Employed methods

Time Series

Forecasting

Results and Conclusions

Direct Fuzzy (F)-Transform


Assumptions
f (x) C[a, b] continuous on [a, b],
A1 (x), . . . , An (x) fuzzy partition of [a, b].

Definition
A vector of real numbers [F1 , . . . , Fn ] is the F-transform
of f w.r.t. A1 (x), . . . , An (x) if
Rb
Fk =

f (x)Ak (x)dx
Rb
a Ak (x)dx

Notation: Fn,f = [F1 , . . . , Fn ]

Employed methods

Time Series

Forecasting

Results and Conclusions

Direct Fuzzy (F)-Transform


Assumptions
f (x) C[a, b] continuous on [a, b],
A1 (x), . . . , An (x) fuzzy partition of [a, b].

Definition
A vector of real numbers [F1 , . . . , Fn ] is the F-transform
of f w.r.t. A1 (x), . . . , An (x) if
Rb
Fk =

f (x)Ak (x)dx
Rb
a Ak (x)dx

Notation: Fn,f = [F1 , . . . , Fn ]

Employed methods

Time Series

Forecasting

Results and Conclusions

F-Transform Components
y

f(x)
b

Fk

Fk =

f ( x ) Ak ( x )dx
a

Ak ( x )dx
a

Ak

Employed methods

Time Series

Forecasting

Results and Conclusions

The Least Weighted Square Mean Property

The Least Weighted Square Mean Property


Fk the k-th component of the F-transform gives minimum
to the following criterion:
Z
(y) =
a

(f (x) y)2 Ak (x)dx

Employed methods

Time Series

Forecasting

Results and Conclusions

Discrete F-Transform
Definition
The vector of real numbers [F1 , . . . , Fn ] is a discrete F-transform
of f given at points x1 , . . . , xl [a, b] w.r.t. A1 (x), . . . , An (x) if
Pl
Fk =

j=1 f (xj )Ak (xj )


.
Pl
j=1 Ak (xj )

The Least Weighted Square Mean Property


Fk the k-th component of the F-transform gives minimum
to the following criterion :
(y) =

l
X
j=1

(f (pj ) y)2 Ak (pj )

Employed methods

Time Series

Forecasting

Results and Conclusions

Discrete F-Transform
Definition
The vector of real numbers [F1 , . . . , Fn ] is a discrete F-transform
of f given at points x1 , . . . , xl [a, b] w.r.t. A1 (x), . . . , An (x) if
Pl
Fk =

j=1 f (xj )Ak (xj )


.
Pl
j=1 Ak (xj )

The Least Weighted Square Mean Property


Fk the k-th component of the F-transform gives minimum
to the following criterion :
(y) =

l
X
j=1

(f (pj ) y)2 Ak (pj )

Employed methods

Time Series

Forecasting

Results and Conclusions

Inverse F-Transform

Definition
Let [F1 , . . . , Fn ] be the F-transform of f w.r.t. A1 , . . . , An
P
fF,n (x) = nk=1 Fk Ak (x) is called the inverse F-transform

Employed methods

Time Series

Forecasting

Results and Conclusions

Inverse Fuzzy Transform. Illustration

Direct Fuzzy Transform of f -- [F1,F2,...,Fn]


y

Fn-1

Fn

Fk
a

Fk-1

b
b

F1
A1 A
2

F2
Ak

An

Employed methods

Time Series

Forecasting

Results and Conclusions

Inverse Fuzzy Transform. Illustration


n

Inverse Fuzzy Transform of f --

F A ( x)
k k

k =1

Fn-1

Fn

Fk
a

Fk-1

b
b

F1
A1 A
2

F2
Ak

An

Employed methods

Time Series

Forecasting

Perception-based logical deduction


Fuzzy IF-THEN rule
IF X is A THEN Y is B
A, B Evaluative linguistic expressions
small, very small, roughly medium, extremely big
Linguistic description R
IF X is A1 THEN Y is B1
IF X is A2 THEN Y is B2
........................
IF X is Am THEN Y is Bm

Results and Conclusions

Employed methods

Time Series

Forecasting

Perception-based logical deduction


Fuzzy IF-THEN rule
IF X is A THEN Y is B
A, B Evaluative linguistic expressions
small, very small, roughly medium, extremely big
Linguistic description R
IF X is A1 THEN Y is B1
IF X is A2 THEN Y is B2
........................
IF X is Am THEN Y is Bm

Results and Conclusions

Employed methods

Time Series

Forecasting

Results and Conclusions

Shape of fuzzy sets

Fuzzy sets employed in the PbLD


Small

Medium

Big

Very small

vL

DEE(Small)

DEE(Very small)

vC
DEE(Medium)

vR
DEE(Big)

Employed methods

Time Series

Forecasting

Results and Conclusions

PbLD Steps

pre-selection - choosing the most fitting rule(s) (the most


specific one within the set of most fired ones)

applying the Lukasiewicz residuum

defuzzification by a particular method DEE

Linguistic learning algorithm for learning fuzzy rule bases


appropriate for the PbLD from a given data is implemented in
LFLC.

Employed methods

Time Series

Outline

Employed methods

Time Series

Forecasting

Results and Conclusions

Forecasting

Results and Conclusions

Employed methods

Time Series

Forecasting

Results and Conclusions

Time series
Series xt where t = 1, . . . , N
Time Series
6000
5800
5600
5400
5200
5000
4800
4600
4400
Time Series
4200
4000
1

15

22

29

36

43

50

57

64

71

78

85

92

99

106 113 120

Employed methods

Time Series

Forecasting

Results and Conclusions

Standard approaches

Box-Jenkins methodology: e.g. ARMA(p,q)


xt = c + t +

p
X
i=1

i xti +

q
X

i ti

i=1

1 , . . . , p - autoregressive model parameters


1 , . . . , q - moving average model parameters
- noise terms
How to interpret the process? How to understand it?

Employed methods

Time Series

Forecasting

Standard approaches

Decomposition
Trend component
Cycle component
Seasonal component
Error (random, non-stochastic, noise) component
xt = T rt + Ct + St + Et
xt = T rt Ct St Et

Interpretable, but less powerful.

Results and Conclusions

Employed methods

Time Series

Forecasting

Results and Conclusions

Decomposition

Components
Et - error is random (hard to analyze, impossible to forecast

and therefore omitted)


Ct - cycles are irregular, some simple model omit them as well

xt = T rt + St

(1)

T rt - a predefined function (linear, polynomial, exponential,

saturation etc.)
St - computed from (1) as St = xt T rt

Employed methods

Time Series

Forecasting

Results and Conclusions

Predefined trend function?


Which function should be used to model the trend?
Time Series
6000
5800
5600
5400
5200
5000
4800
4600
4400
Time Series
4200
4000
1

15

22

29

36

43

50

57

64

71

78

85

92

99

106 113 120

May we afford to forecast trend values just by prolongation of the


chosen trend function? How to avoid cyclic influences to the
seasonal component?

Employed methods

Time Series

Forecasting

Results and Conclusions

Decomposition

Suggested approach
We do not assume any trend function
We do not omit cycles
Time series is viewed as a discrete function x known at nodes

t {1, . . . , T }
We model the trend-cycle by the inverse F-transform xF,n of x
The goal is not to predict the trend, but to obtain pure

seasonal components

Employed methods

Time Series

Forecasting

Trend-cycle by the inverse F-transform

Results and Conclusions

Employed methods

Time Series

Forecasting

Results and Conclusions

Step-by-Step procedure

Interval [1, T ] is partitioned by basic functions Ai (each

usually covering one season - 12 values in case of monthly


time series)
Direct F-transform Fn [x] = [X1 , . . . , Xn ] and the inverse one

xF,n is determined
Time series is decomposed to xt = xF,n (t) + St
Seasonal components are determined St = xt xF,n (t)

Employed methods

Time Series

Outline

Employed methods

Time Series

Forecasting

Results and Conclusions

Forecasting

Results and Conclusions

Employed methods

Time Series

Forecasting

Results and Conclusions

Trend-cycle

Direct F-transform components X1 , . . . , Xn and their 1st and

2nd order differences are considered:


Xi = Xi Xi1 ,
2

Xi = Xi Xi1 ,

i = 2, . . . , n
i = 3, . . . , n

Logical dependencies between them are automatically explored

and fuzzy rules generated - use of the linguistic learning


algorithm

Employed methods

Time Series

Forecasting

Results and Conclusions

Trend-cycle

As a result, we obtain a linguistic description consisting of fuzzy


rules:
IF Xi1 is Ai1 AND Xi is Ai THEN Xi+1 is B

The linguistic description describing patterns of the process is used


to forecast Xn+1 , . . . , Xn+`

Employed methods

Time Series

Forecasting

Results and Conclusions

Trend-cycle

... too many xT +1 , . . . , xT +k to forecast (too high k) more than


one component Xn+1 , . . . , Xn+` has to be predicted
Forecasting from forecasted problem!
Independent models
We follow the idea of Weizhong Yan (NN3 Competition)
We construct ` independent models (linguistic description)
Every j-th model describes (and forecasts) j steps ahead

Employed methods

Time Series

Forecasting

Results and Conclusions

Seasonal Component Forecast


Vectors of the seasonal components

Sn = [Sp(n1) , Sp(n1)+1 , . . . , Sp(n1)+p1 ]


p - period of seasonality (p = 12)
Stationarity assumption
Finding the optimal solution of the following system of

equations (w.r.t. coefficients d1 , . . . , d )


Sn =

dj Snj ,

n>

j=1

Using the computed coefficients to determine the Sn

Employed methods

Time Series

Forecasting

Results and Conclusions

Optimization and Composition


Repeat:
1

Inputs and outputs of linguistic description chosen

Linguistic description(s) are learned

From forecasted components Xn+1 , . . . , Xn+` the inverse


F-transform values xF,n+` (T + 1), . . . , xF,n+` (T + k) are
determined

For some , the seasonal components ST +1 , . . . ST +k are


computed

Seasonal components are added to the trend-cycle (inverse


F-transform) xT +j = xF,n+` (T + j) + ST +j , j = 1, . . . , k

Composed forecast is evaluated on a cut-off validation set

Employed methods

Time Series

Outline

Employed methods

Time Series

Forecasting

Results and Conclusions

Forecasting

Results and Conclusions

Employed methods

Time Series

Forecasting

Results and Conclusions

Original Goals
Up to now, fuzzy approaches usually employed:
Takagi-Sugeno rules (more regression than linguistically based

- lack of transparency and interpretability)


(evolving) neuro-fuzzy systems (after tuning, sometimes fuzzy

sets such as About 5.6989 used)


Fuzzy ARIMA - the same problem

Our goals:
1 to come up with a purely linguistic fuzzy approach for the
interpretability and transparency
2

to keep precision of forecasts comparable with standard


approaches

Employed methods

Time Series

Forecasting

Results and Conclusions

Results
NN3 competition (Sven Crone) - 111 (and 11) time series from the
INDUSTRY (monthly) subset of M3 competition
NN3 competition - 11 time series features
The best result: SMAPE = 13,68%
The worst (45th) result: SMAPE = 67,38%
X12 ARIMA: SMAPE = 21,48%
Statistical commercial software ForecastPror : Error = 13,59%
We took the 21st rank: SMAPE = 19,77%

After latest improvements (such as independent models etc.) we


reach ...

Employed methods

Time Series

Forecasting

Results and Conclusions

Latest Results
Time series
N2071 (NN3
N2088 (NN3
N2090 (NN3
N2148 (NN3
N1918 (NN3
N1987 (NN3
N2076 (NN3
N2190 (NN3
N2057 (NN3
N2093 (NN3
N2097 (NN3
Average

101)
102)
103)
104)
105)
106)
107)
108)
109)
110)
111)

Suggested approach
2.11459%
14.8581%
42.3757%
5.68634%
3.18415%
4.93101%
6.27096%
27.8564%
8.99063%
30.6653%
13.0289%
14.542%

ForecastPror
2.461%
22.011%
24.401%
8.894%
2.503%
4.231%
4.684%
31.633%
7.213%
29.351%
12.217%
13.599%

Employed methods

Time Series

Forecasting

Results and Conclusions

Latest Results
Time series
N2071 (NN3
N2088 (NN3
N2090 (NN3
N2148 (NN3
N1918 (NN3
N1987 (NN3
N2076 (NN3
N2190 (NN3
N2057 (NN3
N2093 (NN3
N2097 (NN3
Average

101)
102)
103)
104)
105)
106)
107)
108)
109)
110)
111)

Suggested approach
2.11459%
14.8581%
42.3757%
5.68634%
3.18415%
4.93101%
6.27096%
27.8564%
8.99063%
30.6653%
13.0289%
14.542%

ForecastPror
2.461%
22.011%
24.401%
8.894%
2.503%
4.231%
4.684%
31.633%
7.213%
29.351%
12.217%
13.599%

Employed methods

Time Series

Forecasting

Results and Conclusions

Latest Results
Time series
N2071 (NN3 101)
N2088 (NN3 102)
N2148 (NN3
N1918 (NN3
N1987 (NN3
N2076 (NN3
N2190 (NN3
N2057 (NN3
N2093 (NN3
N2097 (NN3
Average

104)
105)
106)
107)
108)
109)
110)
111)

Suggested approach
2.11459%
14.8581%
5.68634%
3.18415%
4.93101%
6.27096%
27.8564%
8.99063%
30.6653%
13.0289%
11.759%

ForecastPror
2.461%
22.011%
8.894%
2.503%
4.231%
4.684%
31.633%
7.213%
29.351%
12.217%
12.520%

Employed methods

Time Series

Forecasting

Thanksgiving slide

Thank you very much for your attention

Results and Conclusions

Das könnte Ihnen auch gefallen