Skip to content

Commit

Permalink
fix: robyn_modelselector()'s scores issue when a cluster had 2 models…
Browse files Browse the repository at this point in the history
…, thus no sd
  • Loading branch information
bl896211_gsk committed Feb 3, 2025
1 parent 570e8ab commit 2fa1d09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: lares
Type: Package
Title: Analytics & Machine Learning Sidekick
Version: 5.2.11.9001
Version: 5.2.11.9002
Authors@R: c(
person("Bernardo", "Lares", , "laresbernardo@gmail.com", c("aut", "cre")))
Maintainer: Bernardo Lares <laresbernardo@gmail.com>
Expand Down
1 change: 1 addition & 0 deletions R/robyn.R
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ robyn_modelselector <- function(
normalized_value <- normalize(data[[metric_name]], na.rm = TRUE)
weight <- weights[which(metrics == metric_name)]
sign <- ifelse(metric_name %in% invert_criteria, -1, 1)
normalized_value[is.na(normalized_value)] <- 0
return(normalized_value * weight * sign)
}
return(0)
Expand Down

0 comments on commit 2fa1d09

Please sign in to comment.