Description Usage Arguments Value Examples

compare_plus

1 2 |

`models` |
a list of lists, each of which gives the transition matrix, observation matrix and reward matrix for the model considered |

`discount` |
discount rate |

`model_prior` |
Prior belief assigned to each model. uniform by default. |

`state_prior` |
Prior belief that system is in state x_i and model m_i |

`obs` |
vector of historical observations. Must use index value of (discrete) observation |

`action` |
corresponding vector of historical actions. Must use index value of (discrete) action |

`alphas` |
the alpha vectors for each model, as provided from |

`model_names` |
vector of identifying names for each model. If none are provided, model posterior columns will be named V1, V2, etc. |

`...` |
additional options to sarsop::sarsop, if alphas are not provided |

a list with elements
(1) `df`

a data.frame with the time, state, observation, action, and value at each timestep,
(2) `model_posterior`

, a data.frame of Tmax rows by n_models columns giving the evolution of the belief over models, and
(3) `state_posterior`

, a data.frame of Tmax rows by n_states columns giving the evolution of the belief over states

1 2 3 4 5 6 7 8 9 | ```
## Not run:
source(system.file("examples/K_models.R", package="pomdpplus"))
alphas <- sarsop_plus(models, discount, precision = 1)
out <- compare_plus(models = models, discount = discount,
obs = rnorm(21, 15, 0.1),
action = rep(1, 21),
alphas = alphas)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.