0% found this document useful (0 votes)
8 views

Time-Series Data Analysis With Rough Sets

paper

Uploaded by

fbxurumela
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Time-Series Data Analysis With Rough Sets

paper

Uploaded by

fbxurumela
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/228671979

Time-series data analysis with rough sets

Article · January 2005

CITATIONS READS
19 489

2 authors:

Joseph Herbert Jingtao Yao

16 PUBLICATIONS 718 CITATIONS


University of Regina
173 PUBLICATIONS 5,779 CITATIONS
SEE PROFILE
SEE PROFILE

All content following this page was uploaded by Jingtao Yao on 08 April 2014.

The user has requested enhancement of the downloaded file.


Time-Series Data Analysis with Rough Sets

Joseph Herbert JingTao Yao


Department of Computer Science
University of Regina, Saskatchewan
E-mail: {herbertj,jtyao}@cs.uregina.ca

Abstract 2. Rough Sets and Applications


Rough set theory is a way of representing and reason-
The analysis of time-series data is important in many ar-
ing imprecision and uncertain information in data [7, 16].
eas. Various tools are used for financial time-series data
Based on the concept of indiscernibility, meaning that of
and there is no consensus for the best models. Rough sets is
the inability to distinguish between objects, rough set the-
a new mathematical theory for dealing with vagueness and
ory deals with the approximation of sets constructed from
uncertainty. We apply rough set theory in the analysis of
empirical data. This is most helpful when trying to dis-
New Zealand stock exchanges. A general model for time-
cover decision rules, important features, and minimization
series data analysis is presented. The experimental results
of conditional attributes. There are four important concepts
show that forecasting of the future stock movement, with
to discuss when talking about rough set theory: informa-
reasonable accuracy, could be achieved with rough rules
tion systems, indiscernibility, reduction of attributes, and
obtained from training data.
dependency.
Decision Tables (DT) are of the form T = (U, C, D),
1. Introduction where U is a universe made up of a non-empty finite set of
objects, C is a set of conditional attributes, and D is a deci-
sion attribute. The union A = C ∪D creates an attribute set
Time-series data analysis is an important research domain
consisting of both condition and decision attributes. Table 1
of natural sciences, economics, and financial trading. It
is an example of a DT.
is crucial to certain applications of data mining, machine
learning, and others in computer science. This type of Table 1. A Decision Table (DT)
analysis plays an important role in forecasting future cir- Object Index1 Index2 Index3 Decision
cumstances. Forecasting is essentially taking historical o1 56.21 41.22 87.10 1
time-series data, analyzing patterns and relationships be- o2 52.11 45.55 87.55 0
o3 55.21 42.33 80.42 0
tween it, and producing a system or acquiring results that o4 55.21 42.33 80.42 1
facilitate the prediction of future events of like situations
[12, 14]. Many tools are available to assist in the analysis
of this data but no consensus on which tools are the best. Discerning objects from each other is a major goal in
Time-series data often posses content that is conflicting rough set theory. For example, how are objects o3 and o4
and redundant. The data may be imprecise, therefore a pre- in Table 1 discerned from each other? The values for con-
cise understanding of information cannot be derived from ditional attributes are exactly the same, however, their de-
the data. If a precise understanding is not present, the use cision based on those attributes are quite different. This is
of hard computing techniques for the data analysis is diffi- conveyed by saying that for any subset B ⊆ A,
cult. Using soft computing techniques, or methods that do
not ignore uncertain aspects of information, may help solve IN DT (B) = {(o, o ) ∈ U 2 |∀a ∈ B, a(o) = a(o )}
this problem. Rough sets may offer a powerful toolset for where IN DIS (B) is called the B-indiscernibility relation.
confronting this situation by being able to deal with such Therefore, if (o, o ) ∈ IN DT (B), object o and o are in-
contradictory and superfluous records[8]. discernible from each other by attribute set B.
Using time-series data collected from the New Zealand One of the important aspects in the analysis of deci-
stock exchange, a rough set model for the analysis of un- sion tables extracted from data is the elimination of redun-
certain and redundant data will be used. The model that dant attributes and identification of the most important at-
is used in this study follows the Knowledge Discovery in tributes. Redundant attributes are any attributes that could
Database process given in [1, 3] closely. be eliminated without affecting the degree of dependency
between remaining attributes and the decision. The degree properties of the data [14]. The following statistics were
of dependency is a measure used to convey the ability to used: Moving Average Convergence/Divergence (MACD),
discern objects from each other. The minimum subset of at- Moving Average over a 5-day period (MA5), Moving Av-
tributes preserving the dependency degree is termed reduct erage over a 12-day period (MA12), Price Rate of Change
[7, 8]. A reduct of knowledge is its essential part, which (Price ROC), and Wilder Relative Strength Index (Wilder
suffices to define all basic concepts occurring in the consid- RSI). The decision attribute is the associated closing price
ered knowledge. of the next day, with values of either -1, 0, or 1. All at-
Formally speaking, a subset B ⊆ C is a reduct of C if tributes were discretized using an equal frequency algo-
B is independent and IN D(B) = IN D(C). An attribute rithm. Data splitting created two subsets of size 1665 ob-
is considered independent if no loss of discerning power is jects for the data analysis set and 555 objects for the vali-
made from the removal of this attribute. Obviously C may dation set using a random seed.
have many reducts. Obtaining reducts from time-series data
3.2. Rough Set Analysis
allows knowledge to be of minimum length. For example,
a DT with fifty conditional attributes and one decision at- Rough set analysis of data is used to obtain preliminary
tribute. After computing reducts, the decision D is be suffi- information. Methods such as approximation, reduct and
ciently discerned using only three of those attributes. Thus, core generation, classification, and rule generation can be
performing reducts on the data can significantly reduce the performed on data to gain knowledge.
amount of information required in order to discern between The rough set analysis of the data involved acquiring
decisions. reducts (a minimum subset of attributes where the indis-
Rough sets have been used in numerous applications, in- cernibility relation was unchanged), calculated from a sub-
cluding feature selection [4, 17], fault diagnosis and other set of the original data. Rules were generated from the ac-
neural network applications [5, 11], forecasting [10], and quired reducts. The Rosetta Rough Set Toolkit [6] was used
other areas. The analysis of stock market time-series data to perform reducts and generate decision rules. A filter was
using rough sets has been done with moderate success used to gather only those rules that met a minimum sup-
[9, 12, 13, 15]. The theory’s versatility at classifying data port threshold. Filtering a set of ninety-six original rules
is readily shown in numerous research endeavors. produced a subset of ten candidate decision rules.

