Partial Order Miner.
---------------------------------

This unix binary can be used to mine frequent partial orders from a given data stream.
Refer to the paper for the working of the algorithm and the description of terminology and
parameters.


USAGE : ./n-graph-miner <datastream> <frequency threshold> <entropy threshold> <expiry time> <freq episodes output>

Description of the datastream : 

The stream of events to be mined is given as input to the 'n-graph-miner' as a text file with the following format:

  1. The event types are integer coded. Starting from 1 to maximum number of participating events.
  2. Each line in the text file represents the occurrence of an event. The format for a line is
     <event type>,<time of occurrence of event>
  3. All the event occurrences in the input file should be ordered with respect to time. 
  4. For example: Consider a event stream with 5 different event types. A sample stream will be of the following form
     
     1,0.003
     2,0.005
     4,0.010
     3,0.010
     1,0.015
     5,0.020
    
     Here, the time information is in seconds. Note that the 'exe' handles time with millisecond precision. Suitable 
     pre-processing is required for data that have different precision level.

Description of the output file containing frequent episodes:

  The frequent episodes obtained at different levels of mining are dumped in a file (given as the fifth parameter to the exe).
  (A sample file 'freqepisodes' is provided)

  Any line in the episodes output file looks like this:

  6 11 12 13 14 16 .  : 353 : 0.492783  :. 11>12,11>13,11>14,12>14,

  Here, [6 11 12 13 14 16] represents the set of events of the partial order.
  [11>12, 11>13, 11>14, 12>14] represents the partial order on the set of these events. This set of edges is transitively closed. 
  Together the above 2 sets determine the partial order. 
  '353', and '0.492783' represents the frequency count and bi-directional evidence respectively.


Parameters to be used:

Algorithm parameters like frequecy threshold, entropy threshold and expiry time are passed as command line arguments to the exe.
Other parameters are set in a text file : 'inputfile'

The input file looks like this:

_________________________________________

maxLengthSize: 10 
numMaxPaths: 1000
maxEvents: 400
maxSize: 10
episodeType: general
________________________________________

1. maxLengthSize and numMaxPaths represents 'L_max' and 'N_max' respectively.
2. maxEvents represents the maximum integer coded event type. If all integers from 1 to maxEvents are used then it represent 
   the total number of participation events.
3. maxSize represents the maximum level of mining required. If maxSize = 6, the algorithm returns frequent episodes upto size 6.
4. episodeType: This can take values [serial|parallel|general]. These represent the type of patterns that we are looking for.

-----------------------------------------------------------------------------------------------------------------------------------

Contact : Raajay (raajay.v@gmail.com) for further details, if needed.
