Skip to content

Commit

Permalink
removed a few useless lines
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeBiessy committed Aug 12, 2023
1 parent 8f6a4d5 commit 6ae1f51
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@ predict.WH_2d <- function(object, newdata = NULL, ...) {

ind_rows <- c(rep(FALSE, n_inf[[1]]), rep(TRUE, n[[1]]), rep(FALSE, n_sup[[1]]))
ind_fit <- c(rep(FALSE, n_tot[[1]] * n_inf[[2]]), rep(ind_rows, n[[2]])) |> which()
ind_tot <- seq_len(prod_n_tot)

D_mat_pred <- map2(n_tot, object$q, build_D_mat) # extended difference matrices
P_pred <- object$lambda[[1]] * diag(n_tot[[2]]) %x% crossprod(D_mat_pred[[1]]) +
Expand All @@ -522,7 +521,7 @@ predict.WH_2d <- function(object, newdata = NULL, ...) {

A1 <- diag(prod_n_tot)
A2 <- matrix(0, prod_n_tot, prod_n_tot)
A2[ind_tot, ind_fit] <- A_aux
A2[, ind_fit] <- A_aux
A3 <- A_aux %*% (object$U %*% object$Psi %*% t(object$U)) %*% P_pred[ind_fit,]

A_pred <- A1 - A2 + A3
Expand Down

0 comments on commit 6ae1f51

Please sign in to comment.