Class AbstractLogRelations

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int[][] absoluteDirectlyFollowsMatrix  
      protected int[][] absoluteLengthTwoLoopMatrix  
      protected double[][] causalMatrix  
      protected org.deckfour.xes.classification.XEventClasses classes  
      protected 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  
      protected int[] ends  
      protected java.util.List<org.deckfour.xes.classification.XEventClass> eventClasses  
      protected org.deckfour.xes.model.XLog log  
      protected org.processmining.framework.plugin.Progress progress  
      protected int[] starts  
      protected org.deckfour.xes.info.XLogInfo summary  
    • 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 void calculateLogRelations()  
      protected abstract void calculateMetrics()  
      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 void expandProgress()
      Add to the progress, the additional cost of computation generated by calculate metrics.
      protected void fillDirectSuccessionMatrices()
      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.XEventClasses getEventClasses()
      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.XLog getLog()
      Deprecated.
      org.deckfour.xes.model.XLog getSource()  
      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.XLogInfo getSummary()
      Returns the summary of the log, corresponding to the getEventClasses method
      protected void increaseProgress()  
      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 void storePair​(int fromIndex, int toIndex, org.deckfour.xes.model.XTrace trace)  
      protected boolean traceContainsLengthTwoConstruct​(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
    • 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: EventRelations
        Returns 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:
        absoluteDirectlyFollowsMatrix in interface EventRelations<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: LogRelations
        Tells 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:
        getEndTraceInfo in interface LogRelations
        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: EventRelations
        Returns the event classes defined in the log and used in the relations
        Specified by:
        getEventClasses in interface EventRelations<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: EventRelations
        Returns a map from pairs of event classes to integers for which it is known that they are in length-two loop situations.
        Specified by:
        getLengthTwoLoops in interface EventRelations<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: EventRelations
        Returns a map from pairs of event classes to doubles for which it is known that they are in length-two loop situations.
        Specified by:
        lengthTwoLoops in interface EventRelations<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: LogRelations
        Returns the log on which these abstractions are based.
        Specified by:
        getLog in interface LogRelations
        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: LogRelations
        Tells 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:
        getStartTraceInfo in interface LogRelations
        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: LogRelations
        Returns the summary of the log, corresponding to the getEventClasses method
        Specified by:
        getSummary in interface LogRelations
        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: EventRelations
        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.

        The integer value indicates how often the first event is directly followed by the second event.

        Specified by:
        getDirectFollowsDependencies in interface EventRelations<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:
        getCountDirect in interface LogRelations
      • 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: EventRelations
        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, 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:
        getCausalDependencies in interface EventRelations<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: LogRelations
        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. The range and meaning of the value depends on the implementing class!
        Specified by:
        causalDependencies in interface LogRelations
        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: EventRelations
        Returns a map from self-loop event classes to integers.
        Specified by:
        getLengthOneLoops in interface EventRelations<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: EventRelations
        Returns a map from self-loop event classes to doubles.
        Specified by:
        lengthOneLoops in interface EventRelations<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: EventRelations
        Returns 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:
        causalMatrix in interface EventRelations<org.deckfour.xes.model.XLog>
        Returns:
        a causal matrix
      • getSource

        public org.deckfour.xes.model.XLog getSource()
        Specified by:
        getSource in interface EventRelations<org.deckfour.xes.model.XLog>
      • getStartEvents

        public java.util.Map<org.deckfour.xes.classification.XEventClass,​java.lang.Integer> getStartEvents()
        Description copied from interface: EventRelations
        Tells 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:
        getStartEvents in interface EventRelations<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: EventRelations
        Tells 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:
        getEndEvents in interface EventRelations<org.deckfour.xes.model.XLog>
        Returns:
        the number of times each event class appears at the endEvents of a trace.