0

所以我使用这些线来绘制我的强盗策略,但它们都具有完全相同的累积奖励率。这是不可能的。我在这里做错了什么?提前致谢!:)

simulations <- 1
horizon <- nrow(atukunda_a) #My dataset is atukunda_a
log_S <- atukunda_a #This is the data
formula <- "blood_loss_24hrs ~ study_group" #reward ~ arms
bandit <- OfflineReplayEvaluatorBandit$new(formula,log_S)
#?RandomPolicy
agents <-
  list(Agent$new(ThompsonSamplingPolicy$new(1.0,1.0), bandit, "ThompsonSampling"),
       Agent$new(UCB1Policy$new(), bandit, "UCB1"))

simulation <-
  Simulator$new(
    agents = agents,
    simulations = simulations,
    horizon = horizon,
    save_context = FALSE,
    progress_file = TRUE,
    do_parallel = FALSE
  )

sim <- simulation$run()
plot(sim, type = "cumulative", legend_title = "Simulation",
         rate = TRUE, regret = FALSE, legend_position = "bottomright")

数据 这就是我得到的

4

0 回答 0