3. The Rough Set Data Analysis Model Table 2. Reducts Generated


# Reduct
The model used in this study consists of three stages: data 1 {MA5, Price ROC, Wilder RSI}
preparation, rough set analysis, and validation. Data prepa- 2 {MACD, MA5, MA12, PriceROC}
.. ..
ration includes tasks such as data cleaning, completeness, . .
correctness, attribute creation, attribute selection, and dis- 17 {MA5, MA12, Price ROC}
cretization. The rough set analysis generates preliminary 18 {MA12, Price ROC, Wilder RSI}
knowledge, such as decision rules. This step is the first to
directly create usable knowledge. The validation step con- The reducts that were generated from the data analysis
firms and filters knowledge with the validation data set. are shown in Table 2. From the NZX data, a set of 18
The time-series data used was the stock market data reducts was obtained. Some reducts were unable to gener-
from the New Zealand Exchange Limited (NZX). The NZX ate rules with sufficient support of the data and were filtered
data begins July 31, 1991 and ends April 27, 2000. Data out.
representing the closing price, opening price, highest price The following is an example of a rule obtained from a
reached during the day, and the lowest price reached during reduct:
the day.
Rule 1:
3.1. Data Preparation IF MA5 = 1 and Price ROC = [*, -1.82045) and
Wilder RSI = [*, 37.17850)
In order to successfully analyze data with rough sets, a de-
THEN Decision3 = 1 or 0
cision table must be created. This is done with data prepa-
ration. The data preparation task includes data conver- Support (LHS) = [334 obj]
sion, data cleansing, data completion checks, conditional Coverage (LHS) = [0.200601]
attribute creation, decision attribute generation, discretiza- Accuracy (RHS) = [0.931138]
tion of attributes, and data splitting into analysis and vali-
dation subsets. Data conversion must be performed on the The rule has three conditional attributes corresponding
initial data into a form in which specific rough set tools can to the IF part. The rule has a decision of 1 (significant gain)
be applied. or 0 (marginal change). From this rule, the conditional at-
Computational finance techniques offered methods to tributes have a support of 334 objects from a total of 1665
discover new conditional attributes that conveyed statistical objects. Of those 334 objects, 93% have a decision value
of 1 or 0. Only rules with relatively high support and high Table 3. Reducts Generated
# Data Analysis Set Validation Set
accuracy are considered. Sup. Acc. Cov. Sup. Acc. Cov.
1 334 0.646 0.201 114 0.649 0.205
3.3. Validation 2 97 0.659 0.058 34 0.823 0.061
Once preliminary results have been obtained, validation 3 206 0.577 0.123 58 0.603 0.104
4 48 0.688 0.029 18 0.611 0.032
procedures ensure that the knowledge is correct. If the pre-
5 112 0.5 0.067 35 0.714 0.063
liminary knowledge is in the form of decision rules, these 6 327 0.605 0.196 122 0.581 0.219
rules can be fired against the validation data set to confirm 7 112 0.634 0.067 33 0.606 0.060
support, accuracy, and confidence measures. Rule filtering 8 252 0.615 0.151 78 0.564 0.141
can be performed so that a subset of knowledge tailored to 9 111 0.596 0.067 34 0.618 0.061
10 86 0.488 0.052 25 0.520 0.045
specific thresholds of the researcher is obtained. Compar-
ison between measures obtained by firing the rules against using the validation set. This may need to be concluded
the analysis and validation data subsets is needed to make as an unstable rule, since a margin of error of +/- 20% is
certain that the knowledge is a correct depiction of the orig- considerably high.
inal data. Measures that are not similar with respect to the The ten rules that were acquired through the process
data set can be considered as being inferred from outlier or cover a total 1449 of 2220 objects in the data, 1090 and
abnormal data. 359 objects in the analysis set and validation set respec-
4. Result Analysis tively. Table 4 shows some statistical results.

