1function F = moment_joint_marking(f, p, dims)
2% F = moment_joint_marking(f, p, dims)
4% Joint factorial moments of the per-
class counts under multinomial marking.
6% If a count N
is marked independently, every
event receiving
class j with
7% probability p_j, then the per-
class counts (N_1,...,N_d) have joint factorial
10% E[prod_j (N_j)_(a_j)] = (prod_j p_j^(a_j)) * f_(|a|)
12% where f
is the factorial moment sequence of the aggregate count N and
13% |a| = a_1+...+a_d. This
is the counting-process counterpart of the marking
14% (
class-splitting) formulas of the M3A fitters, and it
is exact
for the
15% per-
class counts of a MAP marked in
this i.i.d. way, in particular
for an
16%
MMAP whose marking probabilities
do not depend on the phase.
19% f: vector of length n+1 holding the factorial moments f_0,...,f_n of the
21% p: vector of length d holding the marking probabilities
22% dims: vector of length d holding the maximum order per class. Their sum
23% must not exceed n, since an entry of multi-order a consumes the
24% aggregate moment of order |a|
27% F: array of size (dims(1)+1)x...x(dims(d)+1) holding the joint factorial
28% moments of the per-class counts
31% F = moment_joint_marking([1, 2, 4, 8], [0.3, 0.7], [1, 1]);
34% A. Heindl and A. van de Liefvoort. Moment conversions
for discrete
35% distributions. PMCCS, 2003.
42 line_error(mfilename,
'The vectors p and dims must have the same length.');
44if any(dv < 0) || any(dv ~= round(dv))
45 line_error(mfilename,
'The maximum orders must be nonnegative integers.');
47if sum(dv) > length(fcol)-1
48 line_error(mfilename,
'The aggregate factorial moments must reach order sum(dims).');
56 Fv(ia) = prod(pv .^ ord) * fcol(sum(ord)+1);
65F = reshape(Fv, [sz 1]);