EM {RM2} | R Documentation |
Unconstrain the demand using the Expectation-Maximization algorithm
Description
EM
unconstrains demand data in quantity-based revenue management.
Usage
EM(demand = demand, eps = 0.005)
Arguments
demand |
demand vector with constrained and unconstrained entries. A 0 in the name of an entry means that the corresponding demand is unconstrained. Conversely, a 1 in the name of an entry suggests that the corresponding demand is constrained. |
eps |
small number used as the stopping criterion. The default value is 0.005. |
Details
EM
unconstrains demand data in quantity-based revenue management. The observed demand entries, some of which are constrained because the product class was closed, are assumed to be realizations from an underlying normal distribution with mean \mu
and standard deviation \sigma
. The objective is to find the parameters \mu
and \sigma
of this underlying demand distribution.
Value
param |
parameters of demand distribution |
niter |
number of iterations |
demand |
unconstrained demand vector |
history |
parameter convergence history |
Author(s)
Tudor Bodea tudor.bodea@ihg.com
Dev Koushik dev.koushik@ihg.com
Mark Ferguson mark.ferguson@mgt.gatech.edu
References
Talluri, K. T. and Van Ryzin, G. (2004) The Theory and Practice of Revenue Management. New York, NY: Springer Science + Business Media, Inc. (Pages 474–477).
Examples
# SPECIFY THE SEED
set.seed(333)
# SPECIFY REAL PARAMETERS OF THE DEMAND DISTRIBUTION
rmean <- 20
rsd <- 4
nrn <- 20
# GENERATE REAL DEMAND
rdemand <- round(rnorm(nrn, rmean, rsd))
# GENERATE BOOKING LIMITS
bl <- round(rnorm(nrn, rmean, rsd))
# GENERATE OBSERVED DEMAND
demand <- rdemand * (rdemand <= bl) + bl * (rdemand > bl)
# IDENTIFIED PERIODS WITH CONSTRAINED DEMAND: 1 - CONSTRAINED DEMAND
names(demand) <- as.character(as.numeric(rdemand>bl))
demand
# UNTRUNCATE DEMAND
EM(demand)
EM(demand, eps=0.005)
EM(demand, eps=0.00005)
# MODIFY DEMAND VECTOR - NO CONSTRAINED INSTANCES ARE OBSERVED
names(demand) <- rep(0, length(demand))
# ATTEMPT TO UNTRUNCATE THE DEMAND
EM(demand, eps=0.005)