Engineering Letters, 20:1, EL_20_1_11
______________________________________________________________________________________
A Hybrid Fuzzy Time Series Model for
Forecasting
Saima Hassan, Jafreezal Jaafar, Brahim B. Samir, Tahseen A. Jilani
Abstract – Researchers are finding their way to solve the chaotic A hybrid model can increase the chance to capture different
and uncertain problems using the extensions of classical fuzzy patterns in data and improve forecasting accuracy. In addition,
model. At present Interval Type-2 Fuzzy logic Systems (IT2-FLS) the hybrid model is more robust with regard to the change in
are extensively used after the thriving exploitation of Type-2 data. It has been revealed from empirical studies that the
FLS. Fuzzy time series models have been used for forecasting hybrid models outperform than the individual models [1] [6]
stock and FOREX indexes, enrollments, temperature, disease
diagnosing and weather. In this paper an integrated fuzzy time
[7].
series model based on ARIMA and IT2-FLS is presented. The Being nonlinear, the fuzzy logic systems (FLS) have also
propose model will use ARIMA to select appropriate coefficients been mixed with time series models [4] [8] [9] to handle
from the observed dataset. IT2-FLS is utilized here for linguistic chaos and ambiguity present in data. Since the
forecasting the result with more accuracy and certainty. introduction of FLS, it has successfully been applied to a lot of
time series problems including stock and FOREX indexes [10]
Index Terms—Type-1 Fuzzy sets (T1-FS), Type-2 Fuzzy sets [11] [12] [13], enrollments [14] [15] [4], temperature [16],
(T2-FS), Fuzzy Logic System (FLS), Interval Type-II Fuzzy Logic
weather forecasting [17] [18] [6] [5], and disease diagnosing
Systems (IT2-FLS), Autoregressive Integrated Moving Average
(ARIMA) models, Time Series Forecasting. [19].
Researchers are finding their way to solve the chaotic and
I. INTRODUCTION uncertain problems using the extensions of classical fuzzy
model. After the thriving exploitation of Type-2 FLS,
T
raditionally, time series forecasting problems are being currently, Interval Type-2 Fuzzy logic Systems (IT2-FLS) are
solved using a class of Autoregressive moving average being extensively used in hybrid models [6] [20] [21]. The
models. Being linear statistical models, they cannot build non-interval secondary membership function of a general
relationship among the nonlinear variables/factors. Calculating Type 2 Fuzzy sets (T2-FS) made it computationally more
the parameters for multi-variables is another issue faced by complex. While IT2 Fuzzy Sets are enjoying the center stage
them. The strong relationship among these variables may these days because of the non fuzziness of its secondary
result in large errors. Furthermore a model cannot be function [22] [23] [24]. The ability to deal with different
estimated correctly if the historical data is less. Handling the sources of information (such as process data as well as expert
irregularity and uncertainty of real data are some more issues knowledge) and nonlinearities, in a straightforward manner,
concerning to this group of models. Several statistical makes the approach more suitable for modeling hybrid model
nonlinear models have been developed to overcome these for forecasting. Keeping this in view, the author in this paper,
limitations of linear models [1]. Because these models are is presenting a hybrid fuzzy time series model. Based on
developed for specific nonlinear patterns, they are not capable ARIMA and Interval Type-2 Fuzzy Inference System (IT2-
of modeling other types of nonlinearity in time series [2]. FIS) the proposed model will improve the forecasting result by
Consequently the researchers adopted hybrid approach i.e. handling the measurement and parametric uncertainties of
mixing of two or more than two models to improve the ARIMA model using Fuzzy approach.
accuracy of the forecasted result [3] [4] [5]. A hybrid
approach of linear and nonlinear models was adopted in [2] The rest of the paper is organized as follow. In section 2, a
for taking benefits of both the models. brief literature review on time series forecasting techniques is
described. Section 3 and 4 consists of a short overview of
Saima Hassan is currently a research student at Department of Computer ARIMA models and IT2-FIS respectively. A hybrid model is
and Information Sciences, UTP. Malaysia and is a faculty member at Institute
of Information Technology, KUST, Kohat, Pakistan (corresponding author proposed in section 5 and future work is given in section 6.
phone: +6-10-4631749; e-mail: [email protected]).
Jafreezal Jaafar is Deputy Head (Academic)/Senior Lecturer at Department of II. LITERATURE REVIEW
Computer and Information Sciences.UTP, Malaysia. (Corresponding author
phone: +6-05-3687404; e-mail: [email protected]). Forecasting is a systematic way of anticipating future events
Brahim Belhaouari Samir is a Senior Lecture at Fundamental & Applied and situations by estimating the past value of a variable(s).
Sciences Dept. UTP, Malaysia.([email protected]) The management and scheduling done by forecasting helps to
T. A. Jilani is an Assistant Professor at Department of Computer Science,
UoK, Karachi, Pakistan. ([email protected])
cope with uncertain situations of the future. Fuzzy time series
is used to handle those forecasting problems where numerical
(Advance online publication: 27 February 2012)
Engineering Letters, 20:1, EL_20_1_11
______________________________________________________________________________________
as well as linguistic information related to them is available. worst data set with new ones. The developed Neuro-Genetic
Thus, fuzzy time series forecasting not only covers the structure involves complex computation and to attain
statistical flavor but also the linguistic chaos analysis as well. simplicity in such a model, an efficient algorithm(s) should be
The idea of fuzzy time series based on the historical explored.
enrollments of the University of Alabama is practiced in [14].
A heuristic model of fuzzy time series model has been III. A BRIEF OVERVIEW OF AUTO REGRESSIVE
INTEGRATED MOVING AVERAGE (ARIMA)
developed to improve forecasting [25]. The heuristic helped
out the moving trend which supports forecasting without Time series is a unique sequence of data taken at a specific
affecting the fuzzy relationships i.e. the improvement in interval of time. This data may be stationary or non-stationary.
forecasting result is achieved by introducing heuristic rules. The data must first be made stationary by numerous methods,
The model is applied on only one variable where it can be as forecasting cannot be done with data comprising non-
applied on more heuristic variables. Weighted models are stationary behavior. ARIMA is a non-stationary model that
proposed in [11] to resolve the recurrence and weighting can be reduced to a stationary time series by differencing. The
issues in fuzzy time series forecasting. These models model has three components i.e. Autoregressive, Integrated
demonstrate similarity to the weight functions in local and Moving Average.
regression models; though, both are dissimilar. The local
regression models concentrated on fitting using a small
portion of the data, whilst the weighted fuzzy time series ARIMA (p, d, q)
models established fuzzy relationships using the promising
data from the entire database. Two new multivariate fuzzy
time series forecasting methods are presented in [3]. These
methods assume m-factors with one significant main factor.
Stochastic fuzzy dependence of order k is presumed to define
general methods of multivariate fuzzy time series forecasting Order of MA
Order of AR
and control. A refined fuzzy time series model with improved
defuzzification model is presented in [9] for stock exchange
forecasting. Results with better accuracy were obtained by
proposing a heuristic approach of fuzzy metric. Order of differencing
ARIMA, a popular statistical time series model is integrated
with fuzzy regression model in [10] for forecasting the foreign
Fig. 1. A General View of ARIMA models.
exchange market. It is deduced from the results that it takes
less observation to estimate a model than ARIMA. The
A time-series is generated by an ARIMA , , if
forecasted results were made good by narrowing the fuzzy
interval (Upper and lower bound). When fuzzy intervals were
1 (1)
wide deleting its upper or lower bound the interval were made
narrow. This gave better performance. However deleting the where 1 ⋯ and
bounds may cause incomplete or missing interval/data. T2- 1 ⋯
FLS is applied to forecast Mackay-Glass time series [19].
Using T1-FLS, a T2-FLS is formed by incorporating noise are polynomials in L of degree p and q, L is the backward shift
information. The FLSs were designed on a single realization operator, p, d, q are integers, denotes the observed value of
for practice. However, for different realizations of same data time-series data, 1, 2, … , , and time-series data are the
set, different FLSs parameters must be choose to obtain observations.
improved forecasting [19]. A novel hybridization model based Being one of the best forecasting model, it can be best
on ARIMA and of soft computing methods such as Neural illustrated by Box-Jenkins [27] four steps i.e.
networks and evolutionary algorithm is explored in [26]. 1) Identification finds the appropriate value of
Fuzzy IF-THEN rules were evaluate by mamdani-Assilian differencing . Practically, one or two levels of
technique and implemented by an evolutionary algorithm to differencing are sufficient to make the time series
determine the model structure. Unusually this attention- stationary.
grabbing technique used the rules to select the best method 2) Estimation of the unknown model parameters.
instead of time series forecasting. 3) Diagnostic statistics help to judge the adequacy of the
Reference [6] integrated ANFIS and an Evolution model.
Optimizer to synchronize a First-order Interval Type 2 Takagi- 4) Forecasting from the selection mode.
Sugeno-Kang (IT2TSK) Fuzzy Logic System (FLS) to a
hybrid model. Neuro-Evaluative IT2 TSK model has IV. AN OVERVIEW OF INTERVAL TYPE 2 FUZZY LOGIC SETS
independent, normal distributed, uncorrelated and smaller AND SYSTEMS (IT2-FS AND IT2-FLS)
residuals than other methods. It is observed as a good The T2-FS are described by membership functions that are
forecaster but in-depth search is required for replacing the characterized by more parameters than the T1-FS. Hence, the
(Advance online publication: 27 February 2012)
Engineering Letters, 20:1, EL_20_1_11
______________________________________________________________________________________
T2-FS provide us with more design degree of freedom for A. The proposed model will consists of the following steps
handling uncertainties. IT2-FS are a limited version of the 1) Identification and parameters estimation
generalized T2-FS where the secondary membership grade is 2) Fuzzification of the estimated coefficients
always 1. This limitation allows IT2-FS to be processed a 3) Mapping of IT2-FS input into IT2-FS output
great deal more quickly than generalized T2-FS. An IT2-FLS 4) Defuzzify the forecasted result.
is quite similar to a T1-FLS [20] [28] instead with the
defuzzifier block where it is replaced by the output processing Identification and parameters estimation
block in an IT2-FLS. The output processing block of IT2-FLS The observed time series data must first be transformed into
consists of a type-reduction followed by defuzzification block. a reduced data set since dealing with large data requires high
It can be thought of as a T1-FS with a blurred membership processing power and large amount of memory. The main
function. Uncertainty in the primary membership of an IT2-FS tools in identification the ARIMA parameters are the
consists of a bounded area that is called the “footprint of autocorrelation function (ACF), the partial autocorrelation
uncertainty” (FOU). The FOU allows for the graphical function (PACF), and the resulting correlogram, which is
depiction of an IT2-FS in two dimensions instead of three simply the plots of ACF and PACF against the lag length [27].
dimensions. Now the stationary time series based on these functions may
An IT2 FS can be defined as identify more than one model. An optimum model will be
selected using statistical estimation such as the Akaike’s
Definition: A T2-FS denoted by will be an IT2-FS, when all
Information Criterion (AIC) or the Bayesian Information
membership functions , 1, where ∈ and ∈
Criterion (BIC) [27] [29].
_ ⊆ 0, 1 , i.e.
Fuzzification of the estimated coefficients
, , 1 | ∈ , ∈ , ⊆ 0,1 ,
The parameters of ARIMA , … , and , … , are
crisp. Instead of using crisp, fuzzy parameters, , … , and
can also be expressed as
, … , in the form of triangular fuzzy numbers [10] will be
1/ , , ⊆ 0, 1 , used. The fuzzy , , model is described by a
∈ ∈
fuzzy function with fuzzy parameters; then Eq. (1) becomes:
V. PROPOSED MODEL BASED ON IT2-FLS AND ARIMA
(2)
MODELS
To develop the interval Type-2 Fuzzy ARIMA (IT2- 1 (3)
FARIMA) model the methodology used in [2] will be adopted.
…
In which a time series is supposed to be composed of a linear
autocorrelation structure and a nonlinear component as … (4)
follows:
Where are observations, , … , and , … , are fuzzy
numbers respectively. Eq. (4) can be modified as
Where is the actual time series, and are the linear
…
and nonlinear components respectively. ⋯ (5)
ARIMA coefficients Crisp output
Fuzzifier Rules Defuzzifier
IT1 FS
Inference Type-Reducer
IT2 FS IT2 FS
Output Processing Block
Fig. 2. Proposed IT2FS based Model
(Advance online publication: 27 February 2012)
Engineering Letters, 20:1, EL_20_1_11
______________________________________________________________________________________
Fuzzy paratmeters in the form of triangular fuzzy numbers will
be used:
1
0 ,
Where is the membership function of the fuzzy sets
that represents parameters , as the center of the fuzzy
numbers, and ci is the width or spread around the center of the
fuzzy number.
Mapping of IT2-FS input into IT2-FS output
Let be an IT2 triangular fuzzy function then
: → 2 with ⊆ 2 will be
mapping between IT2 triangular fuzzy numbers (IT2FN) [21]. Fig. 3. Shows limitation of ARIMA when small dataset is used.
Takagi-Sugeno-Kang Interval Type-2 Fuzzy Inference System
[30] will be used for the design of proposed model, which is
better than Mamdani’s model [31] in the sense that it reduces
the number of required rules.
Defuzzify the forecasted result
Among various type-reduction methods the output will be
reduced by using the Center of Sets type-reduction. As it has
reasonable computational complexity that lies between the
computationally expensive centroid type-reduction and the
simple height and modified height type-reductions which have
problems when only one rule fires [32]. Type-reduction
technique extracts an interval for the output value from the
uncertain region. At the end, the type-reduced IT1-FS output
will be defuzzified by taking the average of two end-points to
get a crisp value.
B. Problems that can be handled with the proposed Model Fig. 4. Shows limitation of ARIMA when snall dataset is used.
1) Less Historical Observations
One of the limitations of ARIMA model is that it cannot
create accurate result if the observed data is too small. But
sometimes in short term forecasting, the historical data may
have less values [18]. In Fig.4, the graph has been built with
22 observations and it can be seen that even after first
differencing, the result is not satisfactory, (see Fig.5). At first
differe the graph become stationary at mean but still without
constant variability (Non-homoscedastic). In such a situation
the model cannot estimate the accurate coefficients, resulted in
parameter uncertainity.
2) Missing Data
The second issue is of handling the missing data (see Fig.
6). In practical, missing data occurs frequently due to the non-
functionality of the acquisition. Fig. 5. Shows limitation of ARIMA when missing values are
present in the dataset.
3) Sequence for Hybrid Model
Models are hybridized for the purpose of obtaining In [10] the Artificial Neural network is combined with
improved results than the individual. Since the real time series Fuzzy Inference System to produce a hybrid ANFIS model for
data contain linear and non linear patterns, the best approach forecasting. Both the models are non-linear. The same data
would be the combination of linear and non linear model. The were used by ARIMA
resulted single model would be able to deal with both types of
relationships.
(Advance online publication: 27 February 2012)
Engineering Letters, 20:1, EL_20_1_11
______________________________________________________________________________________
TABLE 1 VI. FUTURE WORK
COMPARIS of ANFIS and ARIMA The proposed model is considering the observations of a
single time series. The model can be extended to accept more
MAE RMSE
than one factors affecting forecasting. Furthermore, different
ANFIS ARIMA ANFIS ARIMA
parameter optimization methods can be used to select the best
model parameter. These optimization procedures include
Training 1.2552 1.523 1.6312 2.075 evolutionary techniques and particle swarm intelligence
data techniques that will make the model more efficient. Uses of
fuzzy models are more transparent than neural networks,
Test data 1.3212 1.178 1.7176 1.0709 which make them useful in applications where transparency is
required [33]. It is therefore of interest to investigate the use of
2, 1, 1 model to evaluate performance criteria. It is evidence fuzzy logic in hybrid modeling.
from the result that ARIMA performed well at testing data
where the performance of the ANFIS model was good in ACKNOWLEDGMENT
training data. The authors would like to thank Dr. Professor Oscar
At feature extraction linear models perform well [12], Castillo for his valuable comments and suggestion that have
where as in ANFIS model it is done by non linear model. That made the paper a publish work.
is the reason that testing data done by ARIMA gave good
REFERENCES
results as compared to ANFIS. Another weakness of ANFIS is
[1] M. Khashei, et al., "Improvement of Auto-Regressive Integrated Moving
its complex computations. Average model susing Fuzzy logic and Artificial Neural Networks
The performance comparisons of ANFIS and ARIMA (ANNs)," Neurocomputing, vol. 72, pp. 956-967, 2009.
models is done on Mean Absolute Error (MAE), Root Mean [2] G. P. Zhang, "Time series forecasting using a hybrid ARMA and neural
network model," Neurocomputing vol. 50, pp. 159–175, 2003.
Squared Error (RMSE), and Coefficient of Determination [3] T. A. Jilani and S. Burney, "Multivariate stochastic fuzzy forecasting
(R2).are shown below models," Expert Systems with Applications, vol. 35, pp. 691–700, 2008.
[4] S.-M. Chen and N.-Y. Chung, "Forecasting Enrollments of Students by
C. Research Approach for handling these problems Using Fuzzy Time Series and Genetic Algorithms," Information and
Management Sciences, vol. 17, pp. 1-17, 2006.
The above all three issues can be handled by the proposed [5] A. Shahi, et al., "An effective fuzzy c-mean and type 2 fuzzy," Journal
hybrid model of Interval Type 2 Fuzzy model based on of Theoretical and applied Information Technology (JATIT), vol. 5, pp.
556-567, 2009.
ARIMA (IT2FARIMA). Issue 1 and 2 are the limitations of [6] D. Kalenatic, et al., "A Neuro-Evolutive Interval Type-2 TSK Fuzzy
ARIMA which would be effectively handled by IT2-FS. By System for Volatile Weather Forecasting.," presented at the International
using the fuzzy parameters for ARIMA, the requirement of Conference on Intelligent Computing, 2010.
[7] M. Khashei, et al., "A new hybrid artificial neural networks and fuzzy
historical data would be reduced. The issue of missing data regression model for time series forecasting," Fuzzy Sets and Systems,
could also be resolved by blurring the membership function vol. 159, pp. 769-786, 2008.
and then select one by taking mean of the two points. The last [8] K. Huarng, et al., "A multivariate heuristic model for fuzzy timeseries
forecasting," IEEE Transactions on Systems, Man and Cybernetics Part
issue of improving the accuracy would be solved by B, vol. 37, pp. 836-846, 2007.
combining the two dissimilar models. The propose model will [9] T. A. Jilani and S. Burney, "A refined fuzzy time series model for stock
combine the ARIMA model with IT2-FLS, where the former market forecasting," Physical-A- Statistical echanics and its
applications, vol. 387, pp. 2857-2862, 2008.
is a linear model and later is a nonlinear one. The sequence for
[10] F. M. Tseng, et al., "Fuzzy ARIMA model for forecasting the foreign
hybridizing the model will follow the conventional hybrid exchange market,," Fuzzy Sets and Systems, vol. 118, pp. 9-19, 2000.
model, which starts with a linear model, followed by a [11] K. Yu, "Weighted fuzzy time series models for TAlEX forecasting,"
nonlinear model to model the residual. The model will be Physical A, vol. 349, pp. 609-624, 2005.
[12] K. Huarng and H.-K. Yu, "A Type 2 fuzzy time series model for stock
evaluated by Mean Squared Error (MSE), RMSE and MAE. index forecasting," Physical A, vol. 353, pp. 445-462, 2005.
[13] N. Merh, et al., "A comparison between Hybrid Approaches of ANN
Measurements formulas discuss in this paper are, and ARIMA for Indian stock trend forecasting," Business Intelligence
∑ ∑ | | Journal, vol. 3, pp. 23-43, 2010.
, [14] Q. Song and B. S. Chissom, "Forecasting enrollments with fuzzy time
series-part 1," Fuzzy Sets and Systems, vol. 54, pp. 1-9, 1993.
[15] M. H. Lee, et al., "Modified Weighted for Enrollment Forecasting Based
∑ on Fuzzy Time Series," MATEMATIKA, vol. 25, pp. 68-78, 2009.
[16] C. Shyi-Ming and H. Jeng-Ren, "Temperature prediction using fuzzy
time series," Systems, Man, and Cybernetics, Part B: Cybernetics, IEEE
2
∑ Transactions on, vol. 30, pp. 263-275, 2000.
1
2 [17] M. Tektaş, "Weather forecasting using ANFIS and ARIMA models. A
1 2 1 2 case study for Istanbul," Environmental Research, Engineering and
∑ 1 ∑ 1 Management, vol. 51, pp. 5-10, 2010.
[18] E. Cadenas and R. W, " Wind speed forecasting in three different
where , , are actual, forecasted and mean values regions of Mexico, using a hybrid ARIMA_ANN model," Renewable
respectively, and is the forecast number. Energy, vol. 35, pp. 2732-2738, 2010.
[19] D. Delen, et al., "Predicting Breast Cancer Survivability: A Comparison
of Three Data Mining Methods," Artificial Intelligence in Medicine, vol.
34, pp. 113-127, 2005.
(Advance online publication: 27 February 2012)
Engineering Letters, 20:1, EL_20_1_11
______________________________________________________________________________________
[20] J. R. Castro, et al., "A hybrid learning algorithm for a class of interval
type-2 fuzzy neural networks," Information Sciences, vol. 179, pp. 2175-
2193, 2009.
[21] S. Panahian Fard and Z. Zainuddin, "Interval type-2 fuzzy neural
networks version of the Stone-Weierstrass theorem," Neurocomputing,
vol. 74, pp. 2336-2343, 2011.
[22] S. Coupland. (22 October 2009, Fuzzy Logic in Real world Available:
http://www.slideshare.net/BCSLeicester/fuzzy-logic-in-the-real-world-
2326817
[23] D. Wu, "A brief Tutorial on Interval type-2 fuzzy sets and systems," in
Fuzzy Sets and Systems.
[24] J. M. Mendel, et al., "Interval Type-2 Fuzzy Logic Systems Made
Simple," Fuzzy Systems, IEEE Transactions on, vol. 14, pp. 808-821,
2006.
[25] K. Huarng, "Heuristic models of fuzzy times series for forecasting,"
Fuzzy Sets and Systems, vol. 123, pp. 369-386, 2001.
[26] O. Valenzuela, et al., "Hybridization of intelligent techniques and
ARIMA models for time series prediction," Fuzzy Sets and Systems, vol.
159, pp. 821-845, 2008.
[27] G. P. Box and G. M. Jenkins, Eds., Time Series Analysis: Forecasting
and Control. San Francisco, CA: Holden-day Inc, 1976.
[28] J. R. Castro, et al., "Interval Type-2 Fuzzy Logic Toolbox," Engineering
Letters, vol. 15.
[29] S. A. Delurgio, Forecasting Principles and Applications, 1998.
[30] T. Takagi and M. Sugeno, "Fuzzy identification of systems and its
applications to modeling and control," IEEE Trans. Systems, Man, and
Cybernetics, vol. 15, pp. 116-132, 1985.
[31] Mamdani and S. Assilian, "An experiment in linguistis synthesis with a
fuzzy logic controller," International Journal of Man-machine Studies,
vol. 7, pp. 1-13, 1975.
[32] J. M. Mendel, Ed., Uncertain Rule-Based Fuzzy Logic Systems. Prentice
Hall, 2001.
[33] O. Castillo and P. Melin, "Comparison of Hybrid Intelligent Systems,
Neural Networks and Interval Type-2 Fuzzy Logic for Time Series
Prediction," in International Joint Conference on Neural Networks,
Orlando, Florida, USA, 2007.
(Advance online publication: 27 February 2012)