Skip to content

Commit

Permalink
docs: renaming of cross-mmm fxs
Browse files Browse the repository at this point in the history
  • Loading branch information
laresbernardo committed Dec 5, 2024
1 parent c286b89 commit ac011b4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 26 deletions.
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.9.9007
Version: 5.2.9.9008
Authors@R: c(
person("Bernardo", "Lares", , "[email protected]", c("aut", "cre")))
Maintainer: Bernardo Lares <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ export(replaceall)
export(replacefactor)
export(right)
export(rmse)
export(robyn_crossmmm)
export(robyn_crossmmm2)
export(robyn_hypsbuilder)
export(robyn_modelselector)
export(robyn_performance)
export(robyn_xchannels)
export(robyn_xmodels)
export(rsq)
export(rsqa)
export(rtistry_sphere)
Expand Down
6 changes: 3 additions & 3 deletions R/crossbrand.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
####################################################################
#' Cross-MMM Budget Optimization
#' Cross-MMM Budget Optimization across Models
#'
#' Given a list of recreated Robyn models, this function optimizes budget
#' allocation across MMM with respective constraints by maximizing
Expand Down Expand Up @@ -30,7 +30,7 @@
#' names(models) <- gsub("\\.json", "", files)
#'
#' # Calculate cross-brand optimal allocation
#' res <- robyn_crossmmm(
#' res <- robyn_xmodels(
#' models,
#' cores = 10,
#' start_dates = "2023-01-01",
Expand All @@ -41,7 +41,7 @@
#' }
#' @export
#' @rdname robyn_crossmmm
robyn_crossmmm <- function(
robyn_xmodels <- function(
models, initial_budgets = NULL,
start_dates = NULL,
end_dates = NULL,
Expand Down
23 changes: 12 additions & 11 deletions R/crossbrand2.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
####################################################################
#' Cross-MMM Budget Allocator by Channel
#' Cross-MMM Budget Optimization across Channels (fast)
#'
#' Given a list of recreated Robyn models, this function optimizes budget
#' allocation across MMM with respective constraints by maximizing
Expand All @@ -11,7 +11,7 @@
#' to simplify results readings and application.
#'
#' This approach is faster and cleaner compared with previous proposal
#' using \code{robyn_crossmmm()}.
#' using \code{robyn_xmodels()}.
#'
#' @param models Lists. Recreated Robyn models with \code{robyn_recreate()}.
#' @param initial_budgets Numeric vector. Default will use the total spends
Expand All @@ -31,22 +31,23 @@
#' @examples
#' \dontrun{
#' # Calculate cross-brand optimal allocation
#' res <- robyn_crossmmm2(
#' res <- robyn_xchannels(
#' models,
#' start_dates = "2023-01-01",
#' end_dates = "2023-12-01"
#' )
#' }
#' @rdname robyn_crossmmm
#' @export
robyn_crossmmm2 <- function(models,
initial_budgets = NULL,
start_dates = NULL,
end_dates = NULL,
channel_constr_low = 0.5,
channel_constr_up = 2,
quiet = FALSE,
...) {
robyn_xchannels <- function(
models,
initial_budgets = NULL,
start_dates = NULL,
end_dates = NULL,
channel_constr_low = 0.5,
channel_constr_up = 2,
quiet = FALSE,
...) {
try_require("Robyn")
try_require("nloptr")

Expand Down
18 changes: 9 additions & 9 deletions man/robyn_crossmmm.Rd

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

0 comments on commit ac011b4

Please sign in to comment.