osp.impulse.control: LS-flavor RMC algorithm with a variety of regression methods...

View source: R/ospProbDesign.R

osp.impulse.controlR Documentation

LS-flavor RMC algorithm with a variety of regression methods for stochastic impulse control

Description

RMC for impulse control. Training design specified explicitly by the user

Usage

osp.impulse.control(
  model,
  input.domain = NULL,
  method = "spline",
  verb = 101,
  mpc = FALSE
)

Arguments

model

a list defining the simulator and reward model, with the two main model hooks being impulse.func (plus parameters) and sim.func (plus parameters).

method

a string specifying regression method to use

  • spline [Default]: smooth.spline from base which only works in 1D

  • randomforest: (from randomForest package) requires rf.maxnode and rf.ntree (number of trees) model parameters

  • loess: only works in 1D or 2D, requires lo.span model parameter

  • deepnet: neural network using deepnet. Specify nn.layers as a vector to describe the number of nodes across hidden layers

  • homgp Homoskedastic GP: use hetGP with mleHomGP

  • hetgp Heteroskedastic GP: use hetGP with mleHetGP

  • lm: linear global regression using model$bases (required) basis functions (+ constant)

Details

Works with a design specified by the user

Calls model$impulse.func, so the latter must be set prior to calling. Also needs model$dt and model$r for discounting.

Calls model$sim.func to generate forward paths. Use in conjunction with forward.impulse.policy

Value

a list containing

  • fit a list containing all the models generated at each time-step. fit[[1]] is the emulator at t=\Delta t, the last one is fit[[M-1]] which is emulator for T-\Delta t.

  • timeElapsed (based on Sys.time)

Author(s)

Mike Ludkovski

Examples

set.seed(1)
require(DiceKriging)
modelBelak <- list(dim=1, sim.func=sim.bm, r=0.5, drift=0, sigma=1, 
x0=1,  impulse.fixed.cost = 1,impulse.target = 0,impulse.func = forest.impulse,
imp.type = "forest",T=5, dt=0.05,pilot.nsims=0,batch.nrep = 10,nk = 30,N = 601)
belSolve <- osp.impulse.control(modelBelak, input.domain = seq(-0.5,2.5,by=0.005),method="spline")

mludkov/mlOSP documentation built on April 29, 2023, 7:56 p.m.