org.processmining.analysis.conformance
Class ConformanceLogReplayResult

java.lang.Object
  extended by org.processmining.framework.models.petrinet.algorithms.logReplay.AnalysisResult
      extended by org.processmining.framework.models.petrinet.algorithms.logReplay.LogReplayAnalysisResult
          extended by org.processmining.analysis.conformance.ConformanceLogReplayResult

public class ConformanceLogReplayResult
extends LogReplayAnalysisResult

Contains all the results obtained during log replay analysis. Can be used to retrieve values for the implemented metrics and to get diagnostic visualizations.

Author:
arozinat
See Also:
ConformanceMeasurer

Field Summary
 
Fields inherited from class org.processmining.framework.models.petrinet.algorithms.logReplay.LogReplayAnalysisResult
inputLogReader, inputPetriNet, performLogReplay, replayedLog, replayedPetriNet
 
Fields inherited from class org.processmining.framework.models.petrinet.algorithms.logReplay.AnalysisResult
myAnalysisOptions
 
Constructor Summary
ConformanceLogReplayResult(AnalysisConfiguration analysisOptions, PetriNet net, LogReader log, LogReplayAnalysisMethod method)
           Evaluate the given configuration options, that is, retrieves the choices made by the user and converts them into analysis option variables indicating which parts of the analysis needs to be done.
 
Method Summary
 void addFittingInstance(ReplayedLogTrace pi)
          Adds the given process instance to the set of perfectly fitting log traces.
 boolean calculateBehavioralAppropriateness()
          Indicates whether the "Behavioral Appropriateness" metric has been selected by the user.
 boolean calculateFitness()
          Indicates whether the "Fitness" metric has been selected by the user.
 boolean calculateImprovedBehavioralAppropriateness()
          Indicates whether the "Improved Behavioral Appropriateness" metric has been selected by the user.
 boolean calculateProperCompletetion()
          Indicates whether the "Proper Completion" metric has been selected by the user.
 boolean calculateSuccessfulExecution()
          Indicates whether the "Successful Execution" metric has been selected by the user.
 float getBehavioralAppropriatenessMeasure()
          Retrieves the behavioral appropriateness measure based on the mean number of enabled transitions during log replay.
 java.lang.String getCurrentVisualizationState()
          Get the current display state.
 float getFitnessMeasure()
          Retrieves the fitness measure based on the token based proper completion and the successful execution measures (weighted 50 per cent each).
 java.util.ArrayList<java.lang.String> getFittingLogTraces()
          Gets all fitting log traces from the log.
 float getFractionOfProperlyTerminated()
          Determine the fraction [0,1] of properly terminated process instances from those log traces specified in the list.
 float getFractionOfSuccessfullyExecuted()
          Determine the fraction [0,1] of successfully executed process instances from those log traces specified in the list.
 DiagnosticLogEventRelation getLogEventRelations()
          Retrieves the global log event relations gathered during log replay.
 float getProperCompletionTokenMeasure()
          Retrieves the proper completion measure based on remaining tokens (i.e., amount of remaining / amount of produced) during log replay.
 float getSuccessfulExecutionTokenMeasure()
          Retrieves the successful execution measure based on missing tokens (i.e., amount of missing / amount of consumed) during log replay.
 att.grappa.GrappaPanel getVisualization(DisplayState currentVisualization)
          Creates a visualization of the conformance check results.
protected  void initDiagnosticDataStructures()
          Initializes the diagnostic data structures needed to store the measurements taken during the log replay analysis.
 void updateConsumedTokens(int consumed)
          Adds up the given consumed tokens to the global measurement.
 void updateMeanOfEnabledTransitions(float mean, int similarInst)
          Updates the mean number of enabled transitions measurement for the given log trace according to the number of similar instances.
 void updateNumberOfProcessInstances(int value)
          TODO: check whether can be obtained from the log directly Adds up the total number of process instances.
 void updateProducedTokens(int produced)
          Adds up the given produced tokens to the global measurement.
 void updateProperlyCompletedInstances(int value)
          Adds up the global "properly-completed" measurement by the given value.
 void updateSuccessfullyExecutedInstances(int value)
          Adds up the global "successfully-executed" measurement by the given value.
 
Methods inherited from class org.processmining.framework.models.petrinet.algorithms.logReplay.LogReplayAnalysisResult
performLogReplay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConformanceLogReplayResult

public ConformanceLogReplayResult(AnalysisConfiguration analysisOptions,
                                  PetriNet net,
                                  LogReader log,
                                  LogReplayAnalysisMethod method)
Evaluate the given configuration options, that is, retrieves the choices made by the user and converts them into analysis option variables indicating which parts of the analysis needs to be done.

Method Detail

initDiagnosticDataStructures

protected void initDiagnosticDataStructures()
Description copied from class: LogReplayAnalysisResult
Initializes the diagnostic data structures needed to store the measurements taken during the log replay analysis. To be overridden by subclasses as soon as they define custom data structures.

Overrides:
initDiagnosticDataStructures in class LogReplayAnalysisResult

calculateBehavioralAppropriateness

public boolean calculateBehavioralAppropriateness()
Indicates whether the "Behavioral Appropriateness" metric has been selected by the user.

