Skip to contents

The current state of the multi armed bandit is marked based on the indices in the list of each combination of column and lower and upper bound type.

Usage

envir_to_bounds(current_envir, envir, interest_cols)

update_bounds(current_envir, envir, actions, selected_action)

create_anchor_inst(bounds, interest_cols)

generate_cutpoints(dataset, instance_id, interest_columns)

make_perturb_distn(n, interest_cols, dataset, instance_id, seed = 123)

Arguments

current_envir

List of indexes, the current state

envir

The current environment

interest_cols

Columns from the dataset that are of interest

selected_action

The index of selected action from the actions list

bounds

The upper and lower bounds of each column of interest

dataset

The dataset used to make the anchors

instance_id

The index of the target observation in the dataset

n

Number of samples

seed

Numerical. Seed to ensure that the perturbation distribution remains consistent.

interest_coluns

The columns of dataset to consider when creating lower and upper bounds

Value

A tibble of 1 x (2*p) where p is the number of columns of interest

New bounds

an instance of the anchor class

A list. Contains lower and upper bounds for each specific column of interest.

A purrr partial function that takes in N and returns N number of sample points around the instance