public abstract class AbstractTimePredictor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
ABS_ERROR_THRESHOLD |
static double |
CONFIDENCE_INTERVAL
the confidence interval to be used for estimating bounds on the predicted remaining duration
|
static double |
ERROR_BOUND_PERCENT
Simulation is allowed to stop, when relative error is below this value
|
static int |
MAX_RUNS
If we wanted to restrict the number of simulated runs, we could do it here
|
Constructor and Description |
---|
AbstractTimePredictor() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addAllEnabledTransitions(org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> semantics,
java.util.ArrayList<org.processmining.framework.util.Pair<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition>> searchState) |
java.lang.Double |
computeRiskToMissTargetTime(StochasticNet model,
org.deckfour.xes.model.XTrace observedEvents,
java.util.Date currentTime,
java.util.Date targetTime,
org.processmining.models.semantics.petrinet.Marking initialMarking,
boolean useOnlyPastTrainingData)
Maximum likelihood estimate for the risk of missing a deadline until the end of the process.
|
protected static void |
executeTransition(org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> semantics,
org.processmining.models.graphbased.directed.petrinet.elements.Transition transition,
java.lang.Long time) |
protected double |
getConfidenceIntervalWidth(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics summaryStatistics,
double confidence) |
static org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> |
getCurrentState(StochasticNet model,
org.processmining.models.semantics.petrinet.Marking initialMarking,
org.deckfour.xes.model.XTrace observedEvents)
TODO: Maybe switch to alignment approach
|
static org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> |
getCurrentStateWithAlignment(StochasticNet model,
org.processmining.models.semantics.petrinet.Marking initialMarking,
org.deckfour.xes.model.XTrace observedEvents) |
protected double |
getError(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics stats) |
protected double |
getErrorPercent(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics stats) |
protected abstract org.apache.commons.math3.stat.descriptive.DescriptiveStatistics |
getPredictionStats(StochasticNet model,
org.deckfour.xes.model.XTrace observedEvents,
java.util.Date currentTime,
boolean useOnlyPastTrainingData,
org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> semantics)
Computes some stats by running a Monte Carlo simulation of the process.
|
org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> |
getSemantics(StochasticNet model,
org.deckfour.xes.model.XTrace observedEvents,
org.processmining.models.semantics.petrinet.Marking initialMarking) |
org.processmining.framework.util.Pair<java.lang.Double,java.lang.Double> |
predict(StochasticNet model,
org.deckfour.xes.model.XTrace observedEvents,
java.util.Date currentTime,
boolean useOnlyPastTrainingData,
org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> semantics) |
org.processmining.framework.util.Pair<java.lang.Double,java.lang.Double> |
predict(StochasticNet model,
org.deckfour.xes.model.XTrace observedEvents,
java.util.Date currentTime,
org.processmining.models.semantics.petrinet.Marking initialMarking) |
org.processmining.framework.util.Pair<java.lang.Double,java.lang.Double> |
predict(StochasticNet model,
org.deckfour.xes.model.XTrace observedEvents,
java.util.Date currentTime,
org.processmining.models.semantics.petrinet.Marking initialMarking,
boolean useOnlyPastTrainingData)
Does not care about final markings -> simulates net until no transitions are enabled any more...
|
public static final double CONFIDENCE_INTERVAL
public static final double ERROR_BOUND_PERCENT
public static final double ABS_ERROR_THRESHOLD
public static final int MAX_RUNS
public org.processmining.framework.util.Pair<java.lang.Double,java.lang.Double> predict(StochasticNet model, org.deckfour.xes.model.XTrace observedEvents, java.util.Date currentTime, org.processmining.models.semantics.petrinet.Marking initialMarking)
public org.processmining.framework.util.Pair<java.lang.Double,java.lang.Double> predict(StochasticNet model, org.deckfour.xes.model.XTrace observedEvents, java.util.Date currentTime, boolean useOnlyPastTrainingData, org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> semantics)
public org.processmining.framework.util.Pair<java.lang.Double,java.lang.Double> predict(StochasticNet model, org.deckfour.xes.model.XTrace observedEvents, java.util.Date currentTime, org.processmining.models.semantics.petrinet.Marking initialMarking, boolean useOnlyPastTrainingData)
{@link
- StochasticNet} model the model capturing the stochastic behavior of the netobservedEvents
- the monitored partial trace (complete, i.e., no visible transition missing)currentTime
- the time of prediction (can be later than the last event's time stamp)initialMarking
- initial marking of the netuseOnlyPastTrainingData
- indicator, whether the training data needs to be filtered with the current time as upper boundPair
of doubles (the point predictor, and the associated 99 percent confidence interval)public final org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> getSemantics(StochasticNet model, org.deckfour.xes.model.XTrace observedEvents, org.processmining.models.semantics.petrinet.Marking initialMarking)
public java.lang.Double computeRiskToMissTargetTime(StochasticNet model, org.deckfour.xes.model.XTrace observedEvents, java.util.Date currentTime, java.util.Date targetTime, org.processmining.models.semantics.petrinet.Marking initialMarking, boolean useOnlyPastTrainingData)
model
- StochasticNet capturing the stochastic behavior of the netobservedEvents
- the monitored partial trace (complete, i.e., no visible transition missing)currentTime
- the time of prediction (can be later than the last event's time stamp)targetTime
- the deadline with respect to which the risk is calculatedinitialMarking
- initial marking of the netuseOnlyPastTrainingData
- indicator, whether the training data needs to be filtered with the current time as upper boundprotected abstract org.apache.commons.math3.stat.descriptive.DescriptiveStatistics getPredictionStats(StochasticNet model, org.deckfour.xes.model.XTrace observedEvents, java.util.Date currentTime, boolean useOnlyPastTrainingData, org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> semantics)
model
- the model that is enriched by some training dataobservedEvents
- the current history of the trace (observed events so far)currentTime
- the current time at predictionuseOnlyPastTrainingData
- indicator that tells us whether to only rely on training data that was observed in the past (relative to the currentTime)semantics
- the semantics with the current marking of the model that shows the starting pointDescriptiveStatistics
gathered from a set of simulated continuations of the current processprotected double getConfidenceIntervalWidth(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics summaryStatistics, double confidence)
protected double getErrorPercent(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics stats)
protected double getError(org.apache.commons.math3.stat.descriptive.DescriptiveStatistics stats)
public static org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> getCurrentState(StochasticNet model, org.processmining.models.semantics.petrinet.Marking initialMarking, org.deckfour.xes.model.XTrace observedEvents)
model
- initialMarking
- observedEvents
- public static org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> getCurrentStateWithAlignment(StochasticNet model, org.processmining.models.semantics.petrinet.Marking initialMarking, org.deckfour.xes.model.XTrace observedEvents)
protected static void addAllEnabledTransitions(org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> semantics, java.util.ArrayList<org.processmining.framework.util.Pair<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition>> searchState)
protected static void executeTransition(org.processmining.models.semantics.Semantics<org.processmining.models.semantics.petrinet.Marking,org.processmining.models.graphbased.directed.petrinet.elements.Transition> semantics, org.processmining.models.graphbased.directed.petrinet.elements.Transition transition, java.lang.Long time) throws org.processmining.models.semantics.IllegalTransitionException
org.processmining.models.semantics.IllegalTransitionException