Returns:
true if this option has been chosen, false otherwise

calculateImprovedBehavioralAppropriateness

public boolean calculateImprovedBehavioralAppropriateness()
Indicates whether the "Improved Behavioral Appropriateness" metric has been selected by the user.

Returns:
true if this option has been chosen, false otherwise

calculateFitness

public boolean calculateFitness()
Indicates whether the "Fitness" metric has been selected by the user.


calculateSuccessfulExecution

public boolean calculateSuccessfulExecution()
Indicates whether the "Successful Execution" metric has been selected by the user.


calculateProperCompletetion

public boolean calculateProperCompletetion()
Indicates whether the "Proper Completion" metric has been selected by the user.


getFractionOfProperlyTerminated

public float getFractionOfProperlyTerminated()
Determine the fraction [0,1] of properly terminated process instances from those log traces specified in the list. Note that the number of process instances represented by each dignostic log trace is taken into account, and every log trace is treated as a whole. That means that there is no possibiltiy to retrieve this measure for only a fraction of similar instances for a certain logical trace.

Returns:
The fraction of properly terminated process instances

getFractionOfSuccessfullyExecuted

public float getFractionOfSuccessfullyExecuted()
Determine the fraction [0,1] of successfully executed process instances from those log traces specified in the list. Note that the number of process instances represented by each dignostic log trace is taken into account, and every log trace is treated as a whole. That means that there is no possibiltiy to retrieve this measure for only a fraction of similar instances for a certain logical trace.

Parameters:
piList - The list of specified log traces.
Returns:
The fraction of successfully executed process instances.

getSuccessfulExecutionTokenMeasure

public float getSuccessfulExecutionTokenMeasure()
Retrieves the successful execution measure based on missing tokens (i.e., amount of missing / amount of consumed) during log replay.

Returns:
The measure for the selected traces.

getProperCompletionTokenMeasure

public float getProperCompletionTokenMeasure()
Retrieves the proper completion measure based on remaining tokens (i.e., amount of remaining / amount of produced) during log replay.

Returns:
The measure for the selected traces.

getFitnessMeasure

public float getFitnessMeasure()
Retrieves the fitness measure based on the token based proper completion and the successful execution measures (weighted 50 per cent each).

Returns:
The measure for the selected traces.

getBehavioralAppropriatenessMeasure

public float getBehavioralAppropriatenessMeasure()
                                          throws java.lang.Exception
Retrieves the behavioral appropriateness measure based on the mean number of enabled transitions during log replay.

Parameters:
piList - The list of diagnostic log traces.
Returns:
The measure for the selected traces (0 <= value <= 1).
Throws:
java.lang.Exception - In the case that the entry for one of the traces is missing.

getFittingLogTraces

public java.util.ArrayList<java.lang.String> getFittingLogTraces()
Gets all fitting log traces from the log.

Returns:
A list of trace IDs referencing the fitting instances in the log.

getLogEventRelations

public DiagnosticLogEventRelation getLogEventRelations()
Retrieves the global log event relations gathered during log replay.

Returns:
the log event relations for the log

addFittingInstance

public void addFittingInstance(ReplayedLogTrace pi)
Adds the given process instance to the set of perfectly fitting log traces.

Parameters:
pi - the fitting log trace to be added

updateNumberOfProcessInstances

public void updateNumberOfProcessInstances(int value)
TODO: check whether can be obtained from the log directly Adds up the total number of process instances.

Parameters:
corresponds - to the number of similar instances for the updated trace

updateProperlyCompletedInstances

public void updateProperlyCompletedInstances(int value)
Adds up the global "properly-completed" measurement by the given value.

Parameters:
corresponds - to the number of similar instances for the updated trace

updateSuccessfullyExecutedInstances

public void updateSuccessfullyExecutedInstances(int value)
Adds up the global "successfully-executed" measurement by the given value.

Parameters:
corresponds - to the number of similar instances for the updated trace

updateConsumedTokens

public void updateConsumedTokens(int consumed)
Adds up the given consumed tokens to the global measurement.

Parameters:
consumed - the tokens that were consumed for the trace

updateProducedTokens

public void updateProducedTokens(int produced)
Adds up the given produced tokens to the global measurement.

Parameters:
produced - the tokens that were consumed for the trace

updateMeanOfEnabledTransitions

public void updateMeanOfEnabledTransitions(float mean,
                                           int similarInst)
Updates the mean number of enabled transitions measurement for the given log trace according to the number of similar instances.

Parameters:
the - mean number of enabled transitions during replay for the log trace
the - number of similar process instances (control-flow perspective)

getCurrentVisualizationState

public java.lang.String getCurrentVisualizationState()
Get the current display state.

Returns:
The current display state.

getVisualization

public att.grappa.GrappaPanel getVisualization(DisplayState currentVisualization)
Creates a visualization of the conformance check results. Note that a change of the display state by the user will have no effect before calling this methods. This is intended to prevent unnecessary cloning of the diagnostic petri net, which actually delivers the custom visualization of the conformance analysis results.

Parameters:
selectedInstances - The process instances that have been selected for updating the visualization.
currentVisualization - The current display state.
Returns:
The visualization wrapped in a GrappaPanel.