gudhi.representations.preprocessing.Padding Class Reference

Public Member Functions

def __init__ (self, use=False)
 
def fit (self, X, y=None)
 
def transform (self, X)
 
def __call__ (self, diag)
 

Detailed Description

This is a class for padding a list of persistence diagrams with dummy points, so that all persistence diagrams end up with the same number of points.

Constructor & Destructor Documentation

◆ __init__()

def gudhi.representations.preprocessing.Padding.__init__ (   self,
  use = False 
)
Constructor for the Padding class.

Parameters:
    use (bool): whether to use the class or not (default False).

Member Function Documentation

◆ __call__()

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

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

Returns:
    n x 2 numpy array: padded persistence diagram.

◆ fit()

def gudhi.representations.preprocessing.Padding.fit (   self,
  X,
  y = None 
)
Fit the Padding class on a list of persistence diagrams (this function actually does nothing but is useful when Padding is included in a scikit-learn Pipeline).

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

◆ transform()

def gudhi.representations.preprocessing.Padding.transform (   self,
  X 
)
Add dummy points to each persistence diagram so that they all have the same cardinality. All points are given an additional coordinate indicating if the point was added after padding (0) or already present before (1).  

Parameters:
    X (list of n x 2 or n x 1 numpy arrays): input persistence diagrams.

Returns:
    list of n x 3 or n x 2 numpy arrays: padded persistence diagrams.

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