The preprocessed data was split into analysis (1665 objects) Table 4. Statistical Results
Analysis Set Validation Set
and validation (555 objects) sets. The analysis set was uti- Total objects 1665 555
lized by rough sets, which acquired reducts and decision Objects covered 1090 359
rules. Each decision rule had measurements of support, ac- Min. support 48 18
curacy, and coverage. These rules were the primary output Max. support 334 122
Average support 168.5 55.1
of the rough set analysis process. The decision rules were
Min. accuracy 0.4884 0.5200
then validated by firing each individual rule in conjunction Max. accuracy 0.6875 0.8235
with the validation data set. The new support, accuracy, Average accuracy 0.6000 0.6291
and coverage measures were observed for the validation
data set. The goal is to find rules that are accurate repre- Approximately 65.5% of distinct objects are covered by
sentations of the data. Therefore, rules that have similar the ten rules in the analysis set. The same rules, when fired
measures in both the analysis and validation sets should be against the validation set, cover 64.7% of distinct objects
considered as stable and accurate. in the validation set. Through the comparison of the ac-
It is interesting to see the result of combining two deci- curacy and support measures given in Table 3, the amount
sion classes. Two possible combinations can be performed: of change in accuracy and support between the analysis set
the combination of a decrease and neutral, and the combi- and validation set for each rule is shown in Table 5.
nation of an increase and neutral. The combination of de- A large jump in accuracy from the analysis set to the val-
crease and increase potentially offers no value. However, idation set in rules 2 and 5 is observed. Although the sup-
the combination of neutral and either increase or decrease port values for these two rules do not change significantly
can tell us whether this rule can offer a large gain or loss between data sets, this may tell us that these two rules are
with the inclusion of a marginal change. Rule 1 is an exam- unstable since there is such a dramatic difference in accu-
ple of a rule with measurements obtained through both the racy. Rule 3 saw a significant decrease in support from the
analysis and validation sets. analysis set to the validation set. Whereas rule 3 covered
This transformation results in the disjunction of two de- 12.37% of objects in the analysis set, the same rule only
cision classes instead of one. It is interesting to see that the covered 10.45% of objects in the validation set. Rule 1 is
rule above can forecast either a large gain or a minimal loss by far the strongest, most stable rule - showing negligible
or gain. This could be a powerful tool if the user so desired. change in accuracy and support between data sets.
Each rule is applied to the validation data set corre- In order to determine which rules are the strongest, one
sponding to that of the analysis set. Information is collected must compare the rules and how they react with data. To
regarding the support and accuracy of that rule in the new analyze the rules that were have obtained, a ranking sys-
data. tem could be used. Individual rules are ranked according to
The results shown in Table 3 indicate that for rule 1, the their strength (support and accuracy) and stability (change
accuracy and coverage measures are extremely close ac- in support and change in accuracy). Taking into account all
cording to the percentage of data used. This translates into different types of rankings that were used, an overall rank
a rule that is very stable. Rule 2, however, shows an ac- can be determined. The results of this process can be seen
curacy measure of almost twenty percentage points higher in Table 6 where the header R1, R2, R3 and R4 are rank-
Table 5. Statistical Results The results obtained seem to be quite stable, with some
Rule change in support change in accuracy
(%) (%) rules performing beyond expectations, especially those
1 0.480 0.242 rules that were obtain by merging two decision classes to-
2 0.300 16.374 gether. This may indicate that rough sets can be a powerful
3 -1.922 2.578
tool for forecasting time-series data that is comprised of
4 0.360 -7.639
5 -0.420 21.429 uncertain and redundant values. Acquiring reducts is bene-
6 0.541 -2.354 ficial to time-series data analysis, as it removes information
7 -0.781 -2.787 that does not need to be present in order to discern objects
8 -1.081 -5.098 or provide information about relationships between data.
9 -0.541 3.206
10 -0.661 3.163 References
Table 6. Ranking of Rules - Lower is Better [1] R. J. Brachman and T. Anand. The process of knowledge
Rule R1 R2 R3 R4 Final Rank discovery in databases: A human-centered approach. In Ad-
1 1 3 4 1 1 vances in knowledge discovery and data mining, pages 37–
2 8 1 1 9 3 58. American Association for Artificial Intelligence, 1996.
3 4 9 10 3 8 [2] B. S. Chlebus and S. H. Nguyen. On finding optimal dis-
4 10 2 2 8 4 cretizations for two attributes. Lecture Notes in Computer
5 5 6 3 10 7 Science, 1424:537–544, 1998.
6 2 7 5 2 2 [3] U. M. Fayyad, G. Piatetsky-Shapiro, and P. Smyth. From
7 7 4 8 4 6
data mining to knowledge discovery: an overview. In Ad-
8 3 8 9 7 9
9 6 5 5 6 4 vances in knowledge discovery and data mining, pages 1–
10 9 10 7 5 10 34. American Association for Artificial Intelligence, 1996.
[4] L. I. Kuncheva. Fuzzy rough sets: application to feature
ings according to total support, total accuracy, change in selection. Fuzzy Sets Systems, 51(2):147–153, 1992.
support and change in accuracy respectively. The final rank [5] H. Liu, H. Tuo, and Y. Liu. Rough neural network of vari-
able precision. Neural Process. Lett., 19(1):73–87, 2004.
is determined by the previous four rankings for each rule.
[6] A. Ohrn. ROSETTA Technical Reference Manual, 2001.
According to the rankings shown in Table 6, rule 1 is [7] Z. Pawlak. Rough Sets-theoretical Aspects of Reasoning
suggested as the best with low rankings for measures in about Data. Kluwer Academic, 1991.
support, accuracy, change in support, and change in ac- [8] Z. Pawlak. Vagueness - a rough set view. In Structures
curacy. Rule 10 is considered the worst of the ten rules in Logic and Computer Science, A Selection of Essays in
based on the high rankings of total support and total accu- Honor of Andrzej Ehrenfeucht, pages 106–117, 1997.
racy. Rules 4 and 9 both have a rank of four. This is due [9] L. Shen and H. T. Loh. Applying rough sets to market tim-
to the fact that rule 4 has high rankings for total support ing decisions. Decision Support Systems, 37(4):583–597,
and change in accuracy but low rankings for accuracy and 2004.
[10] T. G. Smolinski, D. L. Chenoweth, and J. M. Zurada. Appli-
change in support. Rule 9 has average rankings for each cation of rough sets and neural networks to forecasting uni-
measure. versity facility and administrative cost recovery. In Artificial
A user may give different weights to different rankings. Intelligence and Soft Computing, pages 538–543, 2004.
For example, if a user wishes to rank rules according to sta- [11] W. Su, Y. Su, H. Zhao, and X. dan Zhang. Integration of
bility, he or she may incorporate a higher level of attentive- rough set and neural network for application of generator
ness to change in support and change in accuracy, whereas fault diagnosis. In Rough Sets and Current Trends in Com-
those measure contribute more to the final rankings of rules puting, pages 549–553, 2004.
that those of total support and total accuracy. Equal weight [12] R. Susmaga, W. Michalowski, and R. Slowinski. Identify-
ing regularities in stock portfolio tilting. Technical report,
was given to each measure.
International Institute for Applied Systems Analysis, 1997.
5. Conclusion [13] F. E. Tay and L. Shen. Economic and financial prediction
using rough sets model. European Journal of Operation
The process of time-series data analysis could include the Research, 141:641–659, 2002.
use of rough set tools for knowledge discovery. Using time- [14] S. Taylor. Modelling Financial Time Series. John Wiley &
series data from the New Zealand stock exchange, rough set Sons Ltd, 1986.
analysis acquired reducts used to create rough rules. The [15] Y. F. Wang. Mining stock price using fuzzy rough set sys-
rules, after being tested for accuracy, are used as a fore- tem. Expert Systems with Applications, 24:13–23, 2003.
[16] Y. Yao, S. Wong, and T. Lin. A review of rough set mod-
casting tool to predict future configurations of data. Rough
els. In Rough Sets and Data Mining: Analysis for Imprecise
sets succeed in this task since they are able to describe un- Data, 1996.
certain data from information derived from precise, certain [17] M. Zhang and J. T. Yao. A rough sets approach to feature
data. The data should be prepared so that it contains at- selection. In Proceedings of the 23rd International Confer-
tributes that have minimal loss of information when they ence of NAFIPS, pages 434–439, 2004.
are discretized.

View publication stats

You might also like