LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
infer_nhpp_fit.h File Reference

Fitting a nonstationary Poisson process from ONE observed sequence of arrival times. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <string>
#include <vector>
#include "line/api/sim/sim_dist.h"
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for infer_nhpp_fit.h:

Go to the source code of this file.

Classes

struct  line::infer::NhppLeemisResult< T >
 Outcome of infer_nhpp_leemis. More...
struct  line::infer::NhppPowerLawResult< T >
 Outcome of infer_nhpp_powerlaw. More...

Namespaces

namespace  line
 Conservation laws of a layered queueing network, enumerated from its structure.
namespace  line::infer

Functions

template<class T>
NhppLeemisResult< T > line::infer::infer_nhpp_leemis (const std::vector< T > &times, const T &horizon, const std::vector< T > &tq=std::vector< T >(), double alpha=0.05)
 Nonparametric integrated-rate estimate of an NHPP from one sample path: the step-function estimator with its pointwise interval and the piecewise-linear estimator of Leemis (1991).
template<class T>
NhppPowerLawResult< T > line::infer::infer_nhpp_powerlaw (const std::vector< T > &times, const T &horizon, double alpha=0.05)
 Maximum likelihood power-law NHPP fit, Lambda(t) = (a t)^b, from one sample path, with observed-information Wald intervals.

Detailed Description

Fitting a nonstationary Poisson process from ONE observed sequence of arrival times.

Templated port of matlab/src/api/infer/infer_nhpp_leemis.m and infer_nhpp_powerlaw.m, cross-checked against jar/src/main/java/jline/api/infer/InferNhppFit.java.

TWO NONPARAMETRIC ESTIMATORS. The step-function estimator Lambdabar(t) counts the arrivals in (0,t]. It is unbiased for Lambda(t) and, a Poisson count having its mean as variance, carries the approximate pointwise interval Lambdabar(t) -/+ z sqrt(Lambdabar(t)), whose width grows with t: from one path the count by time t is the only information about Lambda(t), so the estimate is NOT consistent as T grows. For simulation the piecewise-linear estimator of Leemis (1991) interpolates it, Lambdahat(t) = iN/(N+1) + N(t-T_i)/((N+1)(T_{i+1}-T_i)), whose derivative is constant on each gap between arrivals: exactly an NHPP schedule (see lang::dist_fit_nhpp).

THE POWER LAW. Lambda(t) = (a t)^b has the closed-form maximum likelihood estimator b = N/(N ln T - sum ln T_i), a = N^(1/b)/T, and the inverse of the observed information matrix gives Wald intervals.

ARITHMETIC. sqrt, log and pow: transcendental only.

Reference: B. L. Nelson, L. M. Leemis (2020). The ease of fitting but futility of testing a nonstationary Poisson process from one sample path. Proc. Winter Simulation Conference, 266-276; L. M. Leemis (1991). Nonparametric estimation of the cumulative intensity function for a nonhomogeneous Poisson process. Management Science 37(7), 886-900.

Definition in file infer_nhpp_fit.h.