Create a workflow using the SPMF Workflow editor (SPMF documentation)

This example explains how to use the workflow editor of SPMF to run multiple algorithms one after the other (a workflow) .

How to run this example?

If you are using the graphical interface of SPMF, (1) choose the "SPMF_workflow_editor" algorithm, (2) click "Run algorithm".

This will open the SPMF workflow editor, which is displayed below:

workflow editor of SPMF

The workflow editor is divided in the following main areas:

How to use the workflow editor?

Using the Workflow Editor is very simple. The best way to explain how it works is to do it with a step-by-step example.

We will consider a scenario where we want to apply two algorithms.

First, we will apply the Eclat algorithm on a text file called "contextPasquier99.txt". This will produce an output file.

Then, we want to open the output file using the SPMF text editor. Let's see how to create a workflow to do this and then how to run it.

The first step is click the "Add an algorithm" button. This will create a new node for an algorithm like this:

worfklow

Then, on the right, we need to select the algorithm using the combo box, and set its parameters in the table. For example, I will choose the Eclat algorithm and click on the table to set its minsup parameter to 0.8:

workflow editor 2

Then, as you observe on the left, two orange boxes have appeared that symbolize the input and output of the algorithm.

We can then click on the topmost orange box, which represents the input. Then on the right, we can click on the button "..." to choose the input file, which will be "contextPasquier99.txt" in this example. This file is a file used in many examples of the SPMF documentation.

eclat workflow

Then, we could click on the orange box at the bottom, which represents the output of the algorithm to set the output file name. But here we will just keep the default name of "Output.txt".

Now after that, we will add another algorithm to be run after Eclat. We will click again on the“Add an algorithm” button. This will create a new algorithm node in red color in the workflow. Then, we click on the combosbox to select the algorithm "Open_text_file_with_SPMF_text_editor":

We have finished creating this small workflow, which consists of two algorithms.

This workflow will first run the Eclat algorithm and then open the output using the SPMF text editor.

To run the workflow, we now have to click on the "Run workflow" button.

This will run the two algorithms one after the other, and information about the execution will be displayed in the console if there is no error.

run a workflow

That is all for this short example of using the workflow editor.

It is also possible to create more complex workflows using more than two algorithms.

For example,we could create a new workflow using three algorithms like this:

three algorithms workflow