-
Notifications
You must be signed in to change notification settings - Fork 78
Description
First of all, thank you for providing this excellent library — it has been very useful in my work.
I am a bit confused about the role of the weight parameter in the PersistenceImage constructor.
According to the documentation:
“weight (function) – weight function for the persistence diagram points (default constant function, i.e. lambda x: 1). This function must be defined on 2D points, i.e. lists or numpy arrays of the form [p_x, p_y].”
From this, I understood that the input points are given as (birth, death), so a natural choice for weighting by persistence would be weight = lambda x: x[1] - x[0].
However, in the tutorial it is stated:
“A persistence image is obtained by rotating by -π/4, centering Gaussian functions on all diagram points (usually weighted by a parameter function — here we consider the squared distance to the diagonal) and summing all these Gaussians.”
In that example, the weight function is weight = lambda x: x[1]**2, which seems to imply that x[1] corresponds to the vertical axis after rotation (i.e., persistence) rather than the raw death coordinate from the input diagram.
Could you clarify this apparent inconsistency? Specifically: Does the weight function receive points in (birth, death) or in (birth, persistence) form?
Thank you for your time.