View a Time-Interval Sequence Database with the Time Interval Sequence Database Viewer (SPMF documentation)

Time-interval sequence databases are a type of data taken as input by data mining algorithms offered in SPMF such as FastTIRP and VertTIRP .

SPMF offers a tool to view the content of a time-interval sequence database. This tool is called the SPMF Sequence Database Viewer.

This page explains how to use this tool with an example.

How to run this example?

If you want to run this example from the graphical interface of SPMF, (1) choose the algorithm "Open_sequence_database_file_with_time_interval_sdb_viewer", (2) choose the test.csv file as input, and then (3) click "run algorithm" .

graph viewer open

What is displayed?

After running the example, the content of the file will be displayed by the tool. The picture below shows the user interface of this viewer.

The window A) show in the picture below is the main window. It displays the time-interval sequence database using a table. The table has three rows in this example. Each row is a sequence from the time-interval sequence database.

Take the first row as example.
The cell in the first column of the first row indicates that the ID of this sequence is 0.
The cell in the second column indicates that the item 1 was observed from time 8 to time 12.
The cell in the third column indicates that the item 2 was observed from time 10 to 16.
The fourth cell in that row indicates that the item 3 was observed from time 8 to 11.

The other sequences follow the same format.

This view as a table can be useful to understand the content of a sequence database file.

Besides, there are buttons that provides additional features:

graph viewer database graph

What is the input?

The algorithm takes as input a time-interval sequence database, as used by algorithm such FastTIRP.

The above example is provided in the file test.csv of the SPMF distribution. The content is as follows:

8,12,1;10,12,2;8,11,3;
8,12,3;10,16,1;15,18,2;
10,16,3;14,19,2;15,19,1;14,16,2;

In this format, each event type is an integer (A = 1, B = 2, C =3).

Then, each line is a sequence. This file has three lines and thus three sequences.

In a sequence (line), each event is represented using the format X,Y,Z; where X is the start time, Y is the end time, and Z is the event type.

For instance, the first line indicates that an event of type 1 has started at time 8 and ended at time 12, that an event of type 2 started at time 10 and ended at time 12, and that an event of type 3 started at time 8 and ended at time 11. The other lines follow the same format.