mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-07-22 19:23:36 +00:00
Add drop = FALSE in regressor_coefficients()
Add `drop = FALSE` in definition of `regressor_coefficients()` to handle the case when there is only one additional regressor.
This commit is contained in:
parent
b75844e07c
commit
e69f2f503f
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ regressor_coefficients <- function(m){
|
|||
regr_mus <- unlist(lapply(m$extra_regressors, function (x) x$mu))
|
||||
regr_stds <- unlist(lapply(m$extra_regressors, function(x) x$std))
|
||||
|
||||
beta_indices <- which(m$train.component.cols[, regr_names] == 1, arr.ind = TRUE)[, "row"]
|
||||
beta_indices <- which(m$train.component.cols[, regr_names, drop = FALSE] == 1, arr.ind = TRUE)[, "row"]
|
||||
betas <- m$params$beta[, beta_indices, drop = FALSE]
|
||||
# If regressor is additive, multiply by the scale factor to put coefficients on the original training data scale.
|
||||
y_scale_indicator <- matrix(
|
||||
|
|
|
|||
Loading…
Reference in a new issue