Class AbstractLogRelations
- java.lang.Object
-
- org.processmining.plugins.log.logabstraction.abstracts.AbstractLogRelations
-
- All Implemented Interfaces:
EventRelations<org.deckfour.xes.model.XLog>,LogRelations
- Direct Known Subclasses:
AlphaLogRelationsImpl,HeuristicsLogRelationsImpl
public abstract class AbstractLogRelations extends java.lang.Object implements LogRelations
-
-
Field Summary
Fields Modifier and Type Field Description protected int[][]absoluteDirectlyFollowsMatrixprotected int[][]absoluteLengthTwoLoopMatrixprotected double[][]causalMatrixprotected org.deckfour.xes.classification.XEventClassesclassesprotected java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.util.Set<org.deckfour.xes.model.XTrace>>dfrTraceMapprotected int[]endsprotected java.util.List<org.deckfour.xes.classification.XEventClass>eventClassesprotected org.deckfour.xes.model.XLoglogprotected org.processmining.framework.plugin.Progressprogressprotected int[]startsprotected org.deckfour.xes.info.XLogInfosummary
-
Constructor Summary
Constructors Constructor Description AbstractLogRelations(org.deckfour.xes.model.XLog log)AbstractLogRelations(org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary)AbstractLogRelations(org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary, org.processmining.framework.plugin.Progress progress)AbstractLogRelations(org.deckfour.xes.model.XLog log, org.processmining.framework.plugin.Progress progress)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.processmining.framework.util.Pair<java.util.List<org.deckfour.xes.classification.XEventClass>,int[][]>absoluteDirectlyFollowsMatrix()Returns a matrix with absolute dfr-frequencies.protected abstract voidcalculateLogRelations()protected abstract voidcalculateMetrics()java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Double>causalDependencies()Returns a map from pairs of event classes to double, such that if a pair (x,y) of two event classes x and y are in the map, the double value attached to this pair indicated the strength of a causal dependency from x to y.org.processmining.framework.util.Pair<java.util.List<org.deckfour.xes.classification.XEventClass>,double[][]>causalMatrix()Returns a causal matrix with some causal measure.protected abstract voidexpandProgress()Add to the progress, the additional cost of computation generated by calculate metrics.protected voidfillDirectSuccessionMatrices()Makes dfrPairs succession relations, as well as two-loop relations, i.e.java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Double>getCausalDependencies()Deprecated.java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.util.Set<org.deckfour.xes.model.XTrace>>getCountDirect()java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Integer>getDirectFollowsDependencies()Returns a map from pairs of event classes to integers, such that if a pair (x,y) of two event classes x and y are in the map, and the integer value attached to this pair is greater than 0, then a dfrPairs follows dependency from x to y exists.java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer>getEndEvents()Tells for each event class how often it appears at the endEvents of a trace in the log, if any, i.e.java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer>getEndTraceInfo()Deprecated.org.deckfour.xes.classification.XEventClassesgetEventClasses()Deprecated.java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer>getLengthOneLoops()Returns a map from self-loop event classes to integers.java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Integer>getLengthTwoLoops()Deprecated.org.deckfour.xes.model.XLoggetLog()Deprecated.org.deckfour.xes.model.XLoggetSource()java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer>getStartEvents()Tells for each event class how often it appears at the startEvents of a trace in the log, if any, i.e.java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer>getStartTraceInfo()Tells for each event class how often it appears at the startEvents of a trace in the log, if any, i.e.org.deckfour.xes.info.XLogInfogetSummary()Returns the summary of the log, corresponding to the getEventClasses methodprotected voidincreaseProgress()java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Double>lengthOneLoops()Returns a map from self-loop event classes to doubles.java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Double>lengthTwoLoops()Returns a map from pairs of event classes to doubles for which it is known that they are in length-two loop situations.protected org.deckfour.xes.classification.XEventClass[]setupEventClasses()protected voidstorePair(int fromIndex, int toIndex, org.deckfour.xes.model.XTrace trace)protected booleantraceContainsLengthTwoConstruct(org.deckfour.xes.model.XTrace trace, int fromIndex, org.deckfour.xes.classification.XEventClass from, org.deckfour.xes.classification.XEventClass to)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.processmining.plugins.log.logabstraction.EventRelations
getParallelRelations
-
-
-
-
Field Detail
-
log
protected final org.deckfour.xes.model.XLog log
-
summary
protected final org.deckfour.xes.info.XLogInfo summary
-
classes
protected final org.deckfour.xes.classification.XEventClasses classes
-
eventClasses
protected final java.util.List<org.deckfour.xes.classification.XEventClass> eventClasses
-
absoluteDirectlyFollowsMatrix
protected final int[][] absoluteDirectlyFollowsMatrix
-
absoluteLengthTwoLoopMatrix
protected final int[][] absoluteLengthTwoLoopMatrix
-
starts
protected final int[] starts
-
ends
protected final int[] ends
-
causalMatrix
protected final double[][] causalMatrix
-
dfrTraceMap
protected final java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.util.Set<org.deckfour.xes.model.XTrace>> dfrTraceMap
-
progress
protected org.processmining.framework.plugin.Progress progress
-
-
Constructor Detail
-
AbstractLogRelations
public AbstractLogRelations(org.deckfour.xes.model.XLog log)
-
AbstractLogRelations
public AbstractLogRelations(org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary)
-
AbstractLogRelations
public AbstractLogRelations(org.deckfour.xes.model.XLog log, org.processmining.framework.plugin.Progress progress)
-
AbstractLogRelations
public AbstractLogRelations(org.deckfour.xes.model.XLog log, org.deckfour.xes.info.XLogInfo summary, org.processmining.framework.plugin.Progress progress)
-
-
Method Detail
-
setupEventClasses
protected org.deckfour.xes.classification.XEventClass[] setupEventClasses()
-
calculateLogRelations
protected abstract void calculateLogRelations()
-
expandProgress
protected abstract void expandProgress()
Add to the progress, the additional cost of computation generated by calculate metrics.
-
calculateMetrics
protected abstract void calculateMetrics()
-
fillDirectSuccessionMatrices
protected void fillDirectSuccessionMatrices()
Makes dfrPairs succession relations, as well as two-loop relations, i.e. searches through the log for AB patterns and ABA patterns
-
increaseProgress
protected final void increaseProgress()
-
traceContainsLengthTwoConstruct
protected boolean traceContainsLengthTwoConstruct(org.deckfour.xes.model.XTrace trace, int fromIndex, org.deckfour.xes.classification.XEventClass from, org.deckfour.xes.classification.XEventClass to)
-
storePair
protected void storePair(int fromIndex, int toIndex, org.deckfour.xes.model.XTrace trace)
-
absoluteDirectlyFollowsMatrix
public org.processmining.framework.util.Pair<java.util.List<org.deckfour.xes.classification.XEventClass>,int[][]> absoluteDirectlyFollowsMatrix()
Description copied from interface:EventRelationsReturns a matrix with absolute dfr-frequencies. The first element of the pair is a List of XEventClasses. The index in the list corresponds to the index in the matrix. The matrix should be read as int[fromIndices][toIndices]- Specified by:
absoluteDirectlyFollowsMatrixin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- pair of eventclass mappings and absolute dfr value-matrix
-
getEndTraceInfo
@Deprecated public java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer> getEndTraceInfo()
Deprecated.Description copied from interface:LogRelationsTells for each event class how often it appears at the endEvents of a trace in the log, if any, i.e. the returned integer is always greater than 0.- Specified by:
getEndTraceInfoin interfaceLogRelations- Returns:
- the number of times each event class appears at the endEvents of a trace.
-
getEventClasses
@Deprecated public org.deckfour.xes.classification.XEventClasses getEventClasses()
Deprecated.Description copied from interface:EventRelationsReturns the event classes defined in the log and used in the relations- Specified by:
getEventClassesin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- event classes;
-
getLengthTwoLoops
@Deprecated public java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Integer> getLengthTwoLoops()
Deprecated.Description copied from interface:EventRelationsReturns a map from pairs of event classes to integers for which it is known that they are in length-two loop situations.- Specified by:
getLengthTwoLoopsin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- a map from pairs of event classes to integers
-
lengthTwoLoops
public java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Double> lengthTwoLoops()
Description copied from interface:EventRelationsReturns a map from pairs of event classes to doubles for which it is known that they are in length-two loop situations.- Specified by:
lengthTwoLoopsin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- a map from pairs of event classes to doubles
-
getLog
@Deprecated public org.deckfour.xes.model.XLog getLog()
Deprecated.Description copied from interface:LogRelationsReturns the log on which these abstractions are based.- Specified by:
getLogin interfaceLogRelations- Returns:
- the log on which these abstractions are based.
-
getStartTraceInfo
public java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer> getStartTraceInfo()
Description copied from interface:LogRelationsTells for each event class how often it appears at the startEvents of a trace in the log, if any, i.e. the returned integer is always greater than 0.- Specified by:
getStartTraceInfoin interfaceLogRelations- Returns:
- the number of times each event class appears at the startEvents of a trace.
-
getSummary
public org.deckfour.xes.info.XLogInfo getSummary()
Description copied from interface:LogRelationsReturns the summary of the log, corresponding to the getEventClasses method- Specified by:
getSummaryin interfaceLogRelations- Returns:
- the summary
-
getDirectFollowsDependencies
public java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Integer> getDirectFollowsDependencies()
Description copied from interface:EventRelationsReturns a map from pairs of event classes to integers, such that if a pair (x,y) of two event classes x and y are in the map, and the integer value attached to this pair is greater than 0, then a dfrPairs follows dependency from x to y exists. The integer value indicates how often the first event is directly followed by the second event.- Specified by:
getDirectFollowsDependenciesin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- a map from pairs of event classes to integers
-
getCountDirect
public java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.util.Set<org.deckfour.xes.model.XTrace>> getCountDirect()
- Specified by:
getCountDirectin interfaceLogRelations
-
getCausalDependencies
@Deprecated public java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Double> getCausalDependencies()
Deprecated.Description copied from interface:EventRelationsReturns a map from pairs of event classes to double, such that if a pair (x,y) of two event classes x and y are in the map, and the double value attached to this pair is greater than 0, then a causal dependency from x to y exists. The double value indicates the strength of the causal dependency and should be between 0 and 1 (inclusive).- Specified by:
getCausalDependenciesin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- a map from pairs of event classes to doubles
-
causalDependencies
public java.util.Map<org.processmining.framework.util.Pair<org.deckfour.xes.classification.XEventClass,org.deckfour.xes.classification.XEventClass>,java.lang.Double> causalDependencies()
Description copied from interface:LogRelationsReturns a map from pairs of event classes to double, such that if a pair (x,y) of two event classes x and y are in the map, the double value attached to this pair indicated the strength of a causal dependency from x to y. The range and meaning of the value depends on the implementing class!- Specified by:
causalDependenciesin interfaceLogRelations- Returns:
- a map from pairs of event classes to doubles
-
getLengthOneLoops
public java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer> getLengthOneLoops()
Description copied from interface:EventRelationsReturns a map from self-loop event classes to integers.- Specified by:
getLengthOneLoopsin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- a map from self-loop event classes to integers.
-
lengthOneLoops
public java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Double> lengthOneLoops()
Description copied from interface:EventRelationsReturns a map from self-loop event classes to doubles.- Specified by:
lengthOneLoopsin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- a map from self-loop event classes to doubles.
-
causalMatrix
public org.processmining.framework.util.Pair<java.util.List<org.deckfour.xes.classification.XEventClass>,double[][]> causalMatrix()
Description copied from interface:EventRelationsReturns a causal matrix with some causal measure. The first element of the pair is a List of XEvent The first element of the pair is a List of XEventClasses. The index in the list corresponds to the index in the matrix.- Specified by:
causalMatrixin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- a causal matrix
-
getSource
public org.deckfour.xes.model.XLog getSource()
- Specified by:
getSourcein interfaceEventRelations<org.deckfour.xes.model.XLog>
-
getStartEvents
public java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer> getStartEvents()
Description copied from interface:EventRelationsTells for each event class how often it appears at the startEvents of a trace in the log, if any, i.e. the returned integer is always greater than 0.- Specified by:
getStartEventsin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- the number of times each event class appears at the startEvents of a trace.
-
getEndEvents
public java.util.Map<org.deckfour.xes.classification.XEventClass,java.lang.Integer> getEndEvents()
Description copied from interface:EventRelationsTells for each event class how often it appears at the endEvents of a trace in the log, if any, i.e. the returned integer is always greater than 0.- Specified by:
getEndEventsin interfaceEventRelations<org.deckfour.xes.model.XLog>- Returns:
- the number of times each event class appears at the endEvents of a trace.
-
-