Performance Criteria to Validate Simulation Models
Full text
FACULDADE DE ECONOMIA DA UNIVERSIDADE DO PORTO Dissertation of the Master in Quantitative Methods for Economics and Management Performance Criteria to Validate Simulation Models Author: Joana da Hora Martins Supervisor: Professor Pedro Campos September 28, 2012
Abstract This thesis explores performance criteria adequate to validate simulation models. An overview on the most widely performance criteria used in literature is firstly provided. The thesis proceeds with the proposal of two new criteria that assess the distortion of the warping path obtained after applying the Dynamic Time Warping algorithm: the Warping Path Distortion (WPD) and the Percentage Warping Path Distortion (PWPD). A case study focused on the demographic evolution of Portuguese firms is presented, whose results are used to perform a comparative analysis on all the criteria revised. This work concludes with a concise outline on the criteria advantages and drawbacks. The criteria WPD and PWPD returned adequate evaluations, yet further applicability of these measures to benchmark data sets is necessary to provide a proper conclusion on its quality. Keywords: performance criteria, validation, simulation models, Warping Path Distortion, Percentage Warping Path Distortion.
“We have described the principle of induction as the means whereby science decides upon truth. To be more exact, we should say that it serves to decide upon probability. For it is not given to science to reach either truth or falsity . . . but scientific statements can only attain continuous degrees of probability whose unattainable upper and lower limits are truth and falsity.” Hans Reichenbach (in Erkenntnis 1, 1930, pp. 186) i
Acknowledgements I am grateful to my supervisor, Professor Pedro Campos, for the knowledge, patience and motivation he granted to me during the development of this thesis. I want to congratulate all Professors of this Master course, with whom I had the pleasure of improving my knowledge in different subjects. I leave a word of gratitude to the institution where I work, INESC TEC, for the flexibility and support always demonstrated. Finally, I want to thank to my dear family and friends, for their love and affection.
Contents 1 Introduction 1 1.1 Maingoalspursued............................. 3 1.2 Maincontributions ............................. 3 1.3 Structure of this thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2 Terminology and Data aspects 5 2.1 Terminology................................. 5 2.2 Calibration and Validation methodology . . . . . . . . . . . . . . . . . . 9 2.2.1 k-fold Cross Validation . . . . . . . . . . . . . . . . . . . . . . . 10 2.2.2 Splitsampletest .......................... 11 2.2.3 Proxy-systemtest.......................... 11 2.2.4 Differential split-sample test . . . . . . . . . . . . . . . . . . . . 12 2.2.5 Proxy-system differential split-sample test . . . . . . . . . . . . . 14 3 Performance Criteria Overview 16 3.1 Error-basedmeasures............................ 17 3.1.1 Scale-dependent measures . . . . . . . . . . . . . . . . . . . . . 17 3.1.2 Percentage-error measures . . . . . . . . . . . . . . . . . . . . . 19 3.1.3 Relative-error measures . . . . . . . . . . . . . . . . . . . . . . 20 3.1.4 Scale-free error measures . . . . . . . . . . . . . . . . . . . . . . 21 3.1.5 Theil’smeasures .......................... 22 3.2 Information Theory IT based measures . . . . . . . . . . . . . . . . . . 23 3.2.1 Entropy............................... 23 3.2.2 Kullback-Leibler Divergence - DKL ................ 25 3.2.3 Normalized Information Theory measures . . . . . . . . . . . . . 26 3.3 Validation using Information Criteria - IC . . . . . . . . . . . . . . . . . 28 3.3.1 Akaike Information Criterion - AIC ................ 28 3.3.2 Bayesian information criterion - BIC ............... 29 iii
3.4 Parametrictests............................... 29 3.4.1 Coefficient of correlation - r.................... 30 3.4.2 Coefficient of determination - R2................. 31 3.4.3 Cross correlation - ρ(n)...................... 32 3.5 Nonparametrictests............................. 32 3.5.1 Signtest............................... 33 3.5.2 Spearman’s rank correlation coefficient - rS............ 34 3.5.3 Kendall’s tau - τ.......................... 35 3.5.4 Wilcoxon Signed Rank Test . . . . . . . . . . . . . . . . . . . . 36 3.6 Distance-based measures . . . . . . . . . . . . . . . . . . . . . . . . . . 38 3.6.1 Minkowski distance - dr...................... 38 3.6.2 Short Time Series Distance - dSTS ................. 39 3.6.3 Dynamic Time Warping - DTW .................. 39 3.7 Combinedmeasures............................. 42 3.7.1 Sprague & Gear error- CS&G.................... 42 3.7.2 Russel’s error - CR......................... 43 3.7.3 Normalized Integral Square error - CNISE ............. 43 4 Measuring the Warping Path Distortion 45 4.1 Warping Path Distortion- WPD ...................... 45 4.2 Percentage Warping Path Distortion - PWPD ............... 46 4.3 A practical example of WPDand PWPD ................ 47 5 Practical Exploration of Performance Criteria 52 5.1 PoFi Construction.............................. 52 5.1.1 Algorithm used when a firm is dead . . . . . . . . . . . . . . . . 53 5.1.2 Algorithm used when a firm is alive . . . . . . . . . . . . . . . . 54 5.2 Results.................................... 54 5.2.1 Number of firms in Norte ...................... 55 5.2.2 Number of firms in Centro ..................... 59 5.2.3 Number of firms in Lisboa ..................... 62 5.2.4 Number of firms in Alentejo .................... 66 5.2.5 Number of firms in Algarve .................... 67 6 Conclusions 70 iv
List of Figures 2.1 Terminology for the construction of computational simulation models (from[41]). ................................. 6 3.1 Schematic representation of Information Theory quantities. . . . . . . . . 24 4.1 Exemplification of a warping path referring to the worst fitting situation. . 47 4.2 Vectors applied under the example. . . . . . . . . . . . . . . . . . . . . . 48 4.3 Visualization of the warping path for the example general case....... 50 5.1 Diagram representing the algorithm followed by PoFi. This diagram explores the transition of one firm during one iteration (between t and t+1). State of the firm: X, sector of the firm: S, age: A, geographical region: N, dimension: D, variation of dimension: ∆d.................. 53 5.2 Simulated and observed data from the Portuguese case study. . . . . . . . 56 5.3 Warping path visualization for the number of firms in Norte. ....... 57 5.4 Warping path visualization for the number of firms in Centro........ 60 5.5 Warping path visualization for the number of firms in Lisboa........ 62 5.6 Warping path visualization for the number of firms in Alentejo....... 65 5.7 Warping path visualization for the number of firms in Algarve. ...... 68 v
List of Tables 3.1 Nonparametric tests for paired observations (adapted from [11]). . . . . . 33 5.1 Performance Criteria summary for the number of firms in Norte. . . . . . 55 5.2 Performance Criteria summary for the number of firms in Centro. . . . . 60 5.3 Performance Criteria summary for the number of firms in Lisboa. . . . . 63 5.4 Performance criteria summary for the number of firms in Alentejo. . . . . 65 5.5 Performance Criteria summary for the number of firms in Algarve. . . . . 67 vi
Nomenclature ρ(n)Cross correlation τKendall’s Tau AIC Akaike Information Criterion AR Autoregressive ARMA Autoregressive Moving Average BIC Bayesian Information Criterion CNISE Normalized Integral Square combined error CRRussel’s combined error CS&GSprague and Gear combined error CR Critical Region drMinkowski distance DKL Kullback-Leibler Divergence dr=1 Manhattan distance dr=2 Euclidean distance dST S Short Time Series distance DIC Deviance Information Criterion DTW Dynamic Time Warping EIC Extended Information Criterion vii
Chapter 2 Terminology and Data aspects This chapter includes two main sections. The first section provides a description of relevant terminology for the construction of computational simulation models. The second section includes a summary overview on the classic methodologies to coordinate the processes of validation and calibration, alongside with the classic techniques for data split into calibration and validation data sets. Whenever relevant, the support of the example demographic evolution of Portuguese firms is used. 2.1 Terminology The work developed by Refsgaard [41] reviews many perspectives on main concepts concerning computational simulation models, and proposes an unifying terminology. The terminology proposed in [41] is adopted in this thesis, and is summarily described. A causal-relationship scheme including the relevant terms is presented in Figure 2.1. •Reality The real system to be studied and modeled. For example, a set of real Portuguese firms could be a reality to study. From the real firms, it is possible to collect historic data concerning relevant features to study further, such as the number of living firms in each geographic zone over time. •Conceptual model A conceptual model includes (i) a mathematical formulation (equations) and (ii) a description on the most relevant features to be simulated. It aims to describe the reality in terms of verbal descriptions, equations, governing relationships or 5
Figure 2.1: Terminology for the construction of computational simulation models (from [41]). natural laws, using the most accurate perception of the key features to be modeled (perceptual model) and the corresponding simplifications and numerical accuracy limits that are assumed acceptable. A conceptual model constitutes the scientific hypothesis or theory assumed for the model under study. For example, the hypothesis the birth rate of firms in a specific moment is exponentially dependent on the number of living firms for that same moment could be formulated to be further tested. This hypothesis can only be precisely specified provided all variables used (birth rate of firms, number of living firms and time moments) are described unambiguously. •Model code A computer program with the implementation of the generic mathematical formulation hypothesized in the conceptual model. The generality of a model code means that it can be used to create distinct models for different case studies, using the same elemental equations and allowing distinct input variables and parameter values. •Model The model is established for a particular case study. It is constructed from the model 6
code, using input data to find parameter values. •Code verification The code verification is the task which allows the substantiation that a model code is a suitable representation of a conceptual model, considering specified limits or ranges of application and corresponding ranges of accuracy. This is normally done with a methodological debug of model code, in order to ensure that it performs exactly the desired tasks. In the work developed by Gilbert and Troitzsch [16], focused on simulation for social systems, the model verification if defined as “the process of checking that a program does what it was planned to do” ([16], pp.21). Moreover, the following insightful recommendations concerning the verification phase are provided by [16]: (i) the debug should be made carefully and preferably using a set of test cases, such as simulating extremes situations, in order to easily check weather the results of the model are coincident with the expectable results; (ii) it is advised the rerun of the model each time a major change is made, in order to easily check possible errors within the change made; (iii) each rerun of the model should automatically include the whole list of test cases, record the respective results and if possible, highlight major differences over different runs; (iv) finally, a record of the results and the code of each run should be stored within a “version control system”. •Model confirmation The assessment on the conceptual model adequacy to provide an acceptable level of agreement for the domain of intended application. When this assessment is considered acceptable, the theories / hypotheses included in the conceptual model are scientifically confirmed. Otherwise, the theories / hypotheses are rejected. •Model calibration The process of adjustment of parameter values included in the model in order to approximate the model results to reality, considering a specified range of accuracy in the performance criteria used. The term training is frequently applied with similar meaning (e.g. [32]). Some modeling approaches differentiate two tasks under the calibration process: the training and the test (noting that the term test can be used both as a part of the calibration process and as the validation process). 7
•Model validation A model is validated when, under its domain of applicability, the model outputs return a satisfactory range of accuracy for a specified performance criterion, that should be consistent with the intended application of the model. The term testing is used with the same meaning as validation in some modeling approaches (e.g. in [32]). •Model set-up Establishment of a model for a specific case study with base on the model code. This establishment is made with the definition of (i) boundary, (ii) initial conditions and (iii) parameter assessment from field and laboratory data. •Simulation Simulation is the use of a validated model to gain insight about reality. Simulation can be used to predict the evolution of some features or to study how reality is expected to evolve over the change of specific features included into the model. It is important to consider the uncertainty underlying the model when defining the conclusions of the studied reality. •Analysis The assessment of the model quality considering (i) the reality and (ii) the scientific description of reality (i.e. the conceptual model with its theories and equations). The analysis is performed with analytic tools, and can lead to conclude on a good or bad result for the model confirmation. As explained by [16], when simulation models are constructed to reproduce stochastic processes (when the reality to be simulated is at least, partly based on random factors), it is appropriate to perform a sensitivity analysis. A sensitive analysis of a simulation models aims (i) “to answer questions about the extent to which the behavior of the simulation is sensitive to the assumptions which have been made” ([16], pp.23), and (ii) to investigate the robustness of the model. It is conducted by running the model under different values for the initial conditions and parameters (for example by performing small sequential changes or by randomizing these values), with the analysis of the corresponding outcomes. This approaches allows the study of the behavior of the model under different conditions. •Programming 8
The creation of the model code from the conceptual model, using computational tools. Another important concept described in [48] refers to the quality of a simulation model, where three main quality goals are identified: (i) performance: the ability of a simulation model to execute its roles, with efficiency and reliability; (ii) safety: the adequacy of the simulation model to prevent accidents when applied to perform some process in the real world (e.g. controlling a machine); and (iii) security: the adequacy of a simulation model to comply with laws, norms and standards (this goal is connected with the topics of confidentiality, integrity or authenticity). A short summing on the main concepts revised in this section is now presented. A simulation model is designed to validate or reject specific theories and hypothesis considered in the conceptual model, always under the specific conditions and assumptions made. Therefore, a simulation model can be accepted as valid for specific conditions only, which means that under the conditions simulated, the model reproduces well the task for which it was designed. To prove that a model reproduces well its task (i.e. to confirm a model) it is important to follow the standard procedures [41], implying the use of data from reality to confront the results obtained, and use the calibration and validation outcomes as valuable information to confirm (i.e. the model corroborates the hypothesis defined in the conceptual model) or reject a conceptual model. 2.2 Calibration and Validation methodology A list on different techniques to validate simulation models is provided by [42]. This list includes the following validation techniques: (i) Animation, (ii) Comparison to Other Models, (iii) Degenerate Tests, (iv) Event Validity, (v) Extreme Condition Tests, (vi) Face Validity, (vii) Historical Data Validation, (viii) Historical Methods, (ix) Internal Validity, (x) Multistage Validation, (xi) Operational Graphics, (xii) Parameter Variability - Sensitivity Analysis, (xiii) Predictive Validation and (xiv) Traces and (xv) Turing Tests. Also, an empirical validation approach is suggested in [14]. Although the extensive range of validation approaches available in literature, this thesis is focused on the Historical Data Validation one. Accordingly, the performance criteria reviewed in further chapters are suitable to assess quantitatively paired data sets. The Historical Data Validation is applied when there are historical records or collected data from reality. These data is the reference point that the model should be able to 9
reproduce, and is normally separated in (i) data used to build the model (i.e. to use in model calibration) and (ii) data used to test whether the model behaves as the system does (i.e. to use in the model validation process). According to [41], the measurement of the level of acceptable agreement between the model and the reality is made with performance criteria, both for model calibration and model validation. It is possible to use the same performance criteria in calibration and in validation. The validation process is deeply connected with calibration. The methodology used to coordinate these two processes is extremely important (the selection of an appropriate performance criterion would be worthless if not properly applied). Concerning the data to be applied within the processes of validation and calibration, three main attributes are detailed by [32]: (i) the calibration data may provide the model with direct or indirect information concerning specific aspects the model is intended to learn. Normally, a model learns its tasks easily when provided with direct information, and the credit assignment problem may arise when the model is provided with indirect information (see [32], pp. 5); (ii) The sequence of the training examples provided to the model within the calibration data set is an important aspect to consider (for example the data can be randomly ordered); (iii) the third attribute is the distribution similarity assessment between calibration and validation data sets. The next sections summarily describe classic methodologies used (i) to split the data to be included within the validation and calibration data sets, and (ii) to coordinate the validation and calibration processes in order to achieve meaningful results. Accordingly, five methods are revised. The first method is the cross validation test, which allows validation on a sample used for model calibration. The second method is the classic split sample test, which defines that the calibration data set is independent from validation data set. The other three methods are variants of the split sample test, all of them prosed by Klemeˇ s [21] to perform split sample test within situations with insufficient data available and to test the model behavior for changes in features. Note 1: The methodology on how to determine the amount of data needed to meaningful calibrate a model is not addressed in this work, further reading on this subject can be found in [5]. 2.2.1 k-fold Cross Validation The k-fold cross-validation test divides the original sample into ksubsamples. The allocation of each element to each o subsamples is made randomly. Then, one of the k subsamples is selected to be the validation data set. The remaining k−1subsamples are 10
used as calibration data set. The accuracy result obtained with this experiment is stored. This experiment is repeated ktimes, each time using a different subset as validation data set. The kaccuracy results from each experiment are then averaged (or combined with other criteria) to produce a single accuracy estimation. The k-fold cross-validation test uses all data elements for both calibration and validation. Each data element is used for validation once. In the general case, the number of subsamples kto adopt is an undefined parameter. As outlined by [13], re-sampling strategies have been commonly misused, often resulting in highly biased estimates of prediction. 2.2.2 Split sample test The available data from reality should be split into two data sets to use in calibration and in validation. Each data set should be used in turn for calibration and for validation. Accordingly, one experiment would be conducted using the first part of the data for calibration and the second part of the data for validation, using a specified performance criterion. Another experiment would be conducted using the second part of the data for calibration and the first part of the data for validation, using the same performance criterion. The results obtained from each experiment should be compared. The confirmation of the model would then be assessed by: (i) the similarity of the results from the two experiments and (ii) the adequacy of the validation outcomes with the corresponding ranges of accuracy. This means that the conceptual model may be validated if the validation outputs obtained with both experiments comply with the specified ranges of accuracy for the performance criteria used, and if these two validation outputs are similar. Otherwise, the conceptual model should be rejected. For the author knowledge, there is no consensual definition on the ideal ratio used to split calibration and validation data sets. For instance in the study [21], it is suggested that when the available data is sufficiently long, two equal parts should be considered. In the study [13] several tests are conducted to address this same question, and the conclusions indicate ranges of ratios depending on the specific conditions of the model and of sample population. 2.2.3 Proxy-system test The Proxy-system test is applicable to models designed to be transferable over systems. A transferable model is useful when there is low or any data available concerning the 11
system to be modeled. Modelling a system with no data available Let us consider a system Cwith any data available, and that we want to construct and validate a simulation model to simulate system C. In this situation it is possible to develop a model with base on two other systems A and B, both with data available and with characteristics similar to system C, allowing the conjecture that these two systems are both representative of system C. The model should be calibrated on system Aand validated on system B(first experiment) and vice versa (second experiment). The model is confirmed (i.e. it is concluded that the model encompasses a basic level of credibility with regard to its ability to simulate system Cadequately) only when the validation results from both experiments are similar and comply with the accuracy ranges specified. Modelling a system with low data available Let us consider a system D, with scarce data available (i.e. there are not sufficient data to perform a split as the one suggested in the split sample test). On one hand, the construction of a simulation model to simulate system Dcannot be accomplished with the scarce data available, as it is not sufficient to perform calibration and validation. On the other hand, the scarce data available are the best knowledge about system D, and should be included within the simulation process. In this case, the procedure to adopt under the calibration and validation processes is exactly the same described in the former section (Proxy-system test to model a system with any data available) with the attachment of a third experiment. The third experiment consists on using the scarce data set from system Dfor validation. The model is accepted when the validation results from the three experiments comply with the accuracy ranges specified and are similar. 2.2.4 Differential split-sample test The differential split-sample test is applicable to validate the sensitivity of the model to respond accurately on changes of a specific feature that integrates the model. This test may have several variants depending on the specific nature of the change to be simulated. 12
Modeling a system sensitive to changes on a feature, with available data on the adjustable feature Let’s consider a system Eto be simulated, for which there are sufficient data for calibration and validation processes. The simulation model of system Eis intended to be sensitive to changes on a specified feature Y(the system Eincludes a set of distinct features, one of which is feature Y). In this case, the data available should be split into two parts according to the values observed in feature Y. Accordingly, the first data set would be composed with observations where feature Yreturned high values (e.g. considering the adjustable feature birth rate of firms, the first data set would include observations where high birth rates were observed). The second data set would include observations where feature Yreturned low values. This implies the exclusion of those observations where feature Yreturned moderate values. •To test the model ability to reproduce the reality for high values of feature Y, the data set with low values of Yshould be applied for calibration, and the data set with high values should be used for validation. The model is confirmed if the validation results comply with the accuracy ranges specified. Otherwise, the model is rejected. •To test the model adequacy to behave with low values of feature Y, the same reasoning is applied following a reverse order (the data set with high values is used for calibration, and the data set with low values of Yis applied for validation). Modeling a system sensitive to changes on a feature, without significantly different data on the adjustable feature Let us consider a system Hto be simulated. The simulation model of His intended to be sensitive for changes on a feature Y(system Hincorporates several features, being Yone of them). Let us assume that, in the given record, segments with significantly different values of feature Ycannot be identified (this situation may occur due to scarcity of data available or because the majority of observations relate to moderate values of Y). In this case the model should be calibrated and validated on two substitute systems Fand G. The two substitute systems should (i) encompass sufficient and significantly different data on the adjustable feature (allowing the accomplishment of the differential split-sample test detailed in the former section), and (ii) be composed of similar characteristics to system H(allowing the conjecture that systems Fand Gare representative of system H). 13
•To test the model adequacy to behave with high values of feature Y, two experiments should be conducted. The first experiment uses data from system F: the model is calibrated with data relative to low value of feature Y, and is further validated with data where high values of Ywhere observed. The second experiment uses data from system G, with similar reasoning as experiment 1. The model is accepted if the validation results comply with the specified accuracy ranges and if they are similar over the two experiments. The model is rejected otherwise. •To test the model adequacy to reproduce low values of Y, the following two experiments should be conducted. The first experiment applies the data with high values of feature Yfrom system Ffor calibration, and the data with low values of Yfrom system Ffor validation. The second experiment applies data from system Gwith similar reasoning as the first experiment. The model acceptance or rejection is decided with base on the accuracy and similarity of the validation results obtained in both experiments. Note 2: when using two substitute systems on differential split-sample test, the calibration and validation is done on each substitute system independently, which is different from the proxy-system test where a model is calibrated on one system and validated on the other. Note 3: As reported in [21]: “A differential split-sample test can arise by default from a simple split-sample test if the only meaningful way of splitting an available record is such that the two segments exhibit markedly different conditions”. 2.2.5 Proxy-system differential split-sample test The Proxy-system differential split-sample test is applicable to models designed to be transferable both between systems and between features. The test may have different forms depending on the specific modeling task pursued. Let us consider the system K with no available data records. System K includes several features, being one of them the feature Y. It is intended to test the model adequacy to replicate changes on feature Y within system K. In this situation two other systems I and J, both representative of system K and with available and significantly different data on feature Y, should be chosen. The data records of systems I and J are then split considering the values of feature Y. Accordingly, the data from system I is split into two parts, one referring to high values of Y, and the other concerning the low values of Y (observations referring to moderate 14
clusions taken from applying a relative-error measure or comparing the respective scaledependent measure to both models is equivalent. Moreover, these methods are not applicable when the error obtained from the benchmarking model is zero, as in that case the value of riwould be undefined [18]. 3.1.4 Scale-free error measures According to Hyndman [18], the main advantage of scale-free error measures is that they provide more accurate results than the methods reviewed in the former three sections when the data sets to be assessed are non stationary, meaning that the data evolve according to a pattern such as trend or seasonality. This does not inculcate any inadequacy of the methods reviewed in the former three sections to the assessment of non-stationary data. Important to note that the scale-free error measures are recent, and there is still few comparative literature. Scale-free error measures are based on scale-dependent measures, but they use a scaled error qiinstead of error ei. The scaled error is calculated as described in equation (3.11). qi=ei 1 N−1 N X j=2 |xj−xj−1| (3.11) Mean Absolute Scaled Error - MASE For the author knowledge, it was possible to find only one scale-free error measure application in literature, referring to Mean Absolute Scaled Error MASE, although it is suggested that the reasoning of replace a scaled error qiby the classic error eimay be extended to other measures. The MASE is calculated as presented in equation (3.12), which is the same as using equation (3.3) replacing eiby qi. This method is applied in [18]. MASE =1 N N X i=1 |qi|(3.12) Hyndman [18, 19] claims that MASE is the only available accuracy measurement that can be used in all forecasting situations and for all types of series. Note that this claim is based on a comparison with error-based measures only, and is justified with the following advantages identified for this method: it is scale free and therefore the values 21
obtained can be compared across models with different unitary systems, when applied to non-stationary data the results obtained are more accurate than with other error-based measures, it does not incur in undefined elements, it prevents negative and positive errors from offsetting each other. 3.1.5 Theil’s measures Theil’s measure of forecast accuracy - U1 U1was proposed by Theil in 1966 [51] as a measure of forecast accuracy, as specified in (3.13). U1="1 N N X i=1 (ei)2#0.5 "1 N N X i=1 (xi)2#0.5 +"1 N N X i=1 (bxi)2#0.5(3.13) When U1= 0, it means that the estimation is completely coincident with the observations (xi=bxi,∀i), indicating a perfect forecast. The case U1= 1 indicates the maximum inequality (when there is negative proportionality over the two data sets or when one of the data sets is identically to zero) [8, 51]. Bliemel [8] analyzed both measures proposed by Theil, U1and U2(see next section), and concluded that U1is only informative to assess forecast accuracy when applied to the absolute values of the errors. Theil’s measure of forecast quality - U2 The measure U2was proposed by Theil in 1965 [50] to assess the quality of forecasts. This measure is defined in (3.14). U2="1 N N X i=1 (ei)2#0.5 "1 N N X i=1 (xi)2#0.5(3.14) The result U2= 0 indicates a perfect forecast, meaning that both data sets are coincident (xi=bxi,∀i). The meaning of the case U2= 1 is clarified by [8], stating that this is observed “when the prediction method is naive no-change extrapolation or when it leads 22
to the same standard deviation of forecast error as that method”. The comparative study performed by Bliemel [8] over the two Theil’s measures, U1 and U2, concludes that U2provides more meaningful information on the accuracy of the estimations under assessment, suggesting that U2should be preferably used than U1. As clarified in [33], the statistic U2is normally applied without the formal definition of hypothesis. Nevertheless, it can be applied as the test statistic of parametric test when both data sets come from bivariate normal populations. The distribution Fis applicable in that case. Further reading on this topic can be found in [33]. 3.2 Information Theory IT based measures The Information Theory IT field was firstly developed by Shannon [46], with the definition of the concepts of entropy and mutual information. The IT concepts have been applied in several research fields since then, such as in biology [1], simulation of agent based models [52] and computational cybernetics [31]. The measures used in IT are mathematical quantities that record the amount of information contained within a data set. In this section the measures entropy and Kullback- Leibler Divergence are reviewed as they were proposed by Akaike [2] to be applied to validate simulation models. More recently, normalized information theory measures have been suggested to assess the goodness of fit of simulation models, see [53]. These normalized measures are also reviewed. The observed data set Xis assumed to have, at least, some randomness (otherwise it would be a deterministic phenomena, and the respective simulation model would return perfect estimations). Therefore lets consider the random variable X, with P= (p1, p2, ..., pN)being the probabilities corresponding to each discrete observation X= (x1, x2, ..., xN), and N X i=1 pi= 1. 3.2.1 Entropy Entropy was firstly defined by Shannon in 1948 [46]. According to Shannon [46], entropy is the quantity of information linked to the probability of occurrence of a certain event: (i) entropy is null for events whose output is completely known at start and (ii) entropy is higher the less predictable an event is. Entropy was proposed as a performance criterion by Akaike in 1974 [2] under the context of time series estimations, and was studied in [36] under the context of Markov models. 23
Figure 3.1: Schematic representation of Information Theory quantities. The general mathematical definition of entropy was proposed by Renyi, the Renyi’s Entropy - Hrα, which is presented in (3.15), being αa real parameter subject to the restrictions specified in (3.15), and therefore the entropy firstly described by Shannon Hsis a particular case of the general entropy described by Renyi Hrα. Hrα(X) = 1 1−αlog N X i=1 pα i! Subject to: α > 0 α6= 1 (3.15) Figure 3.2.1 provides a schematic visualization on information theory quantities of entropy, joint entropy and mutual information. In Figure 3.2.1 the entropy of the observed data set H(X)is represented as the blue circle, the entropy of the estimated data set H(b X)is represented as the red circle. The joint entropy over the two data sets H(X, b X)is represented as the union H(X)∪H(b X). The mutual information (see section 3.2.2) is represented as the intersection H(X)∩H(b X). Quadratic entropy of Renyi In the case of α= 2 the expression (3.15) leads to the quadratic entropy, due to the quadratic form of the probability, as defined in (3.16). Hr2(X) = −log N X i=1 p2 i!(3.16) The quadratic entropy of Renyi has the advantage of being easier to calculate through the application of Gaussian convolution [7]. 24
Entropy described by Shannon - Hs The entropy described by Shannon Hsis the weighted sum of logarithms by probabilities. It represents the average amount of information included within a single observation of X. Accordingly, the Shannon’s entropy Hs(X)is defined in (3.17). Hs(X) = N X i=1 pi·log 1 pi Subject to: N X i=1 pi= 1 pi≥0 0·log2(0) = 0 (3.17) The use of entropy as a validation criterion is however tricky. The direct comparison between the entropy of the historic data set with the entropy of the simulated data set do not allow to conclude on the adequacy of the results obtained. As it can be perceived in image 3.2.1, it is possible to have two independent data sets returning similar values for entropy H(X)and H(b X), as in that case the mutual information would be zero. The use of entropy as validation criteria, in the light of this work, should be done considering the two data sets simultaneously, using the joint entropy over the two data sets H(X, b X). A perfect fit would be obtained for a value of joint entropy equal to the value of the observed entropy (H(X, b X) = H(X)). The join entropy is calculated as described in (3.15), using the attached observations of Xand b Xinstead of using the observations Xseparately. 3.2.2 Kullback-Leibler Divergence - DKL The Kullback-Leibler Divergence DKL is a mathematic quantity which measures dissimilarity between two different probability density functions p(x)and q(bx)([39] pp. 16). This measure is defined as follows: DKL(pkq) = X x p(x)logp(x) q(bx)(3.18) The divergence DKL may be interpreted as the distance between the two probability density functions, however it does not obey the distance mathematical postulates ([39] pp. 16). The divergence DKL is often used to validate simulation models, as it is suggested 25
in [29]. An example is provided by [20], with the validation of the results obtained with a simulated annealing model. Mutual Information - I Mutual information Iis a special case of the divergence DKL: when the two probability density functions under assessment are (i) the joint probability density function of p(x, bx) and (ii) the product of the marginals of p(x)q(bx)([39] pp. 18). Mutual information Iis defined as follows. I(X, b X) = DKL(p(X, b X)kp(X)q(b X)) (3.19) In the scope of this thesis, the mutual information measure may be useful when applied to the two data sets under assessment. This measure would allow the measurement of the divergence between the distributions. The measure I(X, b X)returns values in the range [0, min(H(X), H(b X))]. A perfect fit of the estimated data set would return the maximum value of I(X, b X), as in that situation I(X, Y ) = H(X) = H(b X). A bad estimated data set would return I(X, b X)values close to zero. The study [28] compares mutual information and correlation measures, clarifying that although both measure dependence over data sets, mutual information measures a general dependence, while the correlation function measures a linear dependence. Thus, mutual information is considered a better quantity than the correlation function to measure the dependence over two data sets. 3.2.3 Normalized Information Theory measures The normalized IT measures were constructed with base on the IT measures defined in the previous two sections. These measures are applied in [53]. A summary of normalized IT measures is provided in (3.20) concerning Normalized Mutual Information NMIcriteria, and in (3.21) concerning Normalized Information Distance Measures Idcriteria. 26
NMIjoint =I(X, b X) H(X, b X) NMImax =I(X, b X) max(H(X),H(b X)) NMImin =I(X, b X) min(H(X),H(b X)) NMIsum =2·I(X, b X) H(X)+H(b X) NMIsqrt =I(X, b X) √(H(X)·H(b X)) (3.20) All Normalized Mutual Information detailed in 3.20 return values within the range [0,1]. Values close to zero indicate a bad estimation, whilst values close to one indicate a good estimation. Idjoint = 1 −I(X, b X) H(X, b X) Idmax = 1 −I(X, b X) max(H(X),H(b X)) Idmin = 1 −I(X, b X) min(H(X),H(b X)) Idsum = 1 −2·I(X, b X) H(X)+H(b X) Idsqrt = 1 −I(X, b X) √(H(X)·H(b X)) (3.21) The Normalized Information Distances Measures return values within the range [0,1], with zero indicating a good estimation and one indicating a bad estimation. 27
3.3 Validation using Information Criteria - IC The validation of simulation models may be performed using Information Criteria, when the model to be validated is statistically defined, such as a linear model or and autoregressive moving average ARMA model. When the model to be validated is not definable statistically, meaning that the validation is to be performed using only the data sets (that is the case of System Dynamics models), information criteria are not applicable. In [23], several information criteria are presented, including: (i) Akaike Information Criterion AIC, (ii) Bayesian Information Criterion BIC (also known as Schwarz Information Criterion SIC), Deviance Information Criterion DIC, (iv) Extended Information Criterion EIC, (v) Focused Information Criterion FIC, (vi) Generalized Information Criterion GIC, (vii) Network Information Criterion NIC, and (viii) Takeuchi’s Information Criterion TIC. According to [23], the majority of the criteria included in this list are modifications or generalizations of AIC and BIC, which are the two more commonly used. 3.3.1 Akaike Information Criterion - AIC A widely used model-selection criterion is Akaike’s Information Criterion (AIC) (see [3, 30, 23]). AIC is an asymptotically unbiased estimator of the expected Kullback-Leibler divergence DKL (see equation 3.18) between two probability density functions [38, 23, 2], normally applied to assess the quality of the results obtained with different models when historic data is available. Thus, the historic data is used as the reference, and the results obtained with AIC allow to measure the divergence between the (i) probability density functions obtained with the simulated results and (ii) the probability density function of the historic data. Therefore, the estimated model will be closer to reality, the lesser the distance between the two probability density functions considered. Thus, smaller values of AIC indicate a better fit of the model. The AIC for a given model is a function of its maximized value of the likelihood function for the estimated model (L) and the number of estimable parameters (K), as defined in equation (3.22). AIC = 2K−2 ln(L)(3.22) Another similar criteria, the Minimum Information Theoretic Criterion Estimate - MAICE, was also proposed by Akaike in [2], as an improvement of the AIC. Accordingly, the MAICE eliminates the “need of the subjective judgment required in the 28
hypothesis testing procedure for the decision on the levels of significance”. In this work, the AIC is adopted as it is much widely used. 3.3.2 Bayesian information criterion - BIC The Bayesian information criterion BIC, or Schwarz criterion (also SBC,SIC and SBIC) is normally applied to choose the best simulation model from a set of models. It assesses the quality of adjustment of a simulation model. BIC is a widely applied measure, normally alongside with AIC, see ([30] pp. 173, [23]). A detailed description and critic on BIC can be found in [54] and in [23]. BIC is defined in equation (3.23), where ris the number of degrees of freedom remaining after fitting the model. Smaller values of BIC indicate a better fit of the model. BIC =L2−rln(N)(3.23) In the study [23], the criteria AIC and BIC are examined alongside, and the use of these two criteria simultaneously to base the assessment of the quality of models results is advised, as these criteria approximate two different target quantities. 3.4 Parametric tests It is frequent to apply a Parametric test when there is a prior assumption that a sample came from a distribution of a particular family (examples of distribution families are Gaussian, Binomial, Exponential, Gamma, Beta or Weibull). The parametric tests main aim is to find a statistically significant estimation of a specific parameter, using an hypothesis approach. In this section the Pearson’s coefficient of correlation and the coefficient of determination are reviewed, as these two parametric tests are widely used to assess simulation models. The use of correlation-based measures is criticized in [25, 55]. These studies highlight that correlation-based measures are oversensitive to extreme values (outliers) and insensitive to additive and proportional differences between model predictions and observations. These limitations can induce in wrong acceptance of simulation models, as documented in [55]. Lets consider the mean of the historic data set and the mean of the estimated data set as defined in (3.24). 29
X=1 N N X i=1 xi b X=1 N N X i=1 bxi (3.24) 3.4.1 Coefficient of correlation - r The coefficient of correlation, or Pearson’s Product-Moment Correlation Coefficient r, represents the degree of linear association between two variables and is mathematically defined in (3.25). r= N X i=1 (xi−X)(bxi−b X) "N X i=1 (xi−X)2#0.5"N X i=1 (bxi−b X)2#0.5(3.25) The coefficient rmay assume values between the range [−1,1], and this value is absolute and non-dimensional. The interpretation of this coefficient is detailed in [49]. Accordingly, (i) a correlation coefficient of zero indicates that no association exists between the measured variables, (ii) a positive correlation coefficient indicates that an increase in the first variable would correspond to an increase in the second variable, and (iii) a negative correlation indicates that whereas one variable increases, the second variable decreases. As Taylor [49] explains, a statistically significant rcoefficient can only indicate that the observed sample data provides evidence to reject the null hypothesis that the population correlation coefficient parameter ris zero. The rejection of the null hypothesis allow to conclude that the correlation coefficient of the population is not equal to zero. Under the context of validation of simulation models, it is desirable a value of rstatically significant and positive, therefore the hypothesis test should be formulated as specified in (3.26). The application of this test can only be made under the following assumptions considering both samples: the samples are random, quantitative, normally distributed, linearly related and have the same variance (homoscedasticity). 30
ri=the rank assigned to (xi,bxi)if di>0 ri=the negative of the rank assigned to (xi,bxi)if di<0 (3.38) The assumptions underlying the Wilcoxon Signed Rank Test are: (i) each difollows a symmetric distribution, (ii) all elements in Dare mutually independent and have the same median, (iii) the elements of Dare measured in an interval scale. The test may be formulated with one-tailed or two-tailed form. Here the two-tailed form is presented in (3.39). H0:E(X) = E(b X) H1:E(X)6=E(b X) (3.39) If the ranking process included ties, the test statistic TS to use in this test is presented in (3.40). TS = N0 X i=1 ri v u u tN0 X i=1 r2 i (3.40) In case of no ties, the test statistic TS+should be adopted, as defined in (3.41). TS+= N X i=1 (riwhere di>0) (3.41) The critical region is defined as presented in (3.42). CR = [0, c1[∪]c2, N0(N0+ 1)/2] (3.42) The values c1and c2are found in the tables with the quantiles for the Wilcoxon Signed Ranks Test Statistic (see [11], pp. 460) to a specified significance level α. If TS or TS+∈ CR, the H0is rejected. If TS or TS+/∈CR, then the H0is accepted and there is statistical evidence to assume that both data sets have identical means with a confidence coefficient of 1−α. 37
3.6 Distance-based measures The validation of simulation models can also be performed with the measurement of the distance between the two data sets under assessment. Several distance-based measures exist in literature, not all can be classified as metrics, and for that reason the term “measures” is preferred. In this section, each data set is used as a vector, as presented in equation (3.43), and all algorithms reviewed aim to found the distance between the two vectors xand b x. x= (x1, x2, x3, . . . , xN)T b x= (bx1,bx2,bx3,...,bxN)T(3.43) 3.6.1 Minkowski distance - dr Minkowski distance is defined in (3.44). dr(X, b X) = N X i=1 |xi−bxi|r!1/r (3.44) Minkowski distance has many variants, depending on the value used for the parameter r, the two most known variants are the Euclidean distance, and the Manhattan distance. Minkowski distance and its variants have been widely used to assess similarity of images [26, 27]. Euclidean Distance - dr=2 Euclidean Distance is a particular case of Minkowski distance, when the parameter r assumes the value 2. dr=2(x,b x) = N X i=1 |xi−bxi|2!1/2 (3.45) Manhattan Distance - dr=1 Manhattan Distance is a particular case of Minkowski distance, when the parameter r assumes the value 1. 38
dr=1(x,b x) = N X i=1 |xi−bxi|(3.46) 3.6.2 Short Time Series Distance - dST S The Short Time Series Distance was firstly proposed by [34] as a measure of similarity between time series with small number of elements. This measure emerges under the context of comparing DNA microarray data. The dST S is further applied to measure similarity over time series by [29], under the study of clustering of time series data. The mathematic definition of dST S is presented in equation (3.47). dST S(x,b x) = v u u tN−1 X i=1 bxi+1 −bxi ti+1 −ti−xi+1 −xi ti+1 −ti2 (3.47) As explained by [34], this measure “corresponds to the square root of the sum of the squared differences of the slopes obtained by considering timeseries as linear functions between measurements”. 3.6.3 Dynamic Time Warping - DTW Dynamic Time Warping DTW is an algorithm which allows the measurement of discrepancy between two data sets. This algorithm was developed under the context of speech recognition, but it may be applied in other research topics, such as the validation of simulation models, as it is suggested in [43, 44]. DTW is a powerful algorithm to identify whether two data sets “match” with each other. As explained in [9], DTW aligns peaks and valleys as much as possible by expanding and compressing the time axis accordingly. This is made by finding the smallest path of distances between two data sets. DTW is applicable for two data sets with different lengths, but as this work is focused on paired data sets, DTW is here considered for data sets with equal length. Let Abe the NxNmatrix where the (ith,jth) element of matrix Acontains the distance between the two points d(xi,bxj). The matrix Ais called cost matrix and is defined in (3.48). The distance used to calculate each element of Ais called cost function, and different cost functions may be applied. Examples of possible cost functions are the euclidean distance d(xi,bxj) = dr=2(xi,bxj)or the squared error d(xi,bxj) = (xi−bxj)2 [43]. In this work, the euclidean distance (see 3.6.1) is always applied as cost function. 39
A= d(x1,bx1)··· d(x1,bxN) . . ..... . . d(xN,bx1)··· d(xN,bxN) (3.48) Matrix Ashould include values for steps that are considered valid, and not valid steps should be left in blank. A new matrix Bis then constructed, using the cost matrix A. The (ith,jth) element of matrix Bstores the minimum cumulative cost to achieve the corresponding position considering the starting point (i= 1,j= 1). The reasoning applied to find the minimum cumulative cost over each combination of positions is the same as the classic algorithms of dynamic programming for the Shortest Path Problem, such as the Dijkstra algorithm. One way to calculate matrix Bis defined in (3.49), as suggested in [43]. B11 =A11 Bij =Aij +min(Bi−1,j−1, Bi−1,j, Bi,j−1),if i∧j6= 1 (3.49) Once the Matrix Bis defined, the construction of the warping path Wis started. A warping path is a set of Kbivariate elements, being K∈[N, 2N−1]. Each element wk= [iw k, jw k](with iw k, jw k∈[1, N]) stores the location positions of the elements of matrix Bcorresponding to the shortest cumulative path between the first (i= 1,j= 1) and last (i=N,j=N) positions. The warping path is thus defined as W=hw1, w2,··· , wKi, subject to the following conditions: •Boundary conditions:w1= [1,1] and wK= [N, N]. This condition obligates the algorithm to start in the first pair of homologous elements, and to finish in the last pair. •Continuity: This condition ensures that all cells chosen from Aare adjacent. The condition is formulated considering wk−1= [iw k−1, jw k−1]and wk= [iw k, jw k], then iw k−iw k−1≤1and jw k−jw k−1≤1. •Monotonicity: The last condition ensures the algorithm to evolve over the matrix A. Considering wk−1= [iw k−1, jw k−1]and wk= [iw k, jw k], then (iw k−iw k−1>0∧jw k− jw k−1≥0) ∨(iw k−iw k−1≥0∧jw k−jw k−1>0). The distance DTW is given by the square root of the element BNN , as defined in 40
(3.50). Note that the DTW distance does not satisfy the triangle inequality: (DTW(a,b)+ DTW(b,c)is not always ≥DTW(a,c)). Therefore, DTW is not a metric. DTW(x,b x) = pBNN (3.50) Note: it is possible to find in literature ambiguities on the meaning of the information stored within the warping path elements wk. For example, in the study [10], the elements wkare firstly defined to store the positions wk= [iw k, jw k](as here defined), and latter they are directly applied to calculate the DTW distance, instead of apply the cumulative cost stored in the matrix Bcorresponding to the position stored in wK. As referenced in [10], when the two data series under assessment have different number of elements, the value obtained in (3.50) should be divided by K(the number of elements found in the warping path), to compensate the lengths divergence. In this work, the data series are considered to be of equal lengths. For that reason, the DTW is defined without considering this compensation, as suggested in the study [43] (pp.5). Lowest values of DTW refer to a better fit between the two data sets. DTW is a scale dependent distance, which does not enable the comparison of this measure over different case studies. Moreover, DTW may return very high values, as they refer to the shortest cumulated distance from A11 to ANN , the values returned by DTW increase with the number of elements within the data sets to be analyzed. When DTW is calculated with the cost function d(xi,bxj)=(xi−bxj)2for each element of matrix A, the value obtained is comparable with the euclidean distance dr=2 defined in section 3.6.1. A direct comparison with the Manhattan Distance dr=1 would never be possible even if the cost function d(xi,bxj) = |(xi−bxj)|was adopted to each element of matrix A, as the DTW includes the square root on the cumulative cost achieved in the element BNN , as it was presented in equation (3.50). Therefore, the DTW can only be compared with the euclidean distance distance dr=2 when: the two data sets have the same length, the calculus is made exactly as defined in equation (3.50) (i.e. without dividing √BNN by K), and the cost function adopted to construct each element of matrix Ais the squared error d(xi,bxj) = (xi−bxj)2. The interpretation of this comparison is explained by [10]: (i) when DTW =dr=2 it means that the shortest path found in matrix Brelates to the diagonal elements, and so there is no evidence that the estimate data set is lagged from the original data set; (ii) when DTW < d2, it means that the warping path Whas elements outside the diagonal of matrix B, and there is evidence of pattern dissimilarity between the two data sets. In the 41
second case, the visual interpretation of matrix Bmay help the identification of calibration improvements in the model. 3.7 Combined measures Lets consider the following three quantities in (3.51). λXX =1 N N X i=1 x2 i λb Xb X=1 N N X i=1 bx2 i λXb X=1 N N X i=1 bxi·xi (3.51) The acceptable values for the metrics presented in this section are not established in literature yet. In [45] the following reference values are indicated: 0in any of the components is the perfect fit between two data series, values below 20% are really good, values between 20% and 30% are considered fair and values above the 30% are cosidered poor. The measures further detailed are normally used to analyze wave form series, from where the component Phase (sometimes called time of arrival) is so important [45, 43]. The meaning of the Phase component is questionable for non wave form series. 3.7.1 Sprague & Gear error- CS&G Sprague & Gear measure considers errors due to magnitude and phase differences. The error in magnitude MS&Gand the error in phase PS&Gare firstly calculated. These two components are then used to calculate CS&Gusing the square root of the sum of the square of the two components. All formulations are detailed in (3.52). 42
MS&G=qλXX λb X b X−1 PS&G=1 πcos−1λX b X √λXX ·λb X b X CS&G=pM2 S&G+P2 S&G (3.52) The application of this measure can be found in the studies [45, 43, 44]. The values of CS&Gmay vary between the range [0,1], and return asymmetric values (meaning that CS&G(X, b X)6=CS&G(b X, X)). Lower values of CS&Gindicate a better fit of the estimated data set. 3.7.2 Russel’s error - CR Russel’s error CRhas two main components of error: magnitude and phase. The phase component PRis calculated exactly as PS&G. The magnitude component is MRis calculated differently, as presented in (3.53). Again, the combination of the two components is made using the square root of the sum of the square of the two components. MR=sign(λXX −λb Xb X)·log10 1 + λXX −λb X b X √λXX ·λb X b X PR=1 πcos−1λX b X √λXX ·λb X b X CR=pM2 R+P2 R (3.53) The Russel’s error is detailed in the studies [43, 44]. The advantage of CRover CS&G error is the overcoming of the asymmetry drawback. 3.7.3 Normalized Integral Square error - CNISE Normalized Integral Square error CNISE considers three main aspects: magnitude,phase and shape. The cross-correlation ρ(n), which was defined in section 3.4.3, is used to calculate the estimated lag nlag. Once nlag is estimated, a shift of nlag is induced to one 43
of the data sets, and with that change the quantity λXb X(nlag)is calculated as defined in (3.51). Next the error measures of magnitude MNISE, phase PNISE and shape SNISE are calculated. The combined error CNISE is then calculated as the sum of the three components, as it is detailed in expressions (3.54). MNISE =ρ(nlag)−2λX b X(nlag) λXX +λb X b X PNISE =2λX b X(nlag)−2λX b X λXX +λb X b X SNISE = 1 −ρ(nlag) CNISE =MNISE +PNISE +SNISE = 1 −2λX b X λXX +λb X b X (3.54) The application of NISE error can be found in the studies [43, 44]. A better estimation of the model is observed to lower values of CNISE. A separated analysis of the components is useful to investigate the error arriving from each component, which may endow the researcher with more information on how to improve the model calibration. 44
Chapter 4 Measuring the Warping Path Distortion This chapter includes the proposal of two new performance criteria: Warping Path Distortion- WPD and the Percentage Warping Path Distortion- PWPD. The theoretical definition of WPD and PWPD is firstly provided. PWPD is defined as a percentage of WPD. The chapter proceeds with the application of both measures to a practical example. 4.1 Warping Path Distortion- WPD The Warping Path Distortion WPD is a new performance criterion proposed in this thesis, based on the Dynamic Time Warping DTW algorithm. WPD returns the average distance between the positions stored within the warping path Wwith the corresponding nearest positions of the diagonal of matrix B(3.49). When the two data sets follow similar patterns over time, the positions stored within the warping path Ware expected to coincide with the position of the diagonal of matrix B. In this case, the value returned by WPD is zero (the distance between the positions stored in Wand the positions corresponding to the diagonal of matrix Bis null). When the two data sets have different patterns, WPD is expected to return a level on the distortion between the two patterns. Therefore, WPD may be interpreted as the dissimilarity between the two patterns under analysis. Next, the mathematical formulation of WPDis presented. The nearest position of the diagonal of matrix Bto an arbitrary position stored within the warping path wk= [iw k, jw k] is defined as pk= [ip k, ip k]. The distance between an arbitrary wkto the corresponding pk may be visualized by tracing a line amid these two positions, perpendicularly to direction of matrix Bdiagonal, see Figure 4.3 visualization 2. The calculus of ip kis presented in (4.1). Note that all elements in diagonal are sym- 45
metric, thus the elements integrating pkare both designated as ip k. A diagonal position pkmay be integrated with values multiples of 0.5. The set of nearest diagonal positions relating to an arbitrary warping path Wis defined as P=hp1, p2,··· , pKi. ip k= iw k−jw k 2+min(iw k, jw k)(4.1) The distance between an arbitrary wkto the corresponding nearest position on diagonal of matrix B,pk, is then calculated using the Manhattan Distance dr=1 (see section 3.6.1) as described in (4.2). dr=1(wk, pk) = |iw k−ip k|+|jw k−ip k|(4.2) The Warping Path Distortion WPDis estimated as the average of the distances dr=1(wk, pk), considering k= (2, ..., K −1), as described in equation (4.3). The extremity elements w1and wKare excluded. These two elements include always the same positions (w1= [1,1], wK= [N, N]) due to the boundary conditions, as specified in section 3.6.3. Therefore, they do not reflect any information on the dissimilarity between the two data sets under assessment. WPD =1 K−2 K−1 X k=2 dr=1(wk, pk)(4.3) WPD is a scale independent measure. Therefore, WPD may be compared over different case studies provided the length of the vectors is the same. This restriction occurs as WPDdepends on the size of the data sets analyzed N. The values returned by WPD are included within the range WPD ∈[0,(N−1)2 K−2[. A lower value of WPD is associated with a better fit of the estimated model. The perfect fit would return a WPD value of zero, and a completely distorted pair of vectors would return the worst value of WPD: asymptotically (N−1)2 K−2. An example of “the worst case” is provided in Figure 4.1. 4.2 Percentage Warping Path Distortion - PWPD The WPD may be used to calculate the correspondent percentage measure, the Percentage Warping Path Distortion PWPD. This measure indicates the percentage distortion of a warping path concerning the diagonal of the respective matrix B. This measure is calculated with the division of WPD by the maximum possible value that WPD may 46
Figure 5.1: Diagram representing the algorithm followed by PoFi. This diagram explores the transition of one firm during one iteration (between t and t+1). State of the firm: X, sector of the firm: S, age: A, geographical region: N, dimension: D, variation of dimension: ∆d. Alentejo and Algarve. The third dimension refers to the time evolution in years. The fourth dimension includes information on the following categories: (i) state of firms - alive or dead, (ii) age in years, (iii) sector including a) agriculture and fisheries, b) industry, c) construction, d) services, (iv) dimension that encompasses four levels of firms’ size. The model evolves according to micro rules established for each cell on the four dimensional array, following an annual periodicity. The Conway’s Game of life [15] was used as a starting point of PoFi, from where more variables and rules were considered. The rules specified for each cell within an arbitrary iteration (i.e. between time tand time t+ 1) are described in Figure 5.1, which is organized in four main phases. The first phase identifies the current state of a firm. When the firm is alive its state is 1 (Xt= 1), and when the firm is dead its state is 0(Xt= 0). Depending on the current state, the model follows different paths. 5.1.1 Algorithm used when a firm is dead Considering that the current state is dead, the second phase will decide the potential success of the firm to be born or to continue dead, considering the number of living firms close to the firm in study. The close firms considered are those within a radius of one cell. If the firm’s state is kept in 0, null values are kept for all characteristics. In case the firm’s state is changed to 1, the algorithm evolves to the next phase. 53
The third phase selects the activity sector for the born firm. The model includes different probabilities for the selection of each sector of activity considering the NUTS of the firm. These probabilities are the average proportion of observed firms of each sector within each zone considering the aggregation of all years. In this phase, a uniform random number is generated, and the selection of the sector is carried out with the comparison of the random number obtained and the probability values found. The fourth phase considers two features to define the probability associated to the dimension definition: NUTS and the sector of activity (i.e. it considers the average proportion of observed firms of each dimension within each sector within each zone, in real data). This phase also uses uniform random numbers to perform the decision of the dimension of the new firm. At this stage, all characteristics of a new firm are defined. The respective information is saved and used on a new iteration. 5.1.2 Algorithm used when a firm is alive When the initial state of a firm is 1, meaning that the firm is alive, the second phase decides on the survival of this firm. The survival decision is made considering the number of firms living within the radius of one cell to the cell under assessment. If the firm dies, all characteristics are set to zero. If the firm survives, the next phase is pursued. The third phase defines information on two characteristics: sector and age. The sector of a surviving firm is not changed. The generality of the defined classes is so pervasive that it is considered very unlikely that a firm performs this change. The variable age is incremented in one unit every time a firm survives (note that when a firm is born, its age is still zero, and that a firm only have the first year completed when it achieves the first year of survival). The fourth phase defines the new value of the firm’s dimension. This is formulated considering the assumption that a firm will have a maximum absolute size variation of one per iteration (i.e. in each iteration the dimension can be incremented by −1,0or 1). This variation is determined with base on the proportion of observed firms changing its dimension as a probability. 5.2 Results The model provided results concerning each of the characteristics simulated. Next, the results obtained concerning the number of living firms in each zone are analyzed. Figure 5.2 presents the number of living firms simulated alongside with the respective historic records. The next sections include the validation assessment for each zone separately. The Performance criteria further analyzed were calculated considering values in 103units, using the R software for statistics [40]. The Parametric tests should not be calculated for this example, as the samples have a size of N= 25, and the condition of normality is not ensured. Nevertheless, and knowing that 54
Error Based Measures ME −9.199 MAE 26.863 MSE 911.899 RMSE 30.198 U10.174 U20.356 MP E −0.283 MAP E 0.433 MASE 6.568 Information Theory Measures HSHS(X) 3.138 HS(X, b X) 3.865 I(X, b X) 2.478 NMI(X, b X) 0.789 Id(X, b X) 0.210 Distance Based measures Euclidean distance 150.988 Manhattan distance 671.573 dST S 64.476 DTW 21.045 Distortion Path Measures DWP 5.432 PDWP 0.415 Parametric Tests Pearson r0.396 p-value 0.049 R20.157 ρ(n)ρ(nlag) 0.415 nlag 2 Nonparametric Tests Sign test TS 14 CRα=0.05 [0,7.6[∪]17.4,25] Spearman rS0.397 CRα=0.05 ]0.337,+∞[ Kendall τ0.29 p-value 0.049 Wilcoxon TS 105 p-value 0.127 Combined measures S&G MS&G−0.048 PS&G0.318 CS&G0.322 Russel MR−0.041 PR0.318 CR0.320 NISE MNISE −0.525 PNISE 0.001 SNISE 0.585 CNISE 0.060 Table 5.1: Performance Criteria summary for the number of firms in Norte. this restriction is relaxed, the values on these criteria are presented and discussed. Only two normalized information measures are further presented, as they all lead to similar conclusions and the analysis of one NMI and one Idis considered sufficient to demonstrate how these measures behave. Following the same reasoning on the calculus of Percentage Error PE (always in order to the observed values), the NMI further presented refer to the division of the mutual information MI(X, b X)by the entropy of the observed data set H(X). The second normalized information measure analyzed is the corresponding information distance Id= 1 − NMI. 5.2.1 Number of firms in Norte The performance criteria obtained for the number of firms in Norte are presented in Table 5.2.1, and the Warping path obtained is illustrated in Figure 5.2.1. The analysis of the number of firms in Norte is made with a single estimated data set. Consequently, isolated values of ME,MAE,MSE and RMSE do not endow a proper conclusion on the goodness of fit of this feature. These measures are not comparable over the remainder ex- 55
Figure 5.2: Simulated and observed data from the Portuguese case study. 56
Figure 5.3: Warping path visualization for the number of firms in Norte. periments presented in this section, they would only be comparable for different forecasts of the same feature. The same reasoning is applicable for the remainder experiments on Centro,Lisboa, Alentejo and Algarve. The value obtained with the Theil’s coefficient for forecast accuracy U1returned the worst value for the Norte forecast over the five experiments conducted. The value of 0.174 cannot be considered as a good estimate, as it is not close the reference value of 0. The coefficient U2 returned a value lower than 1, which indicates that the estimation obtained has lower standard error as the naive no-change extrapolation. If the value obtained with U2was larger than 1, the model should be rejected as in that case the standard error obtained with the forecast would be worst than the simples no-change extrapolation. The negative sign obtained with ME and MP E indicates that the estimation of Norte feature returns in average higher values than the ones observed. This conclusion may be verified with the visualization of Figure 5.2, and is important for future calibration of the model. These measures, alongside with MS&Gand MRallow to draw similar conclusions. The percentage-based error measures are more intuitive as they allow the goodness of fit assessment for a single estimation and they are comparable over experiments on different features. The mean percentage error of −28.3% indicates that b Xvalues are in average 28.3% above X(as it is observed till the 15th year considered). The mean absolute percentage error indicates that in average the estimations b Xare distanced from the historic record Xin 43.3%, which is a high value showing the bad fitness obtained for this feature. The Norte case has the worst MASE value over the five experiments under assessment in this section. As the range of MASE is [0,+∞[, the value 6.568 here obtained purports more 57
information when compared with other MASE values. As MASE is scale-free, the values of this measure are comparable over results on different features. The entropy value obtained for the observed data set is similar to the joint entropy over the two data sets. However, the mutual information shows that the two series are not similar, since the mutual information is considerably lower than the joint entropy. The normalized mutual information allows a more intuitive assessment on the quantity of information shared by the two data sets, that can be interpreted as a percentage of 78.9%. This means that the two data set share 78.9% of information, and this value is too low to be considered a good result (the perfect fit would return the value 100.0%). As it was expected, the normalized information distance, aproximately 21.0%, is too high to be considered a good estimation (the perfect fit would return the value of 0.0%. These measures indicate that the simulated data set is a bad representation of reality concerning the quantity of information. The parametric test on the Pearson’s correlation coefficient indicates a positive correlation of r= 0.396, with a statistical significance of 0.049. The coefficient of determination is low, meaning that the simulated data explains only a small portion of the variability observed in reality. The cross correlation shows that the simulated data would better fit the historic records with a lag of two temporal units. The Sign test does not reject the null hypothesis of equality of Xand b Xmedians, thus, considering a statistical significance of α= 0.05, these medians are similar. The Spearman correlation returns a positive and statistically significant correlation, considering α= 0.05. This evaluation may concluded as rS∈CRα=0.05, thus the null hypothesis is rejected. Note that for an α= 0.01, this correlation is no longer significant. For this case, the Spearman’s correlation test should be adopted instead of Pearson, as the size of the data sets is small. The Kendall’s τobtained indicates a moderate and positive correlation, with a p-value of 0.049. The Wilcoxon test for means does not allow the rejection of the null hypothesis E(X) = E(b X), as the p-value obtained is higher than α= 0.05. Therefore, there is no statistical evidence to assume that the means followed by Xand b Xare different, and the null hypothesis is kept. The values returned by the distances dr=2 and dr=1 seem to be high, but without an equivalent comparison, the information these criteria have is limited. High values of these distances indicate that the two data sets are in average separated from each other by high amplitudes. In fact, the visualization of Figure 5.2 for the Norte case indicates this same conclusion. The distance dST S provides a different assessment. It indicates a measurement on the average amplitude divergence over consecutive temporal moments, between the two data sets. In this case, the square root of the sum of the squared differences of the slopes between temporal moments returned the value dST S = 64,476. The complex interpretation of this measure is one of its drawbacks. 58
The values obtained with DT W does not include much information without a comparison of the same measure with a different forecast for the same case study. One of the main drawbacks of DT W is its dependency on the observations scale and on the length of the data sets. Note that the cost function used to construct the matrix Awas not the squared error, and therefore the DT W values here presented are not comparable with the euclidean distance dr=2. Concerning the combined measures, the phase components PS&Gand PRare suitable to assess lag on series with sinusoidal behavior, or wave form, as explained in [45]. This is not the case for the experiments conducted in this section, and so, these phase indicators are meaningless. Concerning the phase component of NISE, it relates with the results obtained for the number of periods of lag with ρ(n). For the experiment Norte, as nlag was set to 2, the PNISE returns a value slightly different from zero. For the remainder experiments, where nlag = 0, the PNISE = 0 as well. The magnitude components MS&Gand MRwere analyzed alongside with the sign returned by ME and MPE. These magnitude components return values within the range ]−1,1[, and are frequently interpreted as a percentage of magnitude discrepancy on the series under analysis. Concerning the MNISE, it returns values within the range [−1,0], from where it provides information that should be interpreted as the absolute magnitude percentage deviation. For the Norte case, the MNISE returns a percentage deviation of 25,5%, that is a really bad estimation, and more severe than the MAPE estimation. The shape component SNISE returns values within [0,1], being 0the best possible result indicating a good pattern similarity and 1the worst possible result indicating a bad similarity. For the Norte estimation SNISE = 0.585, that is a bad pattern similarity. This measure may be compared with PDW P , as they assess the same characteristic although using different methodologies. Note that PDW P returns values within the same range and with similar interpretation as SNISE. The result obtained with P DW P is however less severe than SNISE, and these two measures indicate a considerably bad pattern similarity. The value returned by WPD was 5,432 out of a maximum of 13.091. This result indicates a bad pattern similarity between the two data sets. This dissimilarity is also observable in Figure 5.2.1, showing that the Warping Path is highly divergent from the reference position from diagonal. The value P DW P quantifies this divergence in 41.5%. 5.2.2 Number of firms in Centro The performance indexes obtained for the number of firms in the zone Centro are presented in Table 5.2.2, and the warping path obtained for the two time series is shown in Figure 5.2.2. The measures ME, MAE, MSE and RMSE are lower for the estimated number of firms in Centro than in Norte. Although this comparison is tempting, it should not be made, as scalebased errors are not suitable to assess estimates over different features. The error-based measures 59
Error Based Measures ME −5.643 MAE 14.749 MSE 289.460 RMSE 17.014 U10.156 U20.319 MP E −0.289 MAP E 0.411 MASE 5.757 Information Theory Measures HSHS(X) 3.120 HS(X, b X) 3.852 I(X, b X) 2.465 NMI(X, b X) 0.790 Id(X, b X) 0.210 Distance Based measures Euclidean distance 85.068 Manhattan distance 368.722 dST S 28.981 DTW 14.101 Distortion Path Measures DWP 5.163 PDWP 0.385 Parametric Tests Pearson r0.688 p-value 0.000 R20.473 ρ(n)ρ(nlag) 0.688 nlag 0 Nonparametric Tests Sign test TS 15 CRα=0.05 [0,7.6[∪]17.4,25] Spearman rS0.791 CRα=0.05 ]0.337,+∞[ Kendall τ0.628 p-value 0.000 Wilcoxon TS 99 p-value 0.090 Combined measures S&G MS&G−0.039 PS&G0.318 CS&G0.321 Russel MR−0.034 PR0.318 CR0.318 NISE MNISE −0.264 PNISE 0.000 SNISE 0.312 CNISE 0.049 Table 5.2: Performance Criteria summary for the number of firms in Centro. Figure 5.4: Warping path visualization for the number of firms in Centro. 60
suitable to address this comparison are MPE, MAPE and MASE. The value obtained with U1is slightly better than the correspondent value obtained for Norte, but it cannot be considered a good estimate since it is not close to the reference 0. The value obtained with U2is lower than the reference 1, indicating that this forecast has lower standard error than the simple naive no-change extrapolation. The negative sign obtained with ME, MPE, MS&Gand MRindicate that this estimation returns in average higher values than the respective historic records. Figure 5.2.2 shows that the number of estimated firms is always higher than the historic record till the 16th year simulated. Future calibration of this model should be conducted to improve this misalignment. The MPE for Centro shows a divergence between estimated and observed data slightly higher than the one observed in Norte case, with a result of −28.9%, indicating that b Xis in average 28.9% above X. Therefore, with the MPE criterion, Centro would be a worst estimation in comparison with Norte. MAPE shows the contrary conclusion. The MAPE value for Centro is better than the MAPE value for Norte. This disagreement is perfectly understandable as MPE is a measure that offsets positive and negative values of error. A better comparison over different estimations is achieved with the MAPE measure, which does not offsets positive or negative values. The conclusion taken with MASE is similar to the one obtained with MAPE, the estimation for Centro are better than the ones for Norte. This conclusion is taken as the MASE value for Centro is lower than the one observed for Norte. MAPE has the advantage of being defined within the closed range [0,1], which is a more intuitive assessment. The results obtained for Centro concerning the information theory measures are similar to the ones drawn for the Norte experiment. The normalized mutual information is perhaps the most intuitive information measure over the four analyzed, which indicates that only 79.0% of the information contained in Xis contained in b X. The Pearson’s correlation tests indicates that both estimated and historic data sets for Centro are positively correlated, with a high statistical significance (p-value= 0.000). The coefficient of determination indicates that the variability explained by the model is 0.473 out of 1. The cross correlation indicates that the simulated data would not provide a better fit with any lag on temporal units. The TS obtained with the Sign test is not included within the critical region defined, from where the null hypothesis that tests the equality of Xand b Xmedians is not rejected, meaning that the two medians are considered similar for a statistical significance of α= 0.05. The Spearman’s correlation returns a positive and statistically significant correlation, for α= 0.05. This conclusion is taken as rS∈CRα=0.05, and consequently the null hypothesis testing no correlation is rejected. For an α= 0.01 this correlation keeps to be significant (CRα=0.01 = ]0.466,+∞[). The Kendall’s τobtained indicate a strong and positive correlation, with a p-value of 0.000, 61
Figure 5.5: Warping path visualization for the number of firms in Lisboa. meaning that the two data series are positively correlated for any significance coefficient αconsidered. The Wilcoxon test for means do not reject the null hypothesis E(X) = E(b X), as the p-value obtained is higher than α= 0.05. Therefore, the null hypothesis of equality of the means followed by the two data series is kept. The distances dr=2 and dr=1 returned lower values for Centro in comparison with Norte. This means that the estimated and observed data sets are closer for the Centro experiment than for the Norte experiment. This result suggests the Centro estimations to be better than the Norte ones. The distance dST S indicates that the slope divergence between each pair of consecutive temporal moments in Centro is lower than in Norte. Therefore, this criterion suggests Centro to be a better estimation than Norte. The comparison of the DT W values indicate similar conclusions. As for the Centro experiment, nlag = 0, the phase component of NISE is 0as well. The MNISE indicates that the two data series are deviated from one another in 26,4%, which indicates high diferences concerning this characteristic. The shape component SNISE for this case was 0.312, indicating that the patterns are not similar, although it is a better result than the one obtained for Norte. A similar conclusion is obtained with PDW P , with a value of 0.385. 5.2.3 Number of firms in Lisboa The performance indexes obtained for the number of firms in Lisboa are presented in Table 5.2.3. The Warping path obtained for this experiment is illustrated in Figure 5.2.3. 62
both cases, the null hypothesis rS= 0 is always rejected. The Kendall’s τobtained suggests that the two data sets are positively correlated, with τ= 0.774. This correlation is statistically significant for any αconsidered. The Wilcoxon test for means returned a p-value of 0.200, that is higher than α= 0.05 and consequently the null hypothesis of E(X) = E(b X)is not rejected. Thus the assumption of equality of the means followed by the two data sets under analysis is kept. Concerning the distance measures, the Algarve returned the lowest values over the five experiments. This means that considering the distance measures, Algarve would be the best forecast among the five analysed. For the Algarve experiment, the PNISE value is zero as the nlag is zero as well. The assessment of magnitude deviation with MNISE returned the best result over the five cases, with MNISE = 7.2%. This result is in accordance with the MASE result. The measures of shape component SNISE and PDW P returned for Algarve the best results over all experiments, suggesting that this was the best estimation provided by the model concerning the pattern adjustment. 69
Chapter 6 Conclusions A computational simulation model is designed to validate or reject the hypothesis formulated in the conceptual model. A simulation model can be accepted as valid for specific conditions only, which means that under the assumptions specified, the model reproduces well the task for which it was designed. To prove that a model reproduces well its task, the standard procedures to confirm scientific theories should be followed [41]. These procedures include the use of data from the reality under study to confront the results obtained with the model. This confront happens within the phases of calibration and validation. The outcomes from validation determine weather the hypothesis formulated in the conceptual model should be accepted or rejected. Each phase integrating the process described of constructing a simulation model, encompasses many complex aspects. This work tried to investigate one of these aspects: the adequate performance criteria to use under a validation process. The performance criteria considered in this work are those adequate to assess the goodness of fit between paired data samples, always considering the paired data sample to be the observed and simulated data sets. The main contributions of this thesis are (i) the bibliographic overview on performance criteria, (ii) the proposal of two new performance criteria, the Warping Path Distortion WPD and the Percentage Warping Path Distortion PWPD, and (iii) the comparative analysis of the criteria reviewed under practical experiments. Next the main advantages and drawbacks identified in this work for the criteria reviewed are detailed. The measures Mean Error ME, Mean Absolute Error MAE, Mean Square Error MSE and Root Mean Square Error RMSE are useful when applied to assess different runs on the same feature of the same case study. Only in that situation can these measures be compared. The Theil’s coefficient for forecast accuracy U1returns values included within the range [0,1] and indicates good estimates for values close to zero. This is a scale independent measure that can be directly compared over different case studies. However, U1does not have an accuracy frontier to precisely define weather a validation result should be rejected or accepted. Therefore, 70
the analysis made with this measure are always subjective when assessing a single estimation. U1 is more advantageous when applied to compare the accuracy over different estimates. The coefficient for forecast quality U2returns values within the range [0,+∞[, being the value 0indicative of a perfect forecast. Values lower than 1indicates that the estimation obtained has lower standard error as the naive no-change extrapolation. If a value larger or equal to 1is obtained for the U2criterion, the model should be rejected as in that case the standard error obtained with the forecast would be worst than the simples no-change extrapolation. The sign obtained with the measures ME, Mean Percentage Error MP E, Sprague and Gear magnitude error MS&Gand Russel’s magnitude error MRis negative when the estimated data returns in average higher values than the ones observed, and positive otherwise. The identification of magnitude divergences is a good starting point to improve future calibration on models. The calibration of the model concerning the magnitude should be made together with the visualization of the corresponding plots. The visual observation is important as, for example, in the Norte experiment, negative values were obtained for these measures, and the calibration needed in this case is more related with an improvement on the resultant slant than the blind decrease of the estimated values. The criterion Mean Absolute Scaled Error MASE returns values within the range [0,+∞[. Since this measure is not normalized, its applicability is more useful to compare results over different estimations than to assess the goodness of fitness of an isolated estimation. MASE is based on the absolute errors incurred by the estimation, while Mean Absolute Percentage Error MAPE is based on the percentage errors obtained. For this reason, the comparison of the quality of adjustment between Alentejo and Algarve returned different conclusions with MASE and MAP E. The information theory measures returned the severest validation results, indicating that all the five estimated data sets are very poor. The Normalized Mutual Information NMI and Normalized information distance Id showed to be valuable performance criteria due to its easiness of interpretation: both return values within the range [0,1] and can be interpreted as information percentages. The parametric test of Pearson’s correlation r, and the parametric measures Coefficient of determination R2and Cross correlation ρ(n)should not be conducted without demonstrating the normality of the samples’ population. These criteria were presented for the five experiments with the relaxation of this main assumption, in order to provide a fuller comparative criteria assessment. As explained by [25], rand R2are insensitive to additive and proportional differences between simulated and observed homologous elements. This is the main drawback of these two criteria. The distance between the two data sets (considered as two points points defined within a N-dimensional space) is a valuable performance criteria. The Euclidean distance dr=2 and the Manhattan distance dr=1 indicate better estimations for values close to zero. When a single experiment is provided, the distance value does not provide much information, similarly to the reasoning 71
explained for ME,MAE,MSE and RMSE. The Short Time Series distance dSTS returns a measurement on the average amplitude divergence over consecutive temporal moments between two data sets. To be precise, it returns the square root of the sum of the squared differences of the slopes between temporal moments. The complex interpretation of this measure is found to be its main disadvantage. Moreover, dST S is insensitive to additive differences between the two data sets under assessment. For example, considering the situation where bxi=xi+ 1,∀i, the value dSTS = 0 would be obtained, which is the reference value for a perfect fit. Another distance measure revised is the Dynamic Time Warping DT W . The comparison between the measures DT W and dr=2 is possible. This comparison can only be made when: (i) the two data sets Xand b Xhave the same length, (ii) DT W is calculated as defined in equation (3.50), and (iii) the cost function used to calculate matrix A(3.48) is the squared error d(xi,bxj) = (xi−bxj)2. When this three conditions are ensured, DT W values closer to dr=2 indicate a higher similarity between the two patterns. However, this comparison would not indicate how much similar the two patterns are, due to the scale-dependency of both measures. The DT W values analyzed in chapter 5 used the euclidean distance d(xi,bxj) = dr=2(xi,bxj) as the cost function to calculate the elements of matrix A(3.48), from where the values of DT W reported were not comparable with the dr=2(X, b X). The main drawback identified for the DT W is that it is dependent on the scale and on the length of the observations analyzed. This constrains the assessment of forecasts relating to different case studies with DT W . The Warping Path Distortion WPD is based on the warping path constructed within the DT W algorithm. WPD returns the average distance between the Warping Path and the corresponding diagonal positions. The measure WPDhas the advantage of being scale independent, from where it may be used to compare the accuracy of different forecasts. WPD main disadvantage is that it depends on the number of observations within the data sets N. This means that it should only be used to compare different case studies provided the length of the data sets used is similar. Values of WPD close to zero indicate a better fit. The maximum value observable with WPD vary depending on Nand on the number of elements integrating the respective Warping Path K. The disadvantage identified with WPD is surpassed by the Percentage Warping Path Distortion PWPD.PWPDis not dependent on the observations scale nor the number of observations. The values returned by PWPDare easily interpreted as percentages, as they vary within the range [0,1]. The perfect pattern similarity returns a PWPDvalue of zero. The worst pattern dissimilarity would return the asymptotic PWPDvalue of one, as it was illustrated in Figure 4.1. Although the two measures proposed behaved as expected under the experiments analyzed, further applicability of these measures to benchmark data sets is necessary to provide a proper conclusion on its quality. 72
The Sprague and Gear phase error PS&Gand Russel’s phase error PRare suitable to assess lag on series with sinusoidal behavior, or wave form, as explained in [45]. Therefore, the application of these measures to the case study of Portuguese firms are meaningless. The Normalized Integral Square phase error PNISE is related with the results obtained with ρ(n). When the number of temporal periods of lag nlag obtained with ρ(n)is different from 0, PNISE returns values different from zero. When nlag = 0, the PNISE = 0 as well. The Sprague and Gear magnitude error MS&Gand Russel’s magnitude error MRreturn values within the range ]−1,1[. They are interpreted as the percentage magnitude discrepancy between the series under analysis, with sensitivity to the sign of the discrepancy (similar reasoning as MPE). Concerning the Normalized Integral Square magnitude error MNISE, it returns values within the range [−1,0], and is interpreted as an absolute magnitude percentage deviation (besides the negative sign). The values obtained with MNISE have similar interpretation to the MAPE measure. The shape component Normalized Integral Square shape error SNISE returns values within the range [0,1], being 0the best possible result indicating a good pattern similarity and 1the worst possible result indicating a bad similarity. The measure PDW P returns values within the same range and with the same interpretation as SNISE. It would be almost impossible to encompass all performance criteria referenced in literature. Nevertheless this thesis is at least a starting point to guide the choice of an adequate performance criterion for a specific validation model. Future research may include the study on how to apply the Simple String Distance Metric, suggested in [12], to a general process of validation. This measure was suggested under the context of validation of DNA simulated patterns. Another interesting issue to explore under this context, is the use of combined graphical and statistical approaches, that is summarily described in the review paper on validation [6]. Another relevant topic for future research would be the comparative assessment on the computational effort of performance criteria. 73
Bibliography [1] C. Adami. The use of information theory in evolutionary biology. Annals of the New York Academy of Sciences, 1256:49–65, 2012. [2] Hirotugu Akaike. A new look at the statistical model identification. IEEE Transactions on Automatic Control, AC-19(6):716–723, 1974. [3] Hirotugu Akaike. Likelihood of a model and information criteria. Journal of Econometrics, 16:3–14, 1981. [4] J.S. Armstrong and F. Collopy. Error measures for generalizing about forecasting methods: Empirical comparisons. International Journal of Forecasting, 8:69–80, 1992. [5] Vic Barnett. Sample Survey Principles and Methods. John Wiley & Sons, 2003. [6] Gianni Bellocchi, Mike Rivington, Marcello Donatelli, and Keith Matthews. Validation of biophysical models: issues and methodologies. a review. Agronomy for Sustainable Development, 30(1):109–130, 2009. [7] R. J. Bessa. Treino on line de redes neuronais com crit´ erios de informac¸˜ ao aplicado ` a previs˜ ao e´ olica. Master’s thesis, Faculdade de Economia da Universidade do Porto, 2008. [8] Friedhelm Bliemel. Theil’s forecast accuracy coefficient: A clarification. Journal of Marketing Research, 10:444–446, 1973. [9] Franky Kin Pong Chan and Ada Wai chee Fu. Haar wavelets for efficient similarity search of time series: With and without time warping. IEEE Transactions on Knowledge and Data Engineering, 15(3):686–705, 2003. [10] Selina Chu, Eamonn Keogh, David Hart, and Michael Pazzani. Iterative deepening dynamic time warping for time series. In Proceedings of the 2nd SIAM international conference on data mining., 2002. [11] W. J. Conover. Practical Nonparametric Statistics. John Wiley & sons, 2nd edition, 1980. [12] J.E. Cook and A.L. Wolf. Toward metrics for process validation. In Proceedings of the Third International Conference on the Software Process, pages 33–44, 1994. 74
[13] Kevin K. Dobbin and Richard M. Simon. Optimally splitting cases for training and testing high dimensional classifiers, volume 4. 2011. [14] Giorgio Fagiolo, Alessio Moneta, and Paul Windrum. A critical guide to empirical validation of agent based models in economics: Methodologies, procedures, and open problems. Computational Economics, 30:195–226, 2007. [15] M. Gardner. Mathematical games the fantastic combinations of John Conway’s new solitaire game of life. Scientific American, 223, 1970. [16] Nigel Gilbert and Klaus G. Troitzsch. Simulation for the Social Scientist. Open University Press, Buckingham, Philadelphia, 1999. [17] D. Gujarati. Econometria. McGrow Hill, 2nd edition, 1996. [18] Rob J. Hyndman. Another look at forecast accuracy metrics for intermittent demand. Foresight, 4:43–46, 2006. [19] Rob J. Hyndman and Anne B. Koehler. Another look at measures of forecast accuracy. International Journal of Forecasting, 22:679–688, 2006. [20] X. Jiang and S. Mahadevan. Bayesian cross entropy methodology for optimal design of validation experiments. Measurement Science and Technology, 17(7):1895–1908, 2006. [21] V. Klemeˇ s. Operational testing of hydrological simulation models. Hydrological Sciences, 31(1):13–24, 1986. [22] L.F. Konikow and J.D. Bredehoeft. Ground water models cannot be validated. Validation of Geo-hydrological Models, 15(1):75–83, 2003. [23] Jouni Kuha. AIC and BIC comparisons of assumptions and performance. Sociological Methods & Research, 33(2):188–229, 2004. [24] Thomas S. Kuhn. The Structure of Scientific Revolutions. Chicago: University of Chicago Press, 1962. [25] David R. Legates, McCabe Jr., and Gregory J. Evaluating the use of goodness of fit measures in hydrologic and hydroclimatic model validation. Water Resources Research, 35(1):233– 241, 1999. [26] Beitao Li, Edward Chang, and Ching-Tung Wu. DPF a perceptual distance function for image retrieval. In IEEE 2002 International Conference on Image Processing, 2002. [27] Beitao Li, Edward Chang, and Yi Wu. Discovery of a perceptual distance function for measuring image similarity. Multimedia Systems, 8, 2003. 75
[28] Wentian Li. Mutual information functions versus correlation functions. Journal of Statistical Physics, 60(5–6):823–837, 1990. [29] T. Warren Liao. Clustering of time series data a survey. Pattern Recognition, 38(11):1857– 1874, 2005. [30] Iain L. MacDonald and Walter Zucchini. Hidden Markov and Other Models for Discretevalued Time Series. Springer, 1997. [31] M.D. McDonnell, S. Ikeda, and J.H. Manton. An introductory review of information theory in the context of computational neuroscience. Biological Cybernetics, 105(1):55–70, 2011. [32] Tom M. Mitchell. Machine Learning. The McGraw Hill Companies, Inc. [33] Bruce Mizrach. The distribution of the Theil U statistic in bivariate normal populations. Economics Letters, 38(2):163–167, 1992. [34] C.S. Moller Levet, F. Klawonn, K.H. Cho, and O. Wolkenhauer. Fuzzy clustering of short time series and unevenly distributed sampling points. In Proceedings of the 5th International Symposium on Intelligent Data Analysis, Berlin, Germany., 2003. [35] N. Oreskes, K. Shrader-Frechette, and K. Belitz. Verification, validation, and confirmation of numerical models in the earth sciences. Science, New Series, 263(5147):641–646, 1994. [36] Sanghyun Park and Vijay S. Pande. Validation of Markov state models using shannon’s entropy. The Journal of Chemical Physics, 124(054118):1–5, 2006. [37] K. Popper. The Logic of Scientific Discovery. London: Hutchingson Co, 1959. [38] D. Posada and T.R. Buckley. Model selection and model averaging in phylogenetics: Advantages of Akaike Information Criterion and Bayesian approaches over likelihood ratio tests. Systematic Biology, 53(5):793–808, 2004. [39] J. C. Principe. Information Theoretic Learning Renyi’s Entropy and Kernel Perspectives. Springer, 2010. [40] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria, 2012. [41] J.C. Refsgaard and H.J. Henriksen. Modelling guidelines terminology and guiding principles. Advances in Water Resources, 27:71–82, 2004. [42] R.G. Sargent. Validation and verification of simulation models. In Proceedings of the 2004 Winter Simulation Conference, 2004. 76
[43] H. Sarin, M. Kokkolaras, G. Hulbert, P. Papalambros, S. Barbat, and R. J. Yang. A comprehensive metric for comparing time histories in validation of simulation models with emphasis on vehicle safety applications. In Proceedings of DETC 08, ASME 2008 International Design Engineering Technical Conferences and Computers and Information in Engineering Conference, 2008. [44] H. Sarin, M. Kokkolaras, G. Hulbert, P. Papalambros, S. Barbat, and R. J. Yang. Comparing time histories for validation of simulation models: Error measures and metrics. Journal of Dynamic Systems, Measurement, and Control, 132(6):1–10, 2010. [45] Leonard E. Schwer. Validation metrics for response histories: perspectives and case studies. Engineering with Computers, 23(4):295–309, 2007. [46] C.E. Shannon. A mathematical theory of communication. The Bell System Technical Journal, 27:379–423,623–656, 1948. [47] P. Sprent. Applied Nonparametric Statistical Methods. Chapman & Hall, 2nd edition, 1993. [48] Leon S. Sterling and Kuldar Taveter. The Art of Agent Oriented Modeling. The MIT Press. [49] Richard Taylor. Interpretation of the correlation coefficient: A basic review. Journal of Diagnostic Medical Sonography, 6(1):35–39, 1990. [50] Henry Theil. Economic Forecasts and Policy. North Holland Pub. Co., 1st edition, 1965. [51] Henry Theil. Applied Economic Forecasts. North Holland Pub. Co., 1st edition, 1966. [52] C. Turkay, E. Koc, and S. Balcisoy. Integrating information theory in agent based crowd simulation behavior models. The Computer Journal, 54(11):1810–1820, 2011. [53] Nguyen Xuan Vinh, Julien Epps, and James Bailey. Information theoretic measures for clusterings comparison: Variants, properties, normalization and correction for chance. Journal of Machine Learning Research, 11:2837–2854, 2010. [54] David L. Weakliem. A critique of the bayesian information criterion for model selection. Sociological Methods & Research, 27(3):359–397, 1999. [55] Cort J. Willmott. On the validation of models. Physical Geography, 2(2):184–194, 1981. [56] Cort J. Willmott and Kenji Matsuura. Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Climate Research, 30:79–82, 2005. [57] J. H. Zar. Significance testing of the Spearman rank correlation. Journal of the American Statistical Association, 67, 1972. 77