Class InferLqn

java.lang.Object
jline.api.infer.InferLqn

public class InferLqn extends Object
LQN parameter identification via an Extended Kalman Filter.

Estimates hidden Layered Queueing Network parameters (activity host demands, task think times) from measured performance data (response times, utilizations, throughputs), following Zheng, Yang, Woodside, Litoiu, Iszlai, "Tracking Time-Varying Parameters in Software Systems with Extended Kalman Filters", CASCON 2005 (equations 1-9). The parameter is modelled as a zero-mean random walk a_k = a_{k-1} + w and the measurement as z_k = h(a_k)+v, where h is the LQN performance model. This is the JAR counterpart of the MATLAB infer_lqn family and the native-Python line_solver.inference.infer_lqn; results match across codebases.

Copyright (c) 2012-2026, Imperial College London. All rights reserved.
  • Method Details

    • setParams

      public static void setParams(LayeredNetwork model, List<ParamSpec> paramSpec, Matrix a)
      Apply a parameter vector to a LayeredNetwork in place.
      Parameters:
      model - the LQN whose parameters are set
      paramSpec - list of parameters to set
      a - (np x 1) parameter vector
    • getParams

      public static Matrix getParams(LayeredNetwork model, List<ParamSpec> paramSpec)
      Read the current values of the parameters named in paramSpec.
    • getObs

      public static Matrix getObs(LayeredNetworkAvgTable table, List<ObsSpec> obsSpec)
      Extract the observation vector selected by obsSpec from a solved table.
    • jacobian

      public static InferLqn.JacobianResult jacobian(Function<Matrix,Matrix> hfun, Matrix a, double fdStep, double fdFloor)
      Forward finite-difference sensitivity matrix of h at a.

      Column i is (h(a + d_i) - h0)/d_i with d_i = fdStep*max(|a_i|, fdFloor). hfun is evaluated np+1 times. This is the approximate sensitivity matrix H_k used in the EKF update.

    • ekf

      public static InferLqnResult ekf(Function<Matrix,Matrix> hfun, Matrix a0, Matrix P0, Matrix Z, Matrix Q, Matrix R, InferLqnOptions opt)
      Extended Kalman Filter tracking a hidden parameter vector across Z.
      Parameters:
      hfun - maps a parameter vector to a predicted observation z = h(a)
      a0 - (np x 1) initial estimate
      P0 - (np x np) initial covariance
      Z - (no x nsteps) measurement matrix, one column per step
      Q - (np x np) drift covariance
      R - (no x no) measurement covariance
      opt - options (fdStep, fdFloor, clampPositive, aTrue, verbose)
    • inferLqn

      public static InferLqnResult inferLqn(LayeredNetwork model, List<ParamSpec> paramSpec, List<ObsSpec> obsSpec, Matrix Z, InferLqnOptions opt)
      Identify hidden LQN parameters from measured performance data.

      Estimates the parameters named in paramSpec (activity host demands and/or task think times) of the LayeredNetwork model from the measurement sequence Z (no x nsteps) using an EKF over the observation model defined by obsSpec. A single measurement column with opt.QFac = 0 reduces to one-shot least-squares calibration. On return the model has the final estimate applied.