Note
Go to the end to download the full example code or to run this example in your browser via Binder.
Dotted chart of alarm floods#
The dotted chart of process mining (Song & van der Aalst, 2007) plots every event at its time (here relative to the start of the trace) and its trace. A highlighted pattern is drawn as a line through its occurrence, revealing its typical duration and position in the flood.
import matplotlib.pyplot as plt
import spmviz as sv
from spmviz.viz import plot_dotted_chart, plot_gap_distribution
db = sv.datasets.make_alarm_cascades(400, random_state=0)
plot_dotted_chart(db, max_sequences=120, highlight="P-LOWFLOW P-TRIP OP-PUMPSTART")

<Axes: title={'left': 'dotted chart'}, xlabel='time since the start of the sequence (minutes)', ylabel='120 sequences'>
How long do the patterns take?#
ps = sv.mine(db, 0.08, max_length=4)
plot_gap_distribution(ps, top=10)
plt.show()

Total running time of the script: (0 minutes 0.339 seconds)