.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/05_maps/plot_03_measure_scatter.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code or to run this example in your browser via Binder. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_05_maps_plot_03_measure_scatter.py: Patterns in the plane of two measures ===================================== Every pattern is a point; the axes are two interestingness measures and grey lines join each pattern to its parent (Stolper, Perer & Gotz, 2014). Frequent but unsurprising patterns sit at the right, rare but confident ones at the top left; lift separates real dependencies from coincidences. .. GENERATED FROM PYTHON SOURCE LINES 10-22 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /auto_examples/05_maps/images/sphx_glr_plot_03_measure_scatter_001.png :alt: patterns by rel support and confidence :srcset: /auto_examples/05_maps/images/sphx_glr_plot_03_measure_scatter_001.png :class: sphx-glr-multi-img * .. image-sg:: /auto_examples/05_maps/images/sphx_glr_plot_03_measure_scatter_002.png :alt: patterns by confidence and lift :srcset: /auto_examples/05_maps/images/sphx_glr_plot_03_measure_scatter_002.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none pattern ... lift 197 Your situation → Your situation → Your situati... ... 17.934641 107 Your possessions → The labor market → Other in... ... 16.333333 225 Your situation → Your situation → Your situati... ... 16.141176 151 Your situation → Your situation → Your situati... ... 13.450980 58 The labor market → Other information ... 13.066667 229 Your situation → Your situation → Your income ... ... 11.064516 [6 rows x 4 columns] | .. code-block:: Python import matplotlib.pyplot as plt import spmviz as sv from spmviz.viz import plot_pattern_scatter db = sv.datasets.load_clickstream() ps = sv.mine(db, 0.01, max_gap=1, max_length=10) plot_pattern_scatter(ps, "rel_support", "confidence", labels=10) plot_pattern_scatter(ps.filter(min_length=2), "confidence", "lift", color_by="start", labels=8) print(ps.measures().sort_values("lift", ascending=False).head(6)[["pattern", "support", "confidence", "lift"]]) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.594 seconds) .. _sphx_glr_download_auto_examples_05_maps_plot_03_measure_scatter.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/ComplexSystemsIntelligence/spmviz/main?urlpath=lab/tree/notebooks/auto_examples/05_maps/plot_03_measure_scatter.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_03_measure_scatter.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_03_measure_scatter.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_03_measure_scatter.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_