Skip to content

Default weighting function normalization #40

@aywagner

Description

@aywagner

The default linear weighting function is being normalized per diagram rather than being fixed or normalized per experiment. As a consequence, the norm of a persistence image corresponding to a diagram with one point very close to the diagonal is not close to zero.

persim/persim/images.py

Lines 151 to 160 in 76b2b5a

if landscape is not None:
if len(landscape) > 0:
maxy = np.max(landscape[:, 1])
else:
maxy = 1
def linear(interval):
# linear function of y such that f(0) = 0 and f(max(y)) = 1
d = interval[1]
return (1 / maxy) * d if landscape is not None else d

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions