Skip to content

Commit 2e9e145

Browse files
committed
Changed naming of matrix A to use "aggregation matrix" everywhere.
1 parent df536b7 commit 2e9e145

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# bayesRecon 0.3.1
22

3-
* IMPORTANT CHANGE IN THE API OF THE `reconc_*` functions: they now require the aggregating matrix A and not the summing matrix S.
3+
* IMPORTANT CHANGE IN THE API OF THE `reconc_*` functions: they now require the aggregation matrix A and not the summing matrix S.
44

55
* The examples section of the `reconc_TDcond` now contains an example showing how to handle the case of an unbalanced hierarchy.
66

R/hierarchy.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ get_reconc_matrices <- function(agg_levels, h) {
413413
}
414414

415415

416-
# Get the aggregating matrix Au of the sub-hierarchy composed just by the uppers
416+
# Get the aggregation matrix Au of the sub-hierarchy composed just by the uppers
417417
.get_Au <- function(A, lowest_rows=NULL) {
418418

419419
if (is.null(lowest_rows)) lowest_rows = .lowest_lev(A)

R/reconc_MCMC.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ reconc_MCMC <- function(A,
208208
# @title Compute acceptance probability
209209
# @param b proposal state
210210
# @param b0 current state
211-
# @param A aggregating matrix
211+
# @param A aggregation matrix
212212
# @param distr list of strings specifying the distribution of each variable
213213
# @param params list of the parameters of the distributions
214214
# @return the acceptance probability alpha

R/reconc_TDcond.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
#' 5, 0, 0, var_b5), nrow=4, byrow = TRUE)
220220
#' fc_upper<- list(mu=mu, Sigma=Sigma)
221221
#'
222-
#' # We also need to update the aggregating matrix
222+
#' # We also need to update the aggregation matrix
223223
#' A <- matrix(c(1,1,1,1,1,
224224
#' 1,1,0,0,0,
225225
#' 0,0,1,1,0,

man/reconc_TDcond.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vignettes/bayesRecon.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ for (l in seq_along(train.agg)) {
154154
```
155155

156156

157-
Reconciliation requires the aggregating matrix $\mathbf{A}$, which we obtain using the function `get_reconc_matrices`.
157+
Reconciliation requires the aggregation matrix $\mathbf{A}$, which we obtain using the function `get_reconc_matrices`.
158158
It requires:
159159

160160
* the aggregation factors of the hierarchy, which in this example are $\{2, 3, 4, 6, 12\}$;
161161
* the length of the forecasting horizon at the bottom level, which is 12 in this example.
162162

163-
``` {r aggregatingMatrix}
163+
``` {r aggregationMatrix}
164164
recon.matrices <- bayesRecon::get_reconc_matrices(agg_levels = c(2, 3, 4, 6, 12), h = 12)
165-
# Aggregating matrix
165+
# Aggregation matrix
166166
A <- recon.matrices$A
167167
```
168168

@@ -279,7 +279,7 @@ for (level in train.agg) {
279279

280280
Using the function `get_reconc_matrices`, we get matrix $\mathbf{A}$.
281281

282-
```{r m3-rmat, dpi=300, out.width = '70%', fig.align='center', fig.cap="**Figure 4**: M3 - The aggregating matrix A (red=1, yellow=0).", fig.dim = c(8, 8)}
282+
```{r m3-rmat, dpi=300, out.width = '70%', fig.align='center', fig.cap="**Figure 4**: M3 - The aggregation matrix A (red=1, yellow=0).", fig.dim = c(8, 8)}
283283
rmat <- get_reconc_matrices(agg_levels = c(2, 3, 4, 6, 12), h = 18)
284284
285285
par(mai = c(1,1,0.5,0.5))
@@ -392,7 +392,7 @@ for (s in infantMortality) {
392392

393393
Now we build the $\mathbf{A}$ matrix.
394394

395-
```{r infants-s, dpi=300, out.width = '70%', fig.align='center', fig.cap="**Figure 6**: Infants mortality - The aggregating matrix A (red=1, yellow=0).", fig.dim = c(8, 8)}
395+
```{r infants-s, dpi=300, out.width = '70%', fig.align='center', fig.cap="**Figure 6**: Infants mortality - The aggregation matrix A (red=1, yellow=0).", fig.dim = c(8, 8)}
396396
# we have 16 bottom time series, and 11 upper time series
397397
A <- matrix(data = c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
398398
1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -444,4 +444,4 @@ upper_mu_reconc
444444
```
445445

446446
# References
447-
<div id="refs"></div>
447+
<div id="refs"></div>

vignettes/reconciliation_properties.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ n_b <- 5
6060
n_u <- 1
6161
n <- n_b + n_u
6262
63-
A <- matrix(1, ncol = n_b, nrow = n_u) # aggregating matrix
63+
A <- matrix(1, ncol = n_b, nrow = n_u) # aggregation matrix
6464
6565
# Actual values:
6666
actuals <- data.frame(extr_mkt_events) # convert to data frame

0 commit comments

Comments
 (0)