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 .. code-block:: python 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 ``spmviz`` ================================================= =============================================== ``Data_prep.py``: SPMF conversion, CM-SPAM ``sv.mine(..., algorithm="cmspam")`` or ``"spmf"`` parents, ``Confidence``, ``P_conf``, ``C_conf`` ``ps.parents()``, ``ps.confidence()``, ``ps.cum_confidence()`` filter by first event ``ps.filter(starts_with=...)``, ``start_items=`` ``NbVFS-WG.py`` (pyvis) ``NBVFS("wn")``; ``interactive.to_pyvis`` ``NbVFS-CM.py`` (closure + MDS) ``NBVFS("cm")``; ``networks.transitive_confidence`` ``NbVFS-TM.py`` (Jaccard + MDS) ``NBVFS("tm")``; ``measures.transaction_similarity`` ``sklearn.manifold.MDS`` ``mds="sklearn"`` or the default ``"smacof"`` --- ``NBVFS("fused")``, ``pattern_communities``, ``sublogs`` ================================================= =============================================== 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).