model from log
models_from_log(meta, reward_fn = function(x, h) pmin(x, h))
meta | a data frame containing the log metadata for each set of alpha vectors desired, see |
---|---|
reward_fn | a function f(x,a) giving the reward for taking action a given a system in state x. |
a list with an element for each row in the requested meta data frame, which itself is a list of the three matrices: transition, observation, and reward, defining the pomdp problem.
assumes transition can be determined by the f_from_log function, which is specific to the fisheries example
# NOT RUN { source(system.file("examples/fisheries-ex.R", package = "sarsop")) log = tempfile() alpha <- sarsop(transition, observation, reward, discount, precision = 10, log_dir = log, log_data = log_data) ## Get metadata for all logged solutions matching the desired query meta <- meta_from_log(parameters = data.frame(model = "ricker", r = 0.1), log_dir = log) alphas <- alphas_from_log(meta, log_dir = log) fs <- f_from_log(meta) models <- models_from_log(meta) # }