gudhi.representations.vector_methods.BettiCurve Class Reference

Public Member Functions

def __init__ (self, resolution=100, sample_range=[np.nan, np.nan])
 
def fit (self, X, y=None)
 
def transform (self, X)
 
def __call__ (self, diag)
 

Detailed Description

This is a class for computing Betti curves from a list of persistence diagrams. A Betti curve is a 1D piecewise-constant function obtained from the rank function. It is sampled evenly on a given range and the vector of samples is returned. See https://www.researchgate.net/publication/316604237_Time_Series_Classification_via_Topological_Data_Analysis for more details.

Constructor & Destructor Documentation

◆ __init__()

def gudhi.representations.vector_methods.BettiCurve.__init__ (   self,
  resolution = 100,
  sample_range = [np.nan, np.nan] 
)
Constructor for the BettiCurve class.

Parameters:
    resolution (int): number of sample for the piecewise-constant function (default 100).
    sample_range ([double, double]): minimum and maximum of the piecewise-constant function domain, of the form [x_min, x_max] (default [numpy.nan, numpy.nan]). It is the interval on which samples will be drawn evenly. If one of the values is numpy.nan, it can be computed from the persistence diagrams with the fit() method.

Member Function Documentation

◆ __call__()

def gudhi.representations.vector_methods.BettiCurve.__call__ (   self,
  diag 
)
Apply BettiCurve on a single persistence diagram and outputs the result.

Parameters:
    diag (n x 2 numpy array): input persistence diagram.

Returns:
    numpy array with shape (**resolution**): output Betti curve.

◆ fit()

def gudhi.representations.vector_methods.BettiCurve.fit (   self,
  X,
  y = None 
)
Fit the BettiCurve class on a list of persistence diagrams: if any of the values in **sample_range** is numpy.nan, replace it with the corresponding value computed on the given list of persistence diagrams.

Parameters:
    X (list of n x 2 numpy arrays): input persistence diagrams.
    y (n x 1 array): persistence diagram labels (unused).

◆ transform()

def gudhi.representations.vector_methods.BettiCurve.transform (   self,
  X 
)
Compute the Betti curve for each persistence diagram individually and concatenate the results.

Parameters:
    X (list of n x 2 numpy arrays): input persistence diagrams.
    
Returns:
    numpy array with shape (number of diagrams) x (**resolution**): output Betti curves.

The documentation for this class was generated from the following file:
GUDHI  Version 3.3.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : MIT Generated on Tue Aug 11 2020 11:58:59 for GUDHI by Doxygen 1.8.18