The rar bundle contains the jar of SUMATRA+TRECI and an example dataset.

To run the system:

1) Create an instance of a  mysql database, in order to store the network structure (nodes and edges) input by the system and create the schema of trend cluster tables output by the system (e.g. SCRIPTDB.sql, ndbcNode.sql, ndbcEdge.sql).

2) If the interpolation ability must be evaluated by dividing the network in training set (used for summarization) and testing set  (used for interpolation), sensors of the network to be used to create the testing sets must be made inactive (e.g. ndbc_5:10.sql  divides the network, in order to consider 50% of training nodes  for the summarization goal  (active nodes) and 50% of testing nodes for the interpolation goal (inactive nodes)).

3) Use  ndbcTRECI.bat after modifying CPndbc_atmp.xml in the directory config by setting appropriately the requested information.  For example, 
OutputStorageInDB: ON (discovered trend clusters are stored in the database), OFF 
sampling: NONE (no sampling, all node are used in the interpolation phase) , SINGLE (the centroid of the cluster is sampled for the interpolation phase), RANDOM  (cluster nodes are randomly samples for the interpolation phase), MBR (cluster nodes are sampled according to the MBR decomposition of the cluster)
SpatialInterpolate: IDW (Inverse Distance Weighting) , NN (Nearest Neighbour)
nodeToInterpolate: ON (Interpolate active and inactive nodes of the network) OFF (Interpolate active nodes of the network) 
TemporalInterpolateMethod: POLYNOMIAL, LINE, NONE


4) Ouput: The system generates three output files:

<Name>SnapshotTRECI.csv collects the computation time (in millisecs) spent to discover the trend clusters , to perform the sampling phase, to compute the temporal interpolator, to perform the interpolation phase,  the size of the interpolation model, the interpolation MAE, RMSE e RRMSE, the average degree of the polynomial interpolator (if used), the size of the window and the compression size.
The error measures are computed snapshot by snapshot, the time measures as well as the size measures are computed window by window. 

<Name>TRECI.csv contains the error statistics reported in <Name>SnapshotTRECI.csv, but aggregated at the window level.

<Name>SUMATRA.csv collects number of discovered trend clusters, rmse and mae of the summarization of the stream performed by the trend clusters, computed snapshot by snapshot).


In addition, if  OutputStorageInDB=ON, the system stores the discovered trend clusters in the database, so that they are available for subsequent analysis.
