class: center, middle, inverse, title-slide # .center[Hierarchical Forecasting of Dengue Incidence in
Sri Lanka] ###
Samudra Madushani
Dr. Thiyanga S. Talagala ###
2021-12-22 --- class: bg-main1 center middle
<i class="fas fa-rocket fa-3x faa-passing animated "></i>
.font5[**Introduction**] --- class: split-two white .column.bg-main1[.content[ <br> <img src="SlidesCodingR_files/figure-html/unnamed-chunk-2-1.png" width="97%" height="97%" /> ]] .column.bg-main2[.content.vmiddle.center[ ![](images\F1.JPG) ]] --- class: bg-main1 center middle
<i class="fas fa-rocket fa-3x faa-passing animated "></i>
.font5[ **Objectives**] --- class: bg-main1 .font2[ .yellow[**Main objective**]] .font2[ * Forecast dengue incidence in Sri Lanka using spatio-temporal hierarchical structure of dengue incidence.] -- .font2[ .yellow[ **Specific objectives**] * Introduce a novel feature-based visualization approach to identify patterns associated with time series of spatio-temporal structure.] -- .font2[ * Develop an R software package to automate the process of extracting data from weekly epidemiological PDF reports.] -- .font2[ * Identify the reasons for forecasting model performance variations. * Develop a shiny app to disseminate the research output.] ] --- <img src="images/FLOW1.JPG" width="97%" height="97%" /> --- <img src="images/FLOW2.JPG" width="97%" height="97%" /> --- .font3[.purple[**Data**]] .font2[ * Epidemiological unit, Ministry of Health, Sri Lanka https://www.epid.gov.lk/web * Format of the table in the Epidemiological Report] <img src="images/F3MOD.JPG" width="80%" height="20%" style="display: block; margin: auto;" /> --- class: bg-main1 <img src="images/PDFF.JPG" width="100%" height="100%" style="display: block; margin: auto;" /> --- class: split-two white .column.bg-white1[.content[ <br> .center[.purple[.font3[**PDF data extraction**]]] <br><br> .black[.font2[**Methods**] <br> .font2[ * Copy and paste * Manual data entry * PDF table extraction tools] ]]] .column.bg-main2[.content[ <br><br><br><br><br><br> .font2[**Challenges**] <br> .font2[ * Cause errors * Requires considerable amount of time and effort * Doesn't maintain the original format] ]]] --- class: split-two white .column.bg-white1[.content[ <br> .center[.purple[.font3[**PDF data extraction**]]] <br><br> .black[.font2[**Methods**] <br> .font2[ * Copy and paste * Manual data entry * PDF table extraction tools] ###
<img src="C1.JPG" style="height:2em; width:auto; "/>
]]] .column.bg-main2[.content[ <br><br><br><br><br><br> .font2[**Challenges**] <br> .font2[ * Cause errors * Requires considerable amount of time and effort * Doesn't maintain the original format] ]]] --- <br> .purple[.font3[**DISC (DISease Counts) Package**]] <img src="images/F8.JPG" width="25%" height="25%" style="display: block; margin: auto;" /> ```r #install.packages("remotes") #remotes::install_github("SMART-Research/DISC") ``` --- <br> .purple[.font3[**Functionalities of DISC Package**]] <img src="images/FUNC1.JPG" width="97%" height="80%" /> --- <br> .purple[.font3[**Functionalities of DISC Package**]] <img src="images/FUNC2.JPG" width="97%" height="80%" /> --- <img src="images/FLOW3.JPG" width="97%" height="97%" /> --- class: split-two white .row.bg-main1[.content[ <br> .font3[**Objectives of Data Visualization**] .font2[ * Identify the spatio-temporal patterns associated with time series * Dengue outbreak identification * Prominent features identification] ]] -- .row.bg-main2[.content[ .font3[**Data Visualization approaches**] .font2[ * Time domain visualization * Feature-based visualization * Change point analysis] ]]] --- <br> .purple[.font3[ **Time domain visualization-Districts**]] <img src="images/DP1.JPG" width="90%" height="100%" style="display: block; margin: auto;" /> --- <br> .purple[.font3[ **Time domain visualization-Districts**]] <img src="SlidesCodingR_files/figure-html/unnamed-chunk-17-1.png" width="90%" height="40%" style="display: block; margin: auto;" /> --- <br> .purple[.font3[ **Time domain visualization-Districts**]]
--- <br> .purple[.font3[ **Min-Max Transformation**]] .font2[ `$$\frac{x_{i}-min(x)}{max(x)-min(x)}$$` where `\(x=(x_{1},x_{2},\dots,x_{n})\)`. * Rescaling dengue counts of all districts onto 0-1 range.] --- <br> .purple[.font3[ **Time domain visualization-Districts**]]
--- <br> .purple[.font3[**Feature-based visualization**]] <img src="images/FES1.JPG" width="90%" height="80%" style="display: block; margin: auto;" /> --- <br> .purple[.font3[ **Time series features**]] .font2[ * Feature of a time series is the numerical summary calculated from a time series.] .purple[.font2[ Seasonal and Trend (STL) Decomposition]] <img src="images/STL.JPG" width="60%" height="60%" style="display: block; margin: auto;" /> --- <br> .purple[.font3[ **Time series features**]] .font2[.purple[Strength of seasonality]] `$$F_{s}=max\biggl(0,1-\frac{Var(R_{t})}{Var(S_{t}+R_{t})}\biggr)$$` .font2[.purple[Strength of trend]] `$$F_{t}=max\biggl(0,1-\frac{Var(R_{t})}{Var(T_{t}+R_{t})}\biggr)$$` .font2[.purple[Spectral entropy] * A measure of forecastability of a time series.] `$$H_{s}=-\int_{-\pi}^{\pi}\hat{f}_{y}(\lambda)log\hat{f}_{y}(\lambda).d\lambda$$` --- .font2[ .purple[Autocorrelation function: ACF] * Autocorrelation measures the strength of linear relationship between lagged value of a time series.] `$$r_{k}=\frac{\sum_{t=k+1}^{T}(y_{t}-\bar{y})(y_{t-k}-\bar{y})}{\sum_{t=1}^{T}(y_{t}-\bar{y})^{2}}$$` .font2[ `\(r_{k}\)` measures the linear relationship between `\(y_{t}\)` and `\(y_{t-k}\)`. .purple[Number of crossing points] * computes the number of times a time series crosses the median. ] --- <br> .purple[.font3[ **Time series features**]] <img src="images/resFEA.JPG" width="95%" height="95%" /> --- <br> .purple[.font3[ **Spatial Hierarchical Structure**]] <img src="images/SPST.JPG" width="85%" height="15%" style="display: block; margin: auto;" /> --- <br> .purple[.font3[ **Time series features**]] ``` # A tibble: 36 x 50 Province Districts trend_strength seasonal_strength_~ seasonal_peak_y~ <chr*> <chr*> <dbl> <dbl> <dbl> 1 Central Kandy 0.542 0.245 33 2 Central Matale 0.445 0.194 50 3 Central NuwaraEliya 0.351 0.203 33 4 Central <aggregated> 0.529 0.230 31 5 Eastern Ampara 0.463 0.140 33 6 Eastern Batticaloa 0.508 0.272 2 7 Eastern Kalmune 0.414 0.162 27 8 Eastern Trincomalee 0.377 0.209 6 9 Eastern <aggregated> 0.548 0.264 6 10 NorthCentral Anuradhapura 0.465 0.154 30 # ... with 26 more rows, and 45 more variables: seasonal_trough_year <dbl>, # spikiness <dbl>, linearity <dbl>, curvature <dbl>, stl_e_acf1 <dbl>, # stl_e_acf10 <dbl>, acf1 <dbl>, acf10 <dbl>, diff1_acf1 <dbl>, # diff1_acf10 <dbl>, diff2_acf1 <dbl>, diff2_acf10 <dbl>, season_acf1 <dbl>, # pacf5 <dbl>, diff1_pacf5 <dbl>, diff2_pacf5 <dbl>, season_pacf <dbl>, # zero_run_mean <dbl>, nonzero_squared_cv <dbl>, zero_start_prop <dbl>, # zero_end_prop <dbl>, lambda_guerrero <dbl>, kpss_stat <dbl>, ... ``` --- <img src="images/FES2.JPG" width="97%" height="97%" /> --- <br> .purple[.font3[**Principal Component Analysis**]] .font2[* Principal components are new variables that are constructed as linear combinations of the initial variables. .purple[Procedure] * Consider that `\(X_{1}, X_{2},\dots,X_{p}\)` as time series features. * Obtain standardized time series features.] `$$Z=\frac{value-mean}{s.d.}$$` --- .font2[ * .purple[Covariance matrix] `\((\Sigma)\)` of the vector `\(Z^{'}=\{Z_{1}, Z_{2},\dots,Z_{p}\}\)`,] $$ `\begin{pmatrix} Var(Z_{1}) & Cov(Z_{1},Z_{2}) & \dots & Cov(Z_{1}, Z_{p})\\ Cov(Z_{2},Z_{1}) & Var(Z_{2}) & \dots & Cov(Z_{2}, Z_{p})\\ . & . & \dots & .\\ . & . & \dots & .\\ Cov(Z_{p},Z_{1}) & Cov(Z_{p},Z_{2}) & \dots & Var(Z_{p}) \end{pmatrix}` $$ .font2[ .purple[ Compute Eigenvalues and Eigenvectors of covariance matrix] * Rank the Eigenvalues in descending order `\(\lambda_{1} \geq \lambda_{2} \geq \lambda_{3} \geq \dots\geq\lambda_{p}\geq0\)`. * Corresponding Eigenvectors are `\(a_{1},a_{2},a_{3},\dots,a_{p}\)`] --- .font2[ * New set of variables (Principal components) are obtained as a linear combination of features] `$$Y_{1}=a_{11}X_{1}+a_{12}X_{2}+\dots+a_{1p}X_{p}=a_{1}^{'}X\\$$` <img src="SlidesCodingR_files/figure-html/unnamed-chunk-25-1.png" width="97%" height="97%" /> --- .font2[ .purple[ **Principal Component Analysis**]] ``` ## PC1 PC2 PC3 PC4 ## trend_strength -0.134238706 0.233629889 -0.105806378 0.05193379 ## seasonal_strength_year -0.128265565 0.076645867 0.219078106 0.07431759 ## seasonal_peak_year -0.059948710 0.186030420 -0.031814924 0.07257053 ## seasonal_trough_year 0.014067090 -0.135603316 0.266367213 0.02803151 ## spikiness -0.099454963 0.028287197 -0.063920359 -0.39201414 ## linearity -0.153167564 0.033371074 -0.042527301 -0.38471735 ## curvature 0.087424396 -0.021626800 0.098290409 0.30815315 ## stl_e_acf1 -0.250337795 -0.119542024 0.033345707 0.04071260 ## stl_e_acf10 -0.240519622 -0.010808226 -0.028356707 0.02922725 ## acf1 -0.266209763 -0.037247539 -0.012339166 0.09423202 ## acf10 -0.208413196 0.153157474 -0.103762066 0.08542164 ## diff1_acf1 -0.175669345 -0.185744218 0.202273443 -0.09609845 ## diff1_acf10 0.064123942 0.106937767 -0.332302239 0.03287561 ## diff2_acf1 -0.060881283 -0.142576035 0.340098334 -0.01739845 ## diff2_acf10 0.008964044 0.050377174 -0.360435283 0.06799263 ## season_acf1 -0.031808958 0.163934114 0.265414157 -0.05497134 ## pacf5 -0.241387526 0.040905198 -0.133584826 0.08015985 ## diff1_pacf5 0.120904484 0.182291049 -0.241841358 -0.03084027 ## diff2_pacf5 0.179508569 0.196685381 -0.212125487 0.05574629 ## season_pacf 0.055635254 -0.016005594 0.103148431 0.14014247 ## zero_run_mean 0.065409570 -0.009085178 0.099001847 0.05083428 ## nonzero_squared_cv -0.097169530 -0.224151429 -0.034891179 0.20495359 ## zero_start_prop 0.131036612 0.131598036 0.089299536 -0.09947544 ## zero_end_prop 0.010542502 0.040112650 -0.106036475 0.10150514 ## lambda_guerrero 0.192129941 0.038880300 0.189519032 0.04991799 ## kpss_stat -0.034171840 0.253427023 0.209717895 -0.09325980 ## kpss_pvalue 0.069243253 -0.301859872 -0.053314846 -0.07421776 ## pp_stat -0.261558480 -0.006294458 -0.030279685 0.11425178 ## ndiffs -0.080416256 0.295169346 0.046157593 0.08197386 ## bp_stat -0.267838104 -0.034926496 -0.006159478 0.08273366 ## lb_stat -0.267838104 -0.034926496 -0.006159478 0.08273366 ## var_tiled_var -0.017614722 -0.179835273 -0.081199641 0.06808204 ## var_tiled_mean -0.088132459 0.155172551 0.048221585 0.02711249 ## shift_level_max -0.151055793 0.026387724 -0.073071679 -0.37987835 ## shift_level_index -0.075727806 0.298904250 0.118458617 0.09325037 ## shift_var_max -0.114333348 0.024829363 -0.064573319 -0.40356406 ## shift_var_index -0.060572160 0.287961603 0.145521718 0.08332205 ## shift_kl_max -0.073750104 -0.088548772 -0.170286664 0.20206958 ## shift_kl_index -0.029092706 0.252830125 0.152329744 0.05590298 ## spectral_entropy 0.227437782 -0.122456284 0.086840545 -0.08418342 ## n_crossing_points 0.215645136 -0.007781492 -0.054824106 0.08799468 ## longest_flat_spot -0.077791097 -0.178100675 -0.080035132 0.02194894 ## coef_hurst -0.154249056 -0.098986846 -0.046997520 0.13587766 ## stat_arch_lm -0.240790939 -0.036637086 -0.004536449 0.03391237 ## PC5 PC6 PC7 PC8 ## trend_strength 0.2781187507 0.0155561900 0.034795297 -0.176148231 ## seasonal_strength_year -0.1172242063 0.1322281888 -0.283498005 -0.113622450 ## seasonal_peak_year -0.2316036200 -0.1905590026 0.011041185 -0.437859195 ## seasonal_trough_year 0.1669623054 0.0002828806 0.050482105 0.400610648 ## spikiness 0.0438390238 -0.0747611616 0.122606576 0.047147989 ## linearity 0.0132338600 -0.0379270561 0.087796256 0.017958108 ## curvature -0.0003480938 0.1256424321 -0.072060056 0.153657835 ## stl_e_acf1 -0.1055096676 0.0122414657 -0.055766848 0.041202803 ## stl_e_acf10 -0.0455870708 0.0990247138 -0.083357756 0.239060777 ## acf1 0.0047358031 0.0186866325 -0.029553209 -0.047969211 ## acf10 0.2154499239 0.0791209337 0.007494130 0.015618502 ## diff1_acf1 -0.0491620030 0.0593318894 0.153656386 -0.018416736 ## diff1_acf10 -0.1064219378 0.1263848514 -0.003350907 0.210149568 ## diff2_acf1 0.0813293844 -0.0159254914 0.226178158 -0.010911422 ## diff2_acf10 -0.1366899884 0.0785695010 -0.120756445 0.209417454 ## season_acf1 -0.1030988399 0.1746489735 -0.144835135 0.086833674 ## pacf5 -0.0507515412 0.1396110256 -0.046585731 -0.021219627 ## diff1_pacf5 -0.0026036388 0.2398174371 0.045176933 0.095099640 ## diff2_pacf5 0.0679880288 0.0307237487 -0.052818745 -0.007533984 ## season_pacf 0.3158328288 -0.1350644221 0.115262046 0.007986845 ## zero_run_mean -0.1636144455 0.3734543207 0.231265882 -0.320994477 ## nonzero_squared_cv -0.1116615716 -0.0300225623 0.285336807 0.217633695 ## zero_start_prop -0.0967881852 0.3596388091 0.130527370 0.062112484 ## zero_end_prop 0.2375319672 0.0668895178 0.337363215 -0.245929138 ## lambda_guerrero 0.1617560024 0.0976921190 0.040004289 -0.037262554 ## kpss_stat 0.0612698970 0.2351992418 -0.044162860 0.051249873 ## kpss_pvalue 0.1299822146 0.1733040800 -0.218403663 -0.172018868 ## pp_stat 0.0764739130 0.0041397234 -0.050474616 -0.024443649 ## ndiffs -0.1374690227 -0.1492466219 0.217229871 0.155944961 ## bp_stat 0.0038952869 0.0409520670 -0.020908715 -0.034730074 ## lb_stat 0.0038952869 0.0409520670 -0.020908715 -0.034730074 ## var_tiled_var -0.3965413688 -0.1441643868 0.090335444 0.146433180 ## var_tiled_mean 0.3441694346 0.0474065649 -0.070497467 0.205648763 ## shift_level_max 0.0113968837 -0.0466090885 0.118530659 0.020427075 ## shift_level_index -0.1689432291 -0.1121888416 0.124495216 0.022455326 ## shift_var_max 0.0273776813 -0.0661696033 0.131210375 0.026397658 ## shift_var_index -0.1771000921 -0.0598358877 0.107385648 0.014577594 ## shift_kl_max 0.1638344300 -0.0163146915 0.362087381 0.112235541 ## shift_kl_index -0.1002236941 -0.1638158429 0.125572304 0.071658231 ## spectral_entropy -0.1899028933 -0.0905276168 -0.025784037 0.029136116 ## n_crossing_points 0.0150702342 -0.1265085448 0.232285134 -0.088193148 ## longest_flat_spot -0.1343097621 0.3828255662 0.293539851 -0.090490125 ## coef_hurst 0.0405368047 -0.2942555281 -0.136833010 -0.179573958 ## stat_arch_lm -0.0552885846 0.1704461975 -0.027860471 -0.051357957 ## PC9 PC10 PC11 PC12 ## trend_strength 0.1052447542 -0.063413021 -0.0420822897 0.079584308 ## seasonal_strength_year -0.3190480207 -0.005095030 -0.1239106068 0.178133471 ## seasonal_peak_year -0.1988583958 -0.138388333 -0.2734911977 -0.120373674 ## seasonal_trough_year -0.3094847150 -0.005005167 -0.1443671717 -0.014284729 ## spikiness -0.2334753794 -0.115910428 -0.0560765318 0.179625482 ## linearity -0.0997021861 -0.043804250 0.0027996807 0.057310553 ## curvature -0.2214832077 -0.167605325 -0.0637455916 0.427555902 ## stl_e_acf1 -0.0122394146 0.020799781 -0.0142021523 -0.082106623 ## stl_e_acf10 -0.0361856358 0.071727060 -0.0846761812 -0.064606041 ## acf1 -0.0085142024 -0.027646491 -0.0015468624 -0.032024223 ## acf10 -0.0092638319 -0.018397383 -0.0565731625 0.059725234 ## diff1_acf1 0.0741510791 0.001279629 -0.0039511969 -0.079402580 ## diff1_acf10 -0.1717725964 -0.135451681 0.0006357551 -0.183056401 ## diff2_acf1 0.0364631231 -0.093577323 -0.1380237934 -0.157172197 ## diff2_acf10 -0.2086201550 -0.105232725 0.0279554425 -0.044495168 ## season_acf1 -0.3308472982 0.067525013 0.2483870088 -0.322803555 ## pacf5 0.0037473245 -0.003363553 0.0032390446 -0.008003228 ## diff1_pacf5 -0.0205096535 -0.043005993 -0.0633981799 -0.003105130 ## diff2_pacf5 -0.0459814283 -0.050730837 -0.0880580266 0.064197487 ## season_pacf -0.0308208078 -0.672745103 0.1738402042 0.007910715 ## zero_run_mean 0.0060027093 -0.025953178 0.2567235691 0.333543098 ## nonzero_squared_cv -0.0382565114 -0.077823574 -0.0742009056 0.155338558 ## zero_start_prop 0.0111867166 -0.176833834 -0.2030475701 -0.286928839 ## zero_end_prop -0.4174020098 0.267753751 0.2926929996 -0.149275099 ## lambda_guerrero -0.1674316532 0.145451393 -0.1369345224 -0.122577878 ## kpss_stat 0.0816433508 -0.234779097 -0.0042332707 -0.048177246 ## kpss_pvalue -0.1142511705 -0.057801663 -0.0919709358 -0.012856353 ## pp_stat -0.0289033258 -0.017400685 0.0375431654 -0.023056582 ## ndiffs 0.1535886748 -0.023187774 0.1361323853 -0.046783196 ## bp_stat 0.0048261296 -0.008661842 -0.0177801138 -0.018088370 ## lb_stat 0.0048261296 -0.008661842 -0.0177801138 -0.018088370 ## var_tiled_var -0.0720884588 -0.091945839 0.3402440648 -0.064369890 ## var_tiled_mean 0.1039791592 0.149391257 0.4353792105 -0.043172684 ## shift_level_max -0.0608232917 -0.044240672 0.0159288863 0.060532352 ## shift_level_index 0.0614589050 -0.026844724 0.0441311756 0.090678717 ## shift_var_max -0.1750380064 -0.086440448 -0.0246264470 0.114997877 ## shift_var_index 0.0388506146 -0.143272647 -0.0989098102 -0.082746209 ## shift_kl_max -0.0169711968 0.154422879 -0.3574817167 -0.055847932 ## shift_kl_index -0.1998544302 0.335823284 -0.0708136391 0.253840792 ## spectral_entropy -0.0024845085 0.005590177 0.0640262103 -0.044537002 ## n_crossing_points -0.0856164482 -0.010307654 -0.0339664505 -0.285757491 ## longest_flat_spot -0.0004298993 -0.068316636 0.1286164808 0.061120131 ## coef_hurst -0.2705650764 -0.180707915 0.1382318519 -0.152201694 ## stat_arch_lm 0.1392492219 0.032520392 -0.0903434915 -0.247954945 ## PC13 PC14 PC15 PC16 ## trend_strength 0.041665508 -7.919145e-02 0.024988440 -0.2562497936 ## seasonal_strength_year -0.083311538 -3.022370e-01 -0.151881583 0.0245110938 ## seasonal_peak_year 0.200173120 8.262256e-02 0.026610297 -0.1549050501 ## seasonal_trough_year 0.112663564 1.316591e-02 0.372755239 -0.1320392083 ## spikiness -0.101517788 1.466903e-01 -0.265270621 0.0087110652 ## linearity 0.002329179 -3.076443e-03 0.049615690 0.0320439780 ## curvature -0.232798151 4.487942e-01 -0.180491774 0.0259135912 ## stl_e_acf1 0.015092615 8.718856e-02 0.004526336 0.0838355330 ## stl_e_acf10 0.021186563 2.606724e-02 0.133981372 0.4241781883 ## acf1 -0.029237357 2.584014e-02 -0.033434863 -0.0729153536 ## acf10 0.032972927 -9.251623e-02 0.045865606 0.0368830985 ## diff1_acf1 0.093218185 -8.720836e-05 0.165365113 -0.0599171899 ## diff1_acf10 0.300564796 -9.650112e-02 0.024124213 0.0278772558 ## diff2_acf1 0.142759619 4.489164e-02 -0.069334969 -0.0449305661 ## diff2_acf10 0.173127553 -1.706734e-01 -0.140588121 -0.0173652741 ## season_acf1 -0.077843718 4.695455e-02 -0.061814570 0.0981076787 ## pacf5 -0.065880720 9.698632e-02 0.161159696 -0.1065130822 ## diff1_pacf5 -0.030209918 2.200230e-01 0.342241159 -0.0865167783 ## diff2_pacf5 -0.073019245 9.361148e-02 0.002227456 -0.0489926351 ## season_pacf 0.032132047 -2.617322e-01 0.111509954 0.1943108225 ## zero_run_mean 0.394992974 -2.104284e-02 -0.108449847 0.1987649637 ## nonzero_squared_cv -0.107952905 -5.453192e-02 -0.188803807 -0.3438493925 ## zero_start_prop -0.011465893 -1.078631e-01 -0.236530394 -0.1331456377 ## zero_end_prop -0.408229527 -1.766023e-01 0.105821402 0.0002677367 ## lambda_guerrero 0.104645169 -1.859865e-02 -0.089478536 -0.2148311399 ## kpss_stat 0.028870628 5.096096e-02 0.041929616 -0.2354699536 ## kpss_pvalue -0.014320465 -9.004102e-02 -0.077579476 0.0387902238 ## pp_stat 0.032091644 3.179175e-02 -0.094868496 -0.0509580168 ## ndiffs -0.095898783 8.960563e-02 0.016857744 -0.0778870946 ## bp_stat -0.036276230 8.678688e-03 -0.017330337 -0.0629214435 ## lb_stat -0.036276230 8.678688e-03 -0.017330337 -0.0629214435 ## var_tiled_var -0.022836012 -2.180129e-01 -0.087385917 -0.2405499711 ## var_tiled_mean 0.280380904 1.702710e-01 -0.354869834 -0.0296428606 ## shift_level_max 0.042845007 7.069421e-04 0.010094335 0.0224017511 ## shift_level_index -0.125251953 -9.693727e-02 -0.022269550 0.0028452345 ## shift_var_max -0.039092141 8.663860e-02 -0.141864910 0.0046443817 ## shift_var_index -0.185405267 -9.228490e-03 -0.006816061 0.4190230448 ## shift_kl_max 0.138072269 -1.323505e-01 -0.245304475 0.2754910244 ## shift_kl_index 0.357639121 -4.595210e-02 0.139748786 -0.0414565495 ## spectral_entropy 0.015534082 7.250095e-02 -0.011413781 0.0619543348 ## n_crossing_points 0.003760886 3.679190e-01 -0.158743636 0.0874868217 ## longest_flat_spot 0.018844847 1.874744e-01 0.259677143 0.0368877040 ## coef_hurst 0.243372600 3.201693e-01 0.070842030 0.0059182192 ## stat_arch_lm -0.075502201 1.388870e-01 -0.161697466 -0.0330108716 ## PC17 PC18 PC19 PC20 ## trend_strength 0.029251019 6.572738e-02 0.0156513710 -0.124169620 ## seasonal_strength_year 0.034007760 1.689267e-01 -0.3587123687 -0.013430202 ## seasonal_peak_year -0.128598318 3.333102e-01 0.2511873650 -0.053812223 ## seasonal_trough_year -0.204501522 -2.259494e-02 -0.0533892608 0.066852789 ## spikiness 0.039214038 7.995242e-03 0.0967167998 0.101661687 ## linearity 0.054672556 -4.583842e-03 -0.0964762402 -0.013060457 ## curvature -0.079904512 1.232309e-01 0.0269505647 -0.133139151 ## stl_e_acf1 -0.017736704 -5.211388e-02 0.0528166183 -0.057760458 ## stl_e_acf10 0.302117351 -9.577072e-02 0.1968028861 -0.184996347 ## acf1 0.002894542 -5.230799e-02 0.0391246060 0.053997966 ## acf10 0.165538539 -4.905479e-02 0.0768562428 -0.181962861 ## diff1_acf1 -0.015219849 1.496989e-01 -0.1522297956 0.003145497 ## diff1_acf10 0.034459192 1.425448e-02 -0.1982536703 0.123196892 ## diff2_acf1 0.023619367 1.878013e-01 -0.2345835075 -0.208633508 ## diff2_acf10 -0.139404332 2.140069e-02 -0.0224794907 0.329959380 ## season_acf1 0.148354749 1.475771e-01 0.2454030417 -0.127949793 ## pacf5 0.127169940 -1.321150e-01 -0.0569480476 -0.010102121 ## diff1_pacf5 0.138673975 1.504367e-01 -0.3282482438 -0.258310803 ## diff2_pacf5 0.027756306 -8.304254e-05 0.0421516933 -0.157662993 ## season_pacf 0.084269255 -7.655695e-03 0.0872957061 0.028711665 ## zero_run_mean 0.118092700 -2.370675e-01 -0.1062759209 -0.073160697 ## nonzero_squared_cv 0.116941593 -2.625831e-01 0.0169738360 0.060627874 ## zero_start_prop -0.239844215 -3.390548e-01 0.2792314843 -0.294818863 ## zero_end_prop -0.211853209 -1.051836e-01 -0.0862539049 -0.006515746 ## lambda_guerrero 0.606256847 7.110541e-03 0.1331562091 0.346043152 ## kpss_stat -0.137548234 -5.291496e-02 -0.1416667825 0.128259436 ## kpss_pvalue 0.009785698 5.802885e-02 -0.0554815677 -0.008005387 ## pp_stat -0.028754085 -4.168035e-02 0.0226462399 -0.006537522 ## ndiffs 0.082721279 6.752993e-02 0.0984305988 0.064084121 ## bp_stat 0.009673435 -3.425291e-02 0.0345858400 0.037848530 ## lb_stat 0.009673435 -3.425291e-02 0.0345858400 0.037848530 ## var_tiled_var 0.125837087 2.028913e-01 -0.0703742542 -0.368987975 ## var_tiled_mean -0.180570133 2.370370e-01 -0.0299686656 -0.005253828 ## shift_level_max 0.061750220 -2.445657e-02 -0.0741296501 -0.110973825 ## shift_level_index 0.168616060 8.671008e-02 -0.1299348533 0.201858584 ## shift_var_max 0.028895446 1.916403e-02 0.0077546565 0.050560723 ## shift_var_index -0.149323596 -6.860219e-02 -0.1531989908 0.162604445 ## shift_kl_max -0.076373654 2.751277e-01 0.0001032954 -0.080048086 ## shift_kl_index -0.157134591 -2.174151e-01 0.0492144857 -0.060471442 ## spectral_entropy -0.113144814 -3.192749e-02 -0.0052901397 0.090770951 ## n_crossing_points 0.186856049 -1.050821e-01 -0.2694670170 -0.018085902 ## longest_flat_spot -0.095640610 3.099233e-01 0.2905825434 0.304210680 ## coef_hurst -0.020171285 -2.915158e-01 -0.0513692549 -0.017212560 ## stat_arch_lm -0.083442692 -1.016684e-01 -0.2716650099 0.172559737 ## PC21 PC22 PC23 PC24 ## trend_strength 0.0521322260 0.263675530 -0.109631016 -0.040155566 ## seasonal_strength_year -0.0823396468 -0.338758403 -0.016766121 0.102588168 ## seasonal_peak_year 0.2008118844 -0.127647555 -0.021157950 -0.090595208 ## seasonal_trough_year 0.1730285041 -0.051544363 -0.310296228 -0.364713006 ## spikiness 0.0321401505 0.022099519 -0.079392888 -0.165620650 ## linearity -0.0709562839 -0.015152609 0.061620911 0.042077555 ## curvature 0.0669515547 0.293505243 0.100191581 0.165580594 ## stl_e_acf1 -0.0492218803 -0.064497278 -0.026321623 -0.017271171 ## stl_e_acf10 0.0961776312 -0.156399081 -0.175388076 0.049967036 ## acf1 -0.0011080665 0.003893507 0.026829660 0.012938322 ## acf10 0.0639142050 0.152510543 -0.166655622 0.122341275 ## diff1_acf1 -0.0031289974 0.113715204 0.203819387 0.229466381 ## diff1_acf10 0.2644188773 0.075595524 0.210968120 0.215000663 ## diff2_acf1 0.2323276783 0.162867525 0.069098318 0.133574952 ## diff2_acf10 -0.0566995799 0.254663831 -0.123078784 0.090452029 ## season_acf1 -0.2063971476 0.195483567 0.076109210 -0.050336639 ## pacf5 0.0622754785 -0.165743568 0.185177467 0.030481387 ## diff1_pacf5 -0.0321013058 -0.120083607 0.194805951 -0.194413373 ## diff2_pacf5 -0.0474257374 -0.127100462 -0.097253266 -0.217210727 ## season_pacf -0.0352848975 -0.025505386 -0.010063424 0.011292706 ## zero_run_mean 0.0269938717 0.063846459 -0.053434124 -0.288097499 ## nonzero_squared_cv 0.0389756479 -0.243702068 0.182667367 0.003395063 ## zero_start_prop 0.1222920762 -0.160408522 0.014222832 0.076289090 ## zero_end_prop 0.0764823904 0.010078971 0.065109096 0.035007537 ## lambda_guerrero 0.0355639955 0.082146644 0.185375485 -0.118811513 ## kpss_stat -0.5502560570 -0.051504038 -0.074257118 0.101038602 ## kpss_pvalue 0.1172307363 -0.038614332 -0.105930521 0.055790643 ## pp_stat 0.0226721127 -0.001222357 -0.041448750 0.010069659 ## ndiffs -0.0156625490 0.031412820 0.066287965 -0.019172863 ## bp_stat -0.0008628748 0.009100183 0.007685931 0.023670308 ## lb_stat -0.0008628748 0.009100183 0.007685931 0.023670308 ## var_tiled_var -0.0796855003 0.127678984 -0.174798934 -0.156661352 ## var_tiled_mean 0.2296992760 -0.341030225 0.065096973 -0.033649642 ## shift_level_max 0.0049148284 0.035319442 0.022011935 0.057012977 ## shift_level_index 0.1260453448 -0.232827702 -0.279645901 -0.017825896 ## shift_var_max 0.0413812934 -0.022123645 0.020525181 -0.010883705 ## shift_var_index 0.1863950237 0.098049720 0.231639247 -0.141701165 ## shift_kl_max -0.4480631793 -0.058096071 0.137159604 -0.195757029 ## shift_kl_index -0.0828436052 0.121940747 -0.062715737 0.238858708 ## spectral_entropy -0.0058314367 -0.085506614 0.119294132 -0.090570649 ## n_crossing_points -0.0784867655 -0.110011390 -0.451552727 0.354622557 ## longest_flat_spot -0.0506013119 -0.146369772 -0.152829990 0.138383312 ## coef_hurst -0.2052091733 -0.097341014 0.187653202 -0.131452320 ## stat_arch_lm 0.0650917072 0.288109991 -0.228733379 -0.352607066 ## PC25 PC26 PC27 PC28 ## trend_strength -0.012936325 -0.1809201568 0.204735685 0.0066402412 ## seasonal_strength_year -0.147679558 -0.0918074762 -0.107607613 0.2696524875 ## seasonal_peak_year 0.117593428 -0.1223866295 -0.160337914 -0.0983238042 ## seasonal_trough_year -0.014641968 -0.2276125965 -0.095639670 -0.1165663448 ## spikiness 0.044071529 0.0604981708 0.090602473 0.0913841790 ## linearity 0.027415805 -0.0334861411 -0.079434604 -0.0492506378 ## curvature -0.025257272 0.0605153595 -0.117515967 -0.2469995229 ## stl_e_acf1 0.290501921 -0.0535591815 0.125152657 -0.0592946606 ## stl_e_acf10 0.217781398 0.0939375827 0.011635720 -0.0078896952 ## acf1 0.108206088 0.0392324777 0.012134312 -0.0284735101 ## acf10 -0.080775761 0.0200860233 -0.021795510 0.0335096726 ## diff1_acf1 0.114043625 -0.1256934401 0.029940250 -0.0453901744 ## diff1_acf10 -0.249191533 0.0942532432 0.042502804 -0.1019972115 ## diff2_acf1 0.084112911 0.1772661945 0.372246299 0.1382052099 ## diff2_acf10 0.320272894 -0.1937630395 0.152614418 0.0249888037 ## season_acf1 -0.239978587 -0.2342415836 0.262348287 0.0703886220 ## pacf5 -0.209745688 -0.0117984316 -0.169027800 -0.2960428821 ## diff1_pacf5 0.147041596 0.0012547520 0.076488584 0.1102309919 ## diff2_pacf5 0.120267527 0.2354439424 0.241053093 0.2759425348 ## season_pacf -0.085640638 0.0860521131 -0.108891004 0.0602994069 ## zero_run_mean 0.081005855 -0.2290332811 0.027129425 -0.0998379370 ## nonzero_squared_cv -0.001842553 -0.1970849642 0.166683154 0.2564150288 ## zero_start_prop -0.067259413 0.0653849751 -0.056668746 -0.0845394803 ## zero_end_prop 0.146665366 0.0779349151 0.012117089 -0.1057967664 ## lambda_guerrero 0.185187584 0.2142825873 -0.219652234 -0.0355792424 ## kpss_stat 0.248164845 0.1440726423 -0.046020009 -0.1596432844 ## kpss_pvalue 0.076128663 0.1026737534 0.119976127 -0.0877693647 ## pp_stat 0.124345082 0.1503697551 0.040925991 -0.0480771713 ## ndiffs -0.061651515 -0.2504191067 -0.041753130 0.0906496611 ## bp_stat 0.129235601 -0.0002064498 -0.001780853 -0.0190845148 ## lb_stat 0.129235601 -0.0002064498 -0.001780853 -0.0190845148 ## var_tiled_var 0.113714873 0.2815514402 -0.262899408 -0.0317608068 ## var_tiled_mean 0.096167234 0.0322329401 -0.133354290 0.0377229194 ## shift_level_max -0.016052771 -0.0157664335 -0.183788915 -0.1225507904 ## shift_level_index -0.142489451 0.1714457229 0.411489695 -0.4398779955 ## shift_var_max -0.084806351 0.0353894064 0.012645389 -0.0005046644 ## shift_var_index 0.260465221 0.0565736943 -0.158909954 0.1905349264 ## shift_kl_max -0.130202696 0.0040494343 -0.002823471 -0.2045854747 ## shift_kl_index -0.062381932 0.3305671706 -0.032507306 0.1826091026 ## spectral_entropy 0.067883761 0.1546922772 0.221525739 -0.2312622140 ## n_crossing_points 0.049288553 -0.2216302308 -0.147605939 0.0461005542 ## longest_flat_spot -0.154240774 0.2040174016 0.007051412 0.2656785284 ## coef_hurst -0.147405836 0.1126830478 0.149598660 0.0388520047 ## stat_arch_lm -0.320505502 0.2079051124 -0.138909833 0.1416194411 ## PC29 PC30 PC31 PC32 ## trend_strength -0.438231259 -0.332522765 -0.121117680 -0.112818046 ## seasonal_strength_year -0.096146088 -0.030341381 0.004854715 0.014463329 ## seasonal_peak_year 0.195505074 0.013667145 0.120391669 -0.204004850 ## seasonal_trough_year 0.013459131 -0.064486135 -0.107110319 0.106127200 ## spikiness -0.079416570 0.118597018 -0.089221372 0.100837175 ## linearity 0.006875617 -0.101438875 0.254595715 0.056320602 ## curvature 0.008237616 -0.036157010 0.152159142 -0.030767749 ## stl_e_acf1 -0.269704719 -0.314585063 0.185599948 0.039264265 ## stl_e_acf10 0.188322107 -0.029016955 0.096732179 -0.212386877 ## acf1 -0.029947406 0.022962409 0.038914105 0.278166715 ## acf10 0.163466008 -0.025905498 -0.148357788 -0.268255686 ## diff1_acf1 -0.060101844 0.290707091 0.273744710 -0.010649949 ## diff1_acf10 0.157887299 -0.406424762 0.077487579 0.203431256 ## diff2_acf1 0.206681553 0.105784949 -0.249938462 -0.007079258 ## diff2_acf10 -0.052507868 0.386679879 -0.048306901 -0.157030428 ## season_acf1 -0.057372340 0.019933007 -0.032190462 -0.054707839 ## pacf5 -0.091393193 0.348143667 -0.457542985 -0.107404736 ## diff1_pacf5 -0.201120947 0.161238706 0.137409719 0.004388892 ## diff2_pacf5 0.153035080 0.093436921 0.090155399 0.110090984 ## season_pacf -0.139034370 0.181580748 0.209671306 -0.038373178 ## zero_run_mean 0.127471083 0.001739855 -0.012054636 0.083087929 ## nonzero_squared_cv 0.083719823 -0.136534327 0.061115886 -0.339153542 ## zero_start_prop -0.191222333 0.111955668 0.074271832 0.120529822 ## zero_end_prop 0.150888955 -0.022395988 0.095358128 -0.076063492 ## lambda_guerrero -0.110299693 -0.022508529 0.031844140 0.007455757 ## kpss_stat 0.310696980 -0.198968479 -0.104040201 -0.142399884 ## kpss_pvalue -0.004338107 -0.055985638 -0.009282300 -0.090402447 ## pp_stat 0.023084184 0.024918325 -0.132983984 0.167023073 ## ndiffs 0.212344481 0.003477099 0.097450271 0.102468154 ## bp_stat -0.064588328 0.029815271 0.069163085 0.237578288 ## lb_stat -0.064588328 0.029815271 0.069163085 0.237578288 ## var_tiled_var -0.066295790 -0.069034920 -0.145196635 0.043481504 ## var_tiled_mean -0.064973203 0.034147673 0.044336313 -0.126919208 ## shift_level_max -0.113771493 -0.058599142 0.087142957 -0.306955294 ## shift_level_index -0.081493919 0.084113436 0.135664776 0.033121110 ## shift_var_max 0.118261523 -0.009095670 -0.170639679 0.119076660 ## shift_var_index -0.165688646 -0.152114782 -0.303304892 -0.047775051 ## shift_kl_max -0.045719067 0.006635759 -0.034422427 0.028705091 ## shift_kl_index -0.189580971 0.121779277 0.086336747 -0.037959824 ## spectral_entropy -0.226272305 -0.077360660 -0.031468817 -0.342098550 ## n_crossing_points -0.156065513 -0.001789431 -0.073921610 0.056464660 ## longest_flat_spot -0.139102871 -0.113688293 -0.122826631 -0.025956534 ## coef_hurst -0.006389870 -0.024947211 -0.033934028 -0.013820693 ## stat_arch_lm 0.036166300 0.079992574 0.316749426 -0.233239678 ## PC33 PC34 PC35 PC36 ## trend_strength 0.156446624 0.175840555 -0.101585325 0.026587620 ## seasonal_strength_year 0.254513458 0.030604857 0.136139729 0.055519833 ## seasonal_peak_year -0.118495842 -0.070703343 -0.085907749 -0.017762773 ## seasonal_trough_year 0.018703003 0.007524371 0.105321359 -0.024397217 ## spikiness -0.028091242 0.325593318 -0.065955513 0.056240882 ## linearity -0.131537970 0.016074395 0.202296242 -0.066784642 ## curvature 0.052288762 0.034636928 0.017324659 -0.018048529 ## stl_e_acf1 0.258208254 -0.094613361 -0.248107785 -0.102781556 ## stl_e_acf10 0.124599203 0.161798154 -0.165149461 0.077557587 ## acf1 -0.079524112 -0.173978215 0.238653610 0.156005216 ## acf10 -0.164047585 0.006217941 0.420851979 0.217556212 ## diff1_acf1 -0.007574971 0.425494518 0.095295531 -0.013038258 ## diff1_acf10 0.007955238 0.032396725 -0.033565683 -0.059589265 ## diff2_acf1 0.180563093 -0.132813294 -0.033059761 -0.060090373 ## diff2_acf10 0.114918707 -0.006367275 0.026665865 0.007176151 ## season_acf1 -0.237398413 -0.145319423 -0.045636844 -0.113451834 ## pacf5 0.190335472 -0.034308924 -0.190692197 -0.157523801 ## diff1_pacf5 -0.216363352 -0.156678803 -0.073282991 0.209315930 ## diff2_pacf5 0.237905545 0.012161196 0.184688994 -0.326410329 ## season_pacf 0.019810577 -0.197531726 -0.148449702 -0.025064636 ## zero_run_mean 0.021449933 -0.035725235 0.015092058 -0.012839882 ## nonzero_squared_cv -0.256167736 -0.050752597 -0.076546584 -0.059560585 ## zero_start_prop 0.073526649 0.130533327 0.097437532 0.086328438 ## zero_end_prop 0.105382156 0.028556172 -0.062355817 0.018533153 ## lambda_guerrero 0.094029313 0.037152058 0.057213322 0.002404078 ## kpss_stat -0.040300164 0.037575102 -0.130114170 0.008307076 ## kpss_pvalue -0.037490359 -0.032515172 -0.133408016 0.185922596 ## pp_stat -0.165411775 -0.135378400 0.259660889 -0.139854004 ## ndiffs 0.498084344 -0.065391582 0.100131424 0.238894968 ## bp_stat -0.044657032 -0.211673845 0.016352230 0.462343442 ## lb_stat -0.044657032 -0.211673845 0.016352230 -0.447140782 ## var_tiled_var -0.023279894 0.126454844 -0.020530495 0.043441046 ## var_tiled_mean -0.054910762 0.033406518 -0.034147781 0.009407382 ## shift_level_max 0.152306568 -0.192027887 0.258891647 -0.279234950 ## shift_level_index -0.162086217 0.121699837 0.002187023 -0.020578985 ## shift_var_max 0.059253137 -0.269204117 -0.279829625 0.194835977 ## shift_var_index -0.193333891 0.108678768 0.044836570 -0.030629185 ## shift_kl_max 0.015147074 0.003507576 0.013554768 0.012541704 ## shift_kl_index -0.051139432 -0.139463269 -0.193367023 0.042338711 ## spectral_entropy 0.187477362 -0.293169624 0.338774490 0.177218737 ## n_crossing_points -0.053011123 -0.067602880 0.028215313 -0.023643409 ## longest_flat_spot 0.040858732 0.046694018 0.108756813 -0.008999580 ## coef_hurst 0.074895123 0.310321139 0.110150851 0.114665594 ## stat_arch_lm 0.043353472 -0.071350306 -0.103598565 0.012580559 ``` --- class: bg-main1 center middle
<i class="fas fa-rocket fa-3x faa-passing animated "></i>
.font5[ **Feature-based Visualization**] --- <img src="images/PP1M.JPG" width="100%" height="100%" /> --- <img src="images/PP2M.JPG" width="100%" height="100%" /> --- <img src="images/PP3M.JPG" width="100%" height="100%" /> --- <img src="images/PP4M.JPG" width="100%" height="100%" /> --- <img src="images/PP5.JPG" width="97%" height="97%" /> --- <img src="images/PP6M.JPG" width="100%" height="100%" /> --- <img src="images/PP7M.JPG" width="100%" height="100%" /> --- <img src="images/PP8M.JPG" width="100%" height="100%" /> --- <img src="images/PP9M.JPG" width="97%" height="97%" /> --- <img src="images/PP10.JPG" width="97%" height="97%" /> --- <img src="images/PP11M.JPG" width="100%" height="100%" /> --- <img src="images/PP12M.JPG" width="97%" height="97%" /> --- <img src="images/PP13M.JPG" width="100%" height="100%" /> --- <img src="images/PP14M.JPG" width="100%" height="100%" /> --- <img src="images/PP15M.JPG" width="97%" height="97%" /> --- .font3[.purple[**Temporal hierarchical structure**]] <img src="images/TEM.JPG" width="97%" height="97%" /> --- .purple[.font3[**Temporal hierarchical structure**]] <img src="SlidesCodingR_files/figure-html/figurechapter0005V2-1.png" width="100%" height="80%" style="display: block; margin: auto;" /> --- ``` ## PC1 PC2 PC3 PC4 PC5 ## nperiods -0.25015548 -0.28306798 0.299866965 0.01988237 0.007459788 ## seasonal_period -0.26393969 0.28696832 0.051139488 0.16303439 -0.244602267 ## trend -0.09254692 -0.39342459 0.562003922 0.23531453 -0.135247539 ## spike 0.25145370 0.28050411 -0.297809299 -0.02335294 -0.001276768 ## linearity -0.29083944 0.21011259 -0.031900922 0.10972732 -0.152059601 ## curvature 0.31192980 -0.10402723 -0.007253597 -0.04667976 0.091712803 ## e_acf1 -0.29732670 0.09201381 -0.284236582 -0.16433035 0.050736230 ## e_acf10 -0.27433076 0.25869783 0.090604802 0.14905812 -0.085168189 ## entropy 0.31200170 -0.06298042 0.041681702 -0.13890553 -0.444682399 ## x_acf1 -0.31472933 -0.05671347 -0.055218270 -0.04434709 0.304305957 ## x_acf10 -0.27623217 0.25043429 -0.028667800 0.20947811 -0.230628829 ## diff1_acf1 -0.26923753 -0.24242777 -0.247527226 0.13422669 0.156890037 ## diff1_acf10 0.23382294 -0.13827817 -0.299265752 0.84766649 -0.067098135 ## diff2_acf1 -0.15220880 -0.41990568 -0.356888142 -0.01091912 0.248299360 ## diff2_acf10 0.16547661 0.38675965 0.359233481 0.22770006 0.667949089 ## PC6 ## nperiods 0.05095289 ## seasonal_period 0.20850432 ## trend -0.13106000 ## spike -0.09833377 ## linearity -0.24328398 ## curvature 0.19919255 ## e_acf1 -0.14702223 ## e_acf10 -0.01605061 ## entropy -0.72184055 ## x_acf1 -0.08218608 ## x_acf10 -0.13862312 ## diff1_acf1 -0.27951201 ## diff1_acf10 0.06089076 ## diff2_acf1 -0.20758438 ## diff2_acf10 -0.36659915 ``` --- .purple[.font3[**Principal Component Analysis**]] <img src="SlidesCodingR_files/figure-html/unnamed-chunk-46-1.png" width="97%" height="97%" /> --- <img src="images/PP16M.JPG" width="100%" height="100%" /> --- <img src="images/PP17.JPG" width="100%" height="100%" /> --- .purple[.font3[**Change point analysis**]] .font2[ * Change point detection is the process of identifying the time point, in which properties of data suddenly change.] <img src="images/CPT.JPG" width="82%" height="62%" style="display: block; margin: auto;" /> --- <img src="images/PP18.JPG" width="100%" height="100%" /> --- <img src="images/PP19.JPG" width="100%" height="100%" /> --- <img src="images/PP20.JPG" width="100%" height="100%" /> --- <img src="images/PP21.JPG" width="100%" height="100%" /> --- <img src="images/FLOW4.JPG" width="97%" height="97%" /> --- .purple[.font3[**Hierarchical forecasting workflow**]] .font2[ * All series at all levels of the hierarchical structure individually forecast based on **Mean, NAIVE, SNAIVE, ETS, and ARIMA methods**. * These are referred to as **base forecasts**.] <br><br> -- <img src="images/AUTOver1.JPG" width="1015" style="display: block; margin: auto;" /> --- .purple[.font3[**Coherence of data**]] <img src="images/DATAcoh1.JPG" width="97%" height="97%" /> --- .purple[.font3[**Coherence of data**]] <img src="images/DATAcohVZ2.JPG" width="97%" height="97%" /> --- .purple[.font2[**Base forecasting approaches**]] .font2[ .purple[**Mean method**] * Forecasts of all future values are equal to the average of the historical data. * If historical data are `\(y_{1}, y_{2},\dots, y_{T}\)`, then] `$$\hat{y}_{T+h|T}=\frac{y_{1}+y_{2}+\dots + y_{T}}{T}$$` .font2[.purple[**NAIVE method**] * All forecasts are equal to the value of the last observation.] `$$\hat{y}_{T+h|T}=y_{T}$$` --- .font2[.purple[**SNAIVE method**] * Forecast to be equal to the last observed value from the same season of the year. * If historical data are `\(y_{1}, y_{2},\dots, y_{T}\)`, then] `$$\hat{y}_{T+h|T}=y_{T+h-m(k+1)}$$` .font2[ * `\(m=\)` seasonal period * `\(k=\)` number of completed years in the forecast period prior to time `\(T+h\)`.] --- .font2[ .purple[**Exponential Smoothing (ETS) models**] * Forecasts are produced based on weighted averages of the past observations.] `$$\hat{y}_{T+1|T}=\alpha y_{T}+(1-\alpha)\hat{y}_{T}$$` `$$\hat{y}_{T+1|T} \hspace{0.05in} \approx \hspace{0.05in}\alpha y_{T}+\alpha (1-\alpha)y_{T-1}+\alpha (1-\alpha)^{2}y_{T-2}+\alpha (1-\alpha)^{3}y_{T-3}+\dots$$` .font2[ .purple[**AutoRegressive Integrated Moving Average (ARIMA) models**] * ARIMA models aim to describe the autocorrelations in the data.] --- .font2[ .purple[**Autoregressive models**] Autoregressive models consist the variable of interest using a linear combination of past values of the variable.] `$$y_{t}=\phi_{0}+\phi_{1}y_{t-1}+\phi_{2}y_{t-2}+\dots+\phi_{p}y_{t-p}+\epsilon_{t}$$` .font2[ .purple[**Moving average models**] In moving average models, current variable of interest is a linear combination of past forecast errors and current error.] `$$y_{t}=\phi_{0}+\theta_{1}\epsilon_{t-1}+\theta_{2}\epsilon_{t-2}+\dots+\theta_{q}\epsilon_{t-q}+\epsilon_{t}$$` --- .font3[.purple[**Base Forecasting Approaches**]] <br><br><br><br> .font2[.purple[**Spatial Hierarchical Structure**]] <br> <img src="images/SpaCoh.JPG" width="95%" height="90%" /> --- .font3[.purple[**Base Forecasting Approaches**]] <br><br><br><br> .font2[.purple[**Spatial Hierarchical Structure**]] <br> <img src="images/SpaCoh1.JPG" width="95%" height="90%" /> --- .font3[.purple[**Base Forecasting Approaches**]] <br><br><br><br> .font2[.purple[**Temporal Hierarchical Structure**]] <br> <img src="images/TemCoh.JPG" width="95%" height="90%" /> --- .font3[.purple[**Base Forecasting Approaches**]] <br><br><br><br> .font2[.purple[**Temporal Hierarchical Structure**]] <br> <img src="images/TemCoh1.JPG" width="95%" height="90%" /> --- .font3[.purple[**Forecast Reconciliation**]] .font2[ `\(h\)` step ahead reconciled forecasts at time `\(t: \hspace{0.1in} \tilde{y}_{t}{(h)}\)` <br> `\(h\)` step ahead base forecasts at time `\(t: \hspace{0.1in} \hat{y}_{t}{(h)}\)`] <img src="images/AUTO2.JPG" width="40%" height="40%" style="display: block; margin: auto;" /> .font2[ * Role of `\(G\)` is different from approach to approach.] --- .font3[.purple[**Hierarchical Forecasting approaches**]] .font2[ <br> * Top down approach <br><br> * Bottom up approach <br><br> * Middle out approach ] --- .font3[.purple[**Top down approach**]] <img src="images/TD.JPG" width="50%" height="50%" style="display: block; margin: auto;" /> $$ G= `\begin{pmatrix} p_{1} & 0 & 0 & 0 & 0 & 0 & 0\\ p_{2} & 0 & 0 & 0 & 0 & 0 & 0\\ p_{3} & 0 & 0 & 0 & 0 & 0 & 0\\ p_{4} & 0 & 0 & 0 & 0 & 0 & 0 \end{pmatrix}` $$ --- .font3[.purple[**Bottom up approach**]] <img src="images/BU.JPG" width="50%" height="50%" style="display: block; margin: auto;" /> $$ G= `\begin{pmatrix} 0 & 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 1 \end{pmatrix}` $$ --- .font3[.purple[**Trace minimization approach (MinT)**]] `$$G=(S^{'}W_{h}^{-1}S)^{-1} S^{'}W_{h}^{-1}$$` .font2[ * Error variance of base forecasts: `\(Var(y_{t+h}- \hat{y}_{t}(h))=W_{h}\)`] .font3[.purple[Alternatives]] .font2[ * Ordinary least square estimator] ##### `$$W_{h}=k_{h}I$$` .font2[ * Weighted least square estimator using structure of hierarchy] ##### `$$W_{h}=k_{h} \Lambda$$` .font2[ * Weighted least square estimator using shrinkage estimator] ##### `$$W_{h}=k_{h} \hat{W}_{1,D}^{*}$$` --- <img src="images/FLOW5.JPG" width="97%" height="97%" /> --- .font3[.purple[**Forecast accuracy**]] .font2[ * Performance of a forecast model is evaluated base on forecast accuracy.] .font3[.purple[**Mean Absolute Scale Error (MASE)**]] .font2[ * Error is the difference between observed value and forecast] `\((e_{T+h}=y_{T+h}-\hat{y}_{T+h|T})\)`. `$$MASE=mean(|q_{j}|)$$` where `$$q_{j}=\frac{e_{j}}{\sum_{t=m+1}^{T}\frac{|y_{t}-y_{t-m}|}{T-m}}$$` --- .font3[.purple[**Spatial/ temporal hierarchical forecasting**]] <img src="images/SETS.JPG" width="97%" height="97%" /> --- <img src="images/TABLE1.JPG" width="97%" height="97%" /> --- <img src="images/TABLE2.JPG" width="97%" height="97%" /> --- .font3[.purple[**The best forecasting approaches in provinces**]] <img src="images/Plevel1.JPG" width="97%" height="97%" /> --- .font3[.purple[**The best forecasting approaches in districts**]] <img src="images/Dlevel.JPG" width="98%" height="85%" /> --- .font3[.purple[**The best forecasting approaches for temporal granualities**]] <img src="images/TEMAGGRESULTS.JPG" width="97%" height="97%" /> --- <img src="images/FLOW6.JPG" width="97%" height="97%" /> --- class: bg-main1 center middle
<i class="fas fa-rocket fa-3x faa-passing animated "></i>
.font5[**Visualization of Model-based Results**] --- .font3[.purple[**Visualization of model-based results**]] <img src="images/MPVReason1.JPG" width="97%" height="97%" /> --- .font3[.purple[**Visualization of model-based results**]] <img src="images/MPVReason2.JPG" width="97%" height="97%" /> --- <img src="images/FLOW7.JPG" width="97%" height="97%" /> --- .font3[.purple[**Dissemination of Research Output**]] <img src="images/APP1.JPG" width="97%" height="97%" /> --- .font3[.purple[**Dissemination of Research Output**]] <img src="images/APP2.JPG" width="97%" height="97%" /> --- <img src="images/APP1RESULT.JPG" width="97%" height="97%" /> --- class: bg-main1 .font3[Conclusion] .font2[ * Forecasts generated by the hierarchical forecasting approach are extremely important to obtain aligned decisions across the entire hierarchical structure. However, the best forecasting approach varies according to the features associated with time series. * Feature-based visualization assists to identify the pattern variations of the series in the spatial hierarchical structure.] --- class: bg-main1 .font3[Future directions] .font2[ * Nowcasting approaches can be used to fix data issues. * The cross-temporal hierarchical forecasting approach can be considered in the future. * The effect of other exogenous factors such as climate, demographic, and entomological variables can be included in the forecasting models.] --- class: bg-main1 .font2[References] .font2[ * Hyndman, RJ & Athanasopoulos, G 2018, Forecasting: Principles and practice, OTexts. * Killick, R & Eckley, I 2014, ‘Changepoint: An r package for changepoint analysis,’ Journal of statistical software, vol. 58, no. 3, pp. 1–19. * Montero-Manso, P., Athanasopoulos, G., Hyndman, R.J. and Talagala, T.S., 2020. FFORMA: Feature-based forecast model averaging. International Journal of Forecasting, 36(1), pp.86-92. * Panagiotelis, A, Athanasopoulos, G, Gamakumara, P & Hyndman, RJ 2021, ‘Forecast reconciliation: A geometric view with new insights on bias correction,’ International Journal of Forecasting, vol. 37, no. 1, pp. 343–359.] --- class: bg-main1 .center[.font4[Thank you!]] .center[![scale 3%](images\F8M.JPG)] .font2[Madushani, L.S. and Talagala, T.S., 2021. Hierarchical Forecasting of Dengue Incidence in Sri Lanka. arXiv preprint arXiv:2112.00992.] .font2[Forecasting App available :<br> https://samudramadushani.shinyapps.io/DengueAPPversion1 <br> https://samudramadushani.shinyapps.io/DengueAPPversion2] ###
<i class="fab fa-github faa-vertical animated "></i>
: SamudraMadushani <br> ###
<i class="fab fa-twitter faa-float animated "></i>
: @Samudramadu ---