Class ESMiner

    • Method Detail

      • mineGraph

        protected abstract void mineGraph()
      • findVerticesOfType

        protected HashSet<InstanceVertex> findVerticesOfType​(EventType eventType,
                                                             boolean isNonLeaf)
        Find vertices (instances) of a particular event type in the event sequence graph Also available is the non-leaf flag, where it is set to true, it finds non-leaf vertices of type eventType
        Parameters:
        eventType - - event type whose instances are to be found
        isNonLeaf - - non-leaf flag, when true instances are non-leaf, when false all instances are returned
        Returns:
        - a set of instance vertices of type eventType
      • calculatePI

        protected double calculatePI​(EventSequence eSq,
                                     ArrayList<HashSet<String>> iSqIdList)
        This method calculates the prevalence index (PI) of a given EventSequence object using the @eventCounts (from this class) and a list (of set) of instance sequence identifiers (passed as parameter using iSqIdList). iSqIdList has the list of sets of unique instance identifiers per each EventType in the given EventSequence object (eSq).
        Parameters:
        eSq - - given event sequence object (to calculate the pi)
        iSqIdList - - list of set of unique id's, indexed on the location of event type in eSq
        Returns:
        - prevalence index value (min of all participation ratios) of eSq
      • createIdList

        protected ArrayList<HashSet<String>> createIdList​(Set<InstanceSequence> instanceSequences,
                                                          EventSequence eventSequence)
        Given an event sequence and its instance sequences, this method creates a complex identifier list of unique identifier sets. The participating instances of each event type in the event sequence is returned as a set of strings (that stores unique ids for each event type)
        Parameters:
        instanceSequences - - set of instance sequences of type event sequence
        eventSequence - - the event sequence whose instances are to be inspected
        Returns:
        - arraylist of set of unique identifiers (of participating instances) in order
      • createSuccessorMap

        public Map<EventSequence,​Set<InstanceSequence>> createSuccessorMap​(EventSequence parentEventSequence,
                                                                                 Set<InstanceSequence> parentInstanceSequences)
        Using the event sequence graph, create a complex successors map that stores EventSequence->Set mappings, which are identified using the parentEventSequence, and the instance sequences of parentEventSequence (that is parentInstanceSequences). In other words, from the instance sequences of a particular event sequence, this method finds the instance sequences of child event sequences (found by extending the parent event sequence)
        Parameters:
        parentEventSequence - - the event sequence to be extended
        parentInstanceSequences - - the instance sequences of the given parent event sequence
        Returns:
        the map of child event sequences to its instance sequences
      • createInstanceSequencesFromVertices

        protected Set<InstanceSequence> createInstanceSequencesFromVertices​(Set<InstanceVertex> instanceVertices)
        This method converts a set of instance vertices (stored in instanceVertices) to a set of length-1 instance sequences. For each instance vertex, a new instance sequence of length-1 is created.
        Parameters:
        instanceVertices - - to be converted instance sequences
        Returns:
        a set of instance sequences (of length-1)