homology.PersDiag

class homology.PersDiag(birth_index, death_index, birth_value, death_value, mergetree)[source]

Persistence Diagrams and related merge-tree information. Sometimes known as barcodes.

A PersDiag consists of a pandas.DataFrame of birth and death values (sorted by length), along with the tree and forest for range and domain inclusion.

You should not call this directly — instead use the constructor on your homology.SimplicialComplex or ‘timeseries.Signal` object.

The input parameters are of the form that comes from persistence.dim0.unionfind or similar

Parameters:
birth_index : list_like
death_index : list_like
birth_value : list_like
death_value : list_like
mergetree : dict

Notes

Users should never call this directly — instead use the constructor on your homology.SimplicialComplex or timeseries.Signal object.

Attributes:
diagram : pandas.DataFrame

A DataFrame showing all of the birth/death information. It has columns birth_index, death_index, birth, death, and pers

lefts : pandas.Series
rights : pandas.Series
domains : dict
bartree : dict
bartree_parents : dict
forest : dict
forest_parents : dict
mergetree : dict
PersDiag.bin(width[, underflow, overflow, …]) Count bins on the transformed persistence diagram.
PersDiag.bin_bot(width[, underflow, overflow])
PersDiag.bin_diag(width[, underflow, overflow])
PersDiag.bin_len(width[, underflow, overflow])
PersDiag.bin_top(width[, underflow, overflow])
PersDiag.clip(beta) clip the barcode below beta.
PersDiag.grab(n) clip the barcode, using only the top n entries.
PersDiag.plot(canvas[, transform, bins, title]) Plot the persistence diagram using matplotlib or bokeh.
PersDiag.syzygy(powers) compute the syzygy coordinate of my barcode.
PersDiag.transform([transform, points]) Produce an array of points, obtained by transforming the persistence diagram.