Software Support
CHAPTER 9. SOFTWARE SUPPORT
9.2.1. XML Interchange Format
The general outline of the XML specification for extended ARTA models can be seen in Listing 9.1. It contains a description of the distribution within the tags<dist>and
</dist>and a description of the base process within the tags<arima>and</arima>
that contains the AR and MA coefficients and the variance of the innovations. The mean of the base process and the degree of differencing are 0.0 by definition of the base process. The specification of the extended ARTA process is similar to the ARTA description presented in [16] except that MA coefficients are allowed. [16] also con-tains the XML descriptions of various distributions that can be used.
Listing 9.2 shows the complete XML specification of an example extended ARTA model with exponential marginal distribution with rate 1.0 and ARMA(6, 3) base pro-cess with AR coefficients
α = (0.840036, 0.824413, −0.712854, 0.00607279, 0.063807, −0.0324686) and MA coefficients
β = (−1.78786, −0.626879, 1.48718).
ProFiDo’s XML interchange format already allows for the specification of Hyper-Erlang distributions and ARMA processes [16]. Both descriptions can be combined
9.2. PROFIDO
Listing 9.2: Example XML specification of extended ARTA model
1 <? xml version ="1.0"? >
2 <profido >
3 <arta >
4 <dist >
5 < expodist >
6 <mean > 1.0 </ mean >
7 </ expodist >
8 </ dist >
9 <arima >
10 <arcount > 6 </ arcount >
11 <ar > 0.840036 0.824413 -0.712854 0.00607279 0.063807 -0.0324686 </ar >
12 <macount > 3 </ macount >
13 <ma > -1.78786 -0.626879 1.48718 </ma >
14 <d > 0.0 </d >
15 < variance > 0.303949 </ variance >
16 <mean > 0.0 </ mean >
17 </ arima >
18 </ arta >
19 </ profido >
easily to define a CHEP in XML format as shown in Listing 9.3.
A CHEP description is started by the tag<chep>and ended by</chep>. It contains the definition of a Hyper-Erlang distribution consisting of a vector of initial probabil-ities, a vector for the number of phases and a vector for the rates of each branch. The values in each vector are separated by blanks. The description of the ARMA base pro-cess is identical to the description of the base propro-cess of extended ARTA models. An example for the full XML specification of a CHEP(3, 5, 3) is given in Listing 9.4.
The XML specification consists of the definition of a Hyper-Erlang distribution with 3 states distributed among 2 branches with 1 and 2 states, respectively, and an ARMA(5, 3) base process.
The description of CAPPs is similar to the description of CHEPs. Its is contained within the tags<capp>and</capp>. Instead of a Hyper-Erlang distribution an acyclic PH distribution is used. ProFiDo’s XML specification [16] already accounts for the description of PH distributions consisting of the number of states, the initial probability vector π and the transition rate matrix D0. The ARMA base process is defined in the same way as for CHEPs. The general outline of a CAPP definition is shown in Listing 9.5.
Listing 9.6 shows the full XML description of a CAPP(5, 5, 7) as example.
The model consists of an acyclic PH distribution (π, D0) with 5 states and
D0=
−0.327 0.002 0.029 0.011 0.014 0 −0.348 0.030 0.012 0.016
CHAPTER 9. SOFTWARE SUPPORT
Listing 9.3: XML specification of CHEPs
1 <? xml version ="1.0"? >
2 <profido >
3 <chep >
4 <dist >
5 < hypererlangdist >
6 <prob > ... </ prob >
7 <phases > ... </ phases >
8 <rates > ... </ rates >
9 </ hypererlangdist >
10 </ dist >
11 <arima >
12 <arcount > ... </ arcount >
13 <ar > ... </ar >
14 <macount > ... </ macount >
15 <ma > ... </ma >
16 <d > 0.0 </d >
17 < variance > ... </ variance >
18 <mean > 0.0 </ mean >
19 </ arima >
20 </ chep >
21 </ profido >
Listing 9.4: Example XML specification of a CHEP(3, 5, 3)
1 <? xml version ="1.0"? >
2 <profido >
3 <chep >
4 <dist >
5 < hypererlangdist >
6 <prob > 0.091 0.909 </ prob >
7 <phases > 1 2 </ phases >
8 <rates > 0.254050 2.838471 </ rates >
9 </ hypererlangdist >
10 </ dist >
11 <arima >
12 <arcount > 5 </ arcount >
13 <ar > 0.891436 0.552937 -0.424392 0.0488508 -0.0780046
</ar >
14 <macount > 3 </ macount >
15 <ma > -0.258672 -0.36477 -0.209127 </ma >
16 <d > 0.0 </d >
17 < variance > 0.218322 </ variance >
18 <mean > 0.0 </ mean >
19 </ arima >
20 </ chep >
21 </ profido >
9.2. PROFIDO
Listing 9.5: XML specification of CAPPs
1 <? xml version ="1.0"? >
2 <profido >
3 <capp >
4 <ph >
5 <states > ... </ states >
6 <pi > ... </pi >
7 <d0 > ... </d0 >
8 </ph >
9 <arima >
10 <arcount > ... </ arcount >
11 <ar > ... </ar >
12 <macount > ... </ macount >
13 <ma > ... </ma >
14 <d > 0.0 </d >
15 < variance > ... </ variance >
16 <mean > 0.0 </ mean >
17 </ arima >
18 </ capp >
19 </ profido >
Listing 9.6: Example XML specification of a CAPP(5, 5, 7)
1 <? xml version ="1.0"? >
2 <profido >
3 <capp >
4 <ph >
5 <states > 5 </ states >
6 <pi > 0.00976 0.04418 0.27993 0.01426 0.65197 </pi >
7 <d0 > -0.327 0.002 0.029 0.011 0.014
8 0 -0.348 0.030 0.012 0.016
9 0 0 -0.691 0.153 0.004
10 0 0 0 -1.084 0.640
11 0 0 0 0 -1.961
12 </d0 >
13 </ph >
14 <arima >
15 <arcount > 5 </ arcount >
16 <ar > 0.39233 0.464275 0.33436 -0.061696 -0.13593 </ar >
17 <macount > 7 </ macount >
18 <ma > 1.37963 -5.17508 -1.56516 0.179254 2.19242 1.49209 1.10682 </ma >
19 <d > 0.0 </d >
20 < variance > 0.0191485 </ variance >
21 <mean > 0.0 </ mean >
22 </ arima >
23 </ capp >
24 </ profido >
CHAPTER 9. SOFTWARE SUPPORT
Listing 9.7: XML configuration for CAPP-Fit
1 <program >
2 <general >
3 <name > CAPP -Fit </ name >
4 [...]
5 </ general >
6 [...]
7 < parameterlist >
8 < parametergroup visible =" true " type =" text ">
9 <name > Autocorrelations </ name >
10 < description > Number of autocorrelation lags to match .
11 </ description >
12 <key >- ac = </ key >
13 <default >30 </ default >
14 < parameter type =" static ">
15 <name >ac </ name >
16 < description > Number of autocorrelation lags .
17 </ description >
18 < successor > </ successor >
19 </ parameter >
20 < successor > min . AR order </ successor >
21 </ parametergroup >
22 [...]
23 </ parameterlist >
24 </ program >
π = (0.00976, 0.04418, 0.27993, 0.01426, 0.65197) and an ARMA(5, 7) base process with AR coefficients
α = (0.39233, 0.464275, 0.33436, −0.061696, −0.13593) and MA coefficients
β = (1.37963, −5.17508, −1.56516, 0.179254, 2.19242, 1.49209, 1.10682).