Class Ctmc_hitting_dist
The chain starts in the regeneration state x0, and a cycle ends at its
first return to x0. With T the hitting time of the target set A and tau the
cycle length, T = S + V, where S is the geometric sum of the M cycles
completed before the first one that reaches A and V is the time to reach A
inside that cycle. Every estimator needs p = P(T < tau), which is small,
and some cycle statistics under the original law. They are obtained by
measure-specific importance sampling (Goyal et al. 1992): n*gamma cycles of
crude simulation (CS) estimate the cycle statistics, and the other
n*(1-gamma) cycles, run under the change of measure options.istrans,
estimate p and the law H of V. The number of CS cycles is
floor(gamma*n + 0.5).
"exp": F(t) = 1 - exp(-t/mu), mu = E[T ^ tau]/p (eq. 6);"conv": exponential law of S, mean eta, convolved with H (eq. 10);"corr": Blanchet-Glynn corrected exponential law of S with H (Estimator 3);"gamma": gamma law with the first two moments of T, E[T^2] from Proposition 1 (Estimator 4);"boot": semi-parametric bootstrap of S + V (Estimator 5).
The change of measure acts on the embedded jump chain only. Holding times are drawn from the original total rate, so the likelihood ratio of a path is the product of P(x,y)/P'(x,y) over its jumps.
CONVENTIONS. In generator mode a state is a 0-based row index of Q (MATLAB
uses 1-based row indices), the target is a set of 0-based indices or a
boolean mask, and the successors of a state are its positive off-diagonal
entries in ascending column order, as MATLAB's find. In function mode
a state is a double[]; successors equal to the state and zero rates are
dropped, keeping the order the transition function gave.
RANDOM NUMBERS. All draws come from one MRG32k3a stream in L'Ecuyer's
double-precision form, seeded from options.seed by the same affine map
as sim_prio_tailquantile, and consumed in a fixed order: CS cycles,
then IS cycles, then the bootstrap; in a cycle each jump takes the holding
time first and the successor second. MATLAB, Python and C++ consume the same
stream in the same order, so with the same inputs the four codebases draw the
same sample paths.
Twin of MATLAB ctmc_hitting_dist and of the Python
api.mc.ctmc_hitting_dist; the errors carry the same ids
(LINE:input:Option, LINE:input:Argument,
LINE:numerical:NoSample, LINE:numerical:Infeasible,
LINE:numerical:MaxIter).
Reference: P. W. Glynn, M. K. Nakayama, B. Tuffin, "Comparing regenerative-simulation-based estimators of the distribution of the hitting time to a rarely visited set", Proc. Winter Simulation Conference 2020, 421-432.
- Since:
- LINE 3.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceChange of measure in function mode: the importance rates of the successors Y of x.static final classOptions; every field has the MATLAB default.static final classEstimates and diagnostics; arrays are indexed like t (and like q). -
Method Summary
Modifier and TypeMethodDescriptionstatic Ctmc_hitting_dist.Resultctmc_hitting_dist(double[][] Q, int x0, boolean[] target, double[] t, Ctmc_hitting_dist.Options options) Generator mode with the target given as a boolean mask over the rows.static Ctmc_hitting_dist.Resultctmc_hitting_dist(double[][] Q, int x0, int[] target, double[] t) Generator mode with the default options.static Ctmc_hitting_dist.Resultctmc_hitting_dist(double[][] Q, int x0, int[] target, double[] t, Ctmc_hitting_dist.Options options) Generator mode with the target given as 0-based row indices.static Ctmc_hitting_dist.Resultctmc_hitting_dist(Cosimla.Transition trans, double[] x0, Predicate<double[]> target, double[] t) Function mode with the default options.static Ctmc_hitting_dist.Resultctmc_hitting_dist(Cosimla.Transition trans, double[] x0, Predicate<double[]> target, double[] t, Ctmc_hitting_dist.Options options) Function mode.static Ctmc_hitting_dist.Resultctmc_hitting_dist(Matrix Q, int x0, boolean[] target, double[] t, Ctmc_hitting_dist.Options options) Generator mode, Matrix generator, mask target.static Ctmc_hitting_dist.Resultctmc_hitting_dist(Matrix Q, int x0, int[] target, double[] t) Generator mode with the default options.static Ctmc_hitting_dist.Resultctmc_hitting_dist(Matrix Q, int x0, int[] target, double[] t, Ctmc_hitting_dist.Options options) Generator mode, Matrix generator, index target.
-
Method Details
-
ctmc_hitting_dist
public static Ctmc_hitting_dist.Result ctmc_hitting_dist(Cosimla.Transition trans, double[] x0, Predicate<double[]> target, double[] t, Ctmc_hitting_dist.Options options) Function mode.- Parameters:
trans- transition function returning the successors of a state and their rates (successors equal to x and zero rates are ignored)x0- regeneration state, not in the target settarget- predicate true on the target set At- times at which the distribution is evaluatedoptions- options (null for the defaults); options.istrans is the change of measure- Returns:
- estimates and diagnostics
-
ctmc_hitting_dist
public static Ctmc_hitting_dist.Result ctmc_hitting_dist(Cosimla.Transition trans, double[] x0, Predicate<double[]> target, double[] t) Function mode with the default options. -
ctmc_hitting_dist
public static Ctmc_hitting_dist.Result ctmc_hitting_dist(double[][] Q, int x0, int[] target, double[] t, Ctmc_hitting_dist.Options options) Generator mode with the target given as 0-based row indices.- Parameters:
Q- generator; the successors of row x are its positive off-diagonal entries, in ascending column orderx0- 0-based regeneration row, not in the target settarget- 0-based row indices of the target set (non-empty)t- times at which the distribution is evaluatedoptions- options (null for the defaults); options.istransGenerator (or setIstrans(Matrix)) is the change of measure- Returns:
- estimates and diagnostics
-
ctmc_hitting_dist
public static Ctmc_hitting_dist.Result ctmc_hitting_dist(double[][] Q, int x0, boolean[] target, double[] t, Ctmc_hitting_dist.Options options) Generator mode with the target given as a boolean mask over the rows. -
ctmc_hitting_dist
public static Ctmc_hitting_dist.Result ctmc_hitting_dist(Matrix Q, int x0, int[] target, double[] t, Ctmc_hitting_dist.Options options) Generator mode, Matrix generator, index target. -
ctmc_hitting_dist
public static Ctmc_hitting_dist.Result ctmc_hitting_dist(Matrix Q, int x0, boolean[] target, double[] t, Ctmc_hitting_dist.Options options) Generator mode, Matrix generator, mask target. -
ctmc_hitting_dist
public static Ctmc_hitting_dist.Result ctmc_hitting_dist(double[][] Q, int x0, int[] target, double[] t) Generator mode with the default options. -
ctmc_hitting_dist
public static Ctmc_hitting_dist.Result ctmc_hitting_dist(Matrix Q, int x0, int[] target, double[] t) Generator mode with the default options.
-