# Root Cause Analysis

## Introduction

Root cause analysis (RCA) can provide valuable information regarding forecasting results. Users have the ability to initiate the calculation of RCA results for a completed forecasting job by accessing the RCA endpoint. This functionality allows users to understand the factors that contribute to the forecast's appearance and gain insights into the construction of the Model Zoo.

## Output

In the example provided below, there is a table representing the output of the root cause analysis:

timestamp | term_1 | term_2 | term_3 | … | term_N | yhat_1 | yhat_2 | yhat_3 | … | yhat_N | predictor_1 | predictor_2 | predictor_3 | … | predictor_N |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

2014-10-25T04:00:00.0 | 2546 | 900 | 943.05 | … | 624 | 1943 | 1984 | 1987 | … | 3296 | 1443 | 1984 | 1287 | … | 1396 |

2014-10-26T04:00:00.0 | 2451 | 5000 | 5409.6 | … | 234 | 2195 | 2104 | 2089 | … | 3123 | 2943 | 1584 | 2987 | … | 1496 |

2014-10-27T04:00:00.0 | 2103 | 200 | 65363.4 | … | 123 | 2211 | 2190 | 2168 | … | 2762 | 2142 | 1984 | 2987 | … | 996 |

2014-10-28T04:00:00.0 | 2301 | 100 | 543.5 | … | 545 | 2189 | 2154 | 2167 | … | 4153 | 643 | 1984 | 1987 | … | 1996 |

2014-10-29T04:00:00.0 | 2225 | 432 | 983 | … | 321 | 2567 | 2592 | 2598 | … | 3112 | 1143 | 1484 | 1987 | … | 1996 |

2014-10-30T04:00:00.0 | 2155 | 4355 | 1235.6 | … | 134 | 2532 | 2490 | 2487 | … | 4123 | 4943 | 1984 | 1987 | … | 1996 |

## Interpreting root cause analysis results

First and foremost, it is important to note that each forecast value can be generated by a different model within a Model Zoo. When examining the forecast and comprehending its construction, it is necessary to restrict the view to only other forecasts generated by the exact same model. This is why the model's index is a required parameter in the RCA endpoint. Each model's terms are additive, allowing for a clear understanding of the individual impact of each term on the forecast. There are three distinct views available: the nominal term view, the relative term view, and the predictor view.

The nominal term view provides precise information regarding the contribution of each term to the estimated forecast value. The relative term view presents a slightly different decomposition of the forecast, facilitating a better geometrical understanding of how the model gradually takes shape by adding terms. The predictor view aggregates the impact of each predictor across all terms in the model, offering information on the contribution of each predictor to the forecast value.

### Nominal term_i

The value of the *i*-th term of the model of a chosen *model_index* used to obtain the forecast. The term can be found in the *Model Zoo* by *model_index* and the order number *i*. It is essential to mention that the term*1 of the model with the _model_index* 1 is different than the term*1 of the model with the _model_index* 2 - they are two separate models and have different terms.

NOTE: For a given timestamp t, the sum of the terms equals the forecast value.

### Relative yhat_i

This essentially equals the forecast which would be obtained if the model only consisted of the first *i* terms (different from the sum of the first *i* terms). The forecasting error thus decreases with increasing *i*, showing the gradual build-up of the model. The nominal view of terms does not satisfy this property. This property visualizes how important individual terms are for the final forecast and how they influence it. If something goes wrong, this allows users to easily identify which term is responsible.

NOTE: For a given timestamp t, the last yhat (cumulation of all yhat's) equals the forecast value.

### Aggregated predictor_i

It reveals the involvement of i-th predictor in the forecast value for a given data point. This is a straightforward way to figure out the impact of a given predictor on the forecast value.

NOTE: For a given timestamp t, the sum of the predictors equals the forecast value.