Skip to content

Commit

Permalink
docs: CRAN 3.11.0 (#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
laresbernardo authored Jun 20, 2024
1 parent 276455c commit 6afc50b
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 62 deletions.
10 changes: 4 additions & 6 deletions R/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: Robyn
Type: Package
Title: Semi-Automated Marketing Mix Modeling (MMM) from Meta Marketing Science
Version: 3.10.7.9001
Version: 3.11.0
Authors@R: c(
person("Gufeng", "Zhou", , "[email protected]", c("cre","aut")),
person("Bernardo", "Lares", , "[email protected]", c("aut")),
person("Gufeng", "Zhou", , "[email protected]", c("aut")),
person("Bernardo", "Lares", , "[email protected]", c("cre","aut")),
person("Leonel", "Sentana", , "[email protected]", c("aut")),
person("Igor", "Skokan", , "[email protected]", c("aut")),
person("Meta Platforms, Inc.", role = c("cph", "fnd")))
Maintainer: Gufeng Zhou <gufeng@meta.com>
Maintainer: Bernardo Lares <laresbernardo@gmail.com>
Description: Semi-Automated Marketing Mix Modeling (MMM) aiming to reduce human bias by means of ridge regression and evolutionary algorithms, enables actionable decision making providing a budget allocation and diminishing returns curves and allows ground-truth calibration to account for causation.
Depends:
R (>= 4.0.0)
Expand All @@ -30,8 +30,6 @@ Imports:
reticulate,
stringr,
tidyr
Suggests:
shiny
Config/reticulate:
list(
packages = list(
Expand Down
24 changes: 12 additions & 12 deletions R/R/inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -477,24 +477,24 @@ Adstock: {x$adstock}
#' needs to be specified in \code{paid_media_spends} specifically. Run \code{hyper_names()}
#' to get correct hyperparameter names. All names in hyperparameters must
#' equal names from \code{hyper_names()}, case sensitive.
#' \item{Get guidance for setting hyperparameter bounds:
#' \item Get guidance for setting hyperparameter bounds:
#' For geometric adstock, use theta, alpha & gamma. For both weibull adstock options,
#' use shape, scale, alpha, gamma.}
#' use shape, scale, alpha, gamma.
#' \itemize{
#' \item{Theta: }{In geometric adstock, theta is decay rate. guideline for usual media genre:
#' TV c(0.3, 0.8), OOH/Print/Radio c(0.1, 0.4), digital c(0, 0.3)}
#' \item{Shape: }{In weibull adstock, shape controls the decay shape. Recommended c(0.0001, 2).
#' \item Theta: In geometric adstock, theta is decay rate. guideline for usual media genre:
#' TV c(0.3, 0.8), OOH/Print/Radio c(0.1, 0.4), digital c(0, 0.3)
#' \item Shape: In weibull adstock, shape controls the decay shape. Recommended c(0.0001, 2).
#' The larger, the more S-shape. The smaller, the more L-shape. Channel-type specific
#' values still to be investigated}
#' \item{Scale: }{In weibull adstock, scale controls the decay inflexion point. Very conservative
#' values still to be investigated
#' \item Scale: In weibull adstock, scale controls the decay inflexion point. Very conservative
#' recommended bounce c(0, 0.1), because scale can increase adstocking half-life greatly.
#' Channel-type specific values still to be investigated}
#' \item{Gamma: }{In s-curve transformation with hill function, gamma controls the inflexion point.
#' Channel-type specific values still to be investigated
#' \item Gamma: In s-curve transformation with hill function, gamma controls the inflexion point.
#' Recommended bounce c(0.3, 1). The larger the gamma, the later the inflection point
#' in the response curve}
#' in the response curve
#' }
#' \item{Set each hyperparameter bounds. They either contains two values e.g. c(0, 0.5),
#' or only one value (in which case you've "fixed" that hyperparameter)}
#' \item Set each hyperparameter bounds. They either contains two values e.g. c(0, 0.5),
#' or only one value (in which case you've "fixed" that hyperparameter)
#' }
#'
#' @section Helper plots:
Expand Down
44 changes: 21 additions & 23 deletions R/R/plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -427,29 +427,27 @@ robyn_onepagers <- function(
sign = as.factor(ifelse(.data$xDecompPerc >= 0, "Positive", "Negative"))
)

p2 <- suppressWarnings(
ggplot(plotWaterfallLoop, aes(x = .data$id, fill = .data$sign)) +
geom_rect(aes(
x = .data$rn, xmin = .data$id - 0.45, xmax = .data$id + 0.45,
ymin = .data$end, ymax = .data$start
), stat = "identity") +
scale_x_discrete("", breaks = levels(plotWaterfallLoop$rn), labels = plotWaterfallLoop$rn) +
scale_y_percent() +
scale_fill_manual(values = c("Positive" = "#59B3D2", "Negative" = "#E5586E")) +
theme_lares(background = "white", legend = "top") +
geom_text(mapping = aes(
label = paste0(
formatNum(.data$xDecompAgg, abbr = TRUE),
"\n", round(.data$xDecompPerc * 100, 1), "%"
),
y = rowSums(cbind(.data$end, .data$xDecompPerc / 2))
), fontface = "bold", lineheight = .7) +
coord_flip() +
labs(
title = "Response Decomposition Waterfall by Predictor",
x = NULL, y = NULL, fill = "Sign"
)
)
p2 <- ggplot(plotWaterfallLoop, aes(x = .data$id, fill = .data$sign)) +
geom_rect(aes(
xmin = .data$id - 0.45, xmax = .data$id + 0.45,
ymin = .data$end, ymax = .data$start
), stat = "identity") +
scale_x_discrete("", breaks = levels(plotWaterfallLoop$rn), labels = plotWaterfallLoop$rn) +
scale_y_percent() +
scale_fill_manual(values = c("Positive" = "#59B3D2", "Negative" = "#E5586E")) +
theme_lares(background = "white", legend = "top") +
geom_text(mapping = aes(
label = paste0(
formatNum(.data$xDecompAgg, abbr = TRUE),
"\n", round(.data$xDecompPerc * 100, 1), "%"
),
y = rowSums(cbind(.data$end, .data$xDecompPerc / 2))
), fontface = "bold", lineheight = .7) +
coord_flip() +
labs(
title = "Response Decomposition Waterfall by Predictor",
x = NULL, y = NULL, fill = "Sign"
)

## 3. Adstock rate
if (InputCollect$adstock == "geometric") {
Expand Down
7 changes: 0 additions & 7 deletions R/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,3 @@ Meta's Robyn is MIT licensed, as found in the LICENSE file.

- Terms of Use - https://opensource.facebook.com/legal/terms
- Privacy Policy - https://opensource.facebook.com/legal/privacy

## Contact

* [email protected], Gufeng Zhou, Marketing Science Partner
* [email protected], Leonel Sentana, Marketing Science Partner
* [email protected], Igor Skokan, Marketing Science Partner
* [email protected], Bernardo Lares, Marketing Science Partner
24 changes: 12 additions & 12 deletions R/man/hyper_names.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions demo/demo.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# LICENSE file in the root directory of this source tree.

#############################################################################################
#################### Meta MMM Open Source: Robyn 3.10.7 #######################
#################### Meta MMM Open Source: Robyn 3.11.0 #######################
#################### Quick demo guide #######################
#############################################################################################

Expand Down Expand Up @@ -412,7 +412,7 @@ AllocatorCollect3 <- robyn_allocator(
InputCollect = InputCollect,
OutputCollect = OutputCollect,
select_model = select_model,
# date_range = NULL, # Default last month as initial period
# date_range = NULL, # Default: "all" available dates
scenario = "target_efficiency",
# target_value = 2, # Customize target ROAS or CPA value
export = create_files
Expand Down

0 comments on commit 6afc50b

Please sign in to comment.