From the NbVFS scripts#
The scripts published with the NBVFS paper (Bántay and Abonyi, 2024;
github.com/laszlobantayPE/NbVFS)
run SPMF from Python, exchange CSV files and draw the three views with pyvis,
scikit-learn and Matplotlib. In spmviz the whole analysis is
import spmviz as sv
db = sv.datasets.load_clickstream()
ps = sv.mine(db, min_support=0.01, algorithm="cmspam", max_gap=1, max_length=10)
for view in ("wn", "cm", "tm"):
model = sv.NBVFS(view, start_items=[2] if view == "wn" else None).fit(ps)
model.plot()
model.write(f"clickstream_{view}.gexf") # for Gephi
NbVFS scripts |
|
|---|---|
|
|
parents, |
|
filter by first event |
|
|
|
|
|
|
|
|
|
— |
|
With these settings spmviz finds 241 frequent sequences in the click-stream
and 421 in the alarm log, against 242 and 420 reported in the paper; the
difference comes from data preparation (see the book, section 4.4).