generate_bandit_data {banditsCI} | R Documentation |
Generate classification data.
Description
Generates covariates and potential outcomes for a classification dataset.
Usage
generate_bandit_data(xs = NULL, y = NULL, noise_std = 1, signal_strength = 1)
Arguments
xs |
Optional matrix. Covariates of shape |
y |
Optional vector. Labels of length |
noise_std |
Numeric. Standard deviation of the noise added to the potential outcomes. Default is |
signal_strength |
Numeric. Strength of the signal in the potential outcomes. Default is |
Value
A list containing the generated data (xs
, ys
, muxs
, A
, p
, K
) and the true class probabilities (mus
).
Examples
data <- generate_bandit_data(xs = as.matrix(iris[,1:4]),
y = as.numeric(iris[,5]),
noise_std = 0.1,
signal_strength = 1.0)
[Package banditsCI version 1.0.0 Index]