SplitUplift: Split data with respect to uplift distribution

Description Usage Arguments Value Author(s) References Examples

View source: R/SplitUplift.R

Description

Split a dataset into training and validation subsets with respect to the uplift sample distribution.

Usage

1

Arguments

data

a data frame of interest that contains at least the response and the treatment variables.

p

The desired sample size. p is a value between 0 and 1 expressed as a decimal, it is set to be proportional to the number of observations per group.

group

Your grouping variables. Generally, for uplift modelling, this should be a vector of treatment and response variables names, e.g. c("treat", "y").

Value

train

a training data frame of p percent

valid

a validation data frame of 1-p percent

Author(s)

Mouloud Belbahri

References

Belbahri, M., Murua, A., Gandouet, O., and Partovi Nia, V. (2019) Uplift Regression, <https://dms.umontreal.ca/~murua/research/UpliftRegression.pdf>

Examples

1
2
3
4
5
6
library(tools4uplift)
data("SimUplift")

split <- SplitUplift(SimUplift, 0.8, c("treat", "y"))
train <- split[[1]]
valid <- split[[2]]

tools4uplift documentation built on Jan. 6, 2021, 5:09 p.m.