hatvis.layout.layout_membership#
- hatvis.layout.layout_membership(H, init='similarity', n_iter=300, strength=0.25, margin=0.04, measure='jaccard', transitive=True, check_every=10, pad=0.02, random_state=None)[source]#
Membership-aware layout (new in hatvis).
Each iteration performs one SMACOF step of stress majorization towards the similarity dissimilarities \(\delta_{ij}\) (de Leeuw 1977; Gansner, Koren and North 2004), followed by a projection step: for every hyperedge \(e\) with centroid \(\mathbf{c}_e\) and radius \(\rho_e=\max_{j\in e}\|\mathbf{y}_j-\mathbf{c}_e\|+\text{margin}\), every non-member inside the disc is moved a fraction
strengthof the way to its boundary. Everycheck_everyiterations the number of intrusions (non-members inside the padded convex hull of a hyperedge, seelayout_quality()) is counted, and the iterate with the fewest intrusions (ties: the later one) is returned. The positions therefore keep the meaning of the HAT-VIS layout while hulls enclose fewer foreign vertices;initmay also be a layout dict (e.g. a Sammon mapping).