gudhi.representations.kernel_methods.PersistenceScaleSpaceKernel Class Reference

Public Member Functions

def __init__ (self, bandwidth=1., kernel_approx=None, n_jobs=None)
 
def fit (self, X, y=None)
 
def transform (self, X)
 
def __call__ (self, diag1, diag2)
 

Detailed Description

This is a class for computing the persistence scale space kernel matrix from a list of persistence diagrams. The persistence scale space kernel is computed by adding the symmetric to the diagonal of each point in each persistence diagram, with negative weight, and then convolving the points with a Gaussian kernel. See https://www.cv-foundation.org/openaccess/content_cvpr_2015/papers/Reininghaus_A_Stable_Multi-Scale_2015_CVPR_paper.pdf for more details. 

Constructor & Destructor Documentation

◆ __init__()

def gudhi.representations.kernel_methods.PersistenceScaleSpaceKernel.__init__ (   self,
  bandwidth = 1.,
  kernel_approx = None,
  n_jobs = None 
)
Constructor for the PersistenceScaleSpaceKernel class.
  
Parameters:
    bandwidth (double): bandwidth of the Gaussian kernel with which persistence diagrams will be convolved (default 1.)
    kernel_approx (class): kernel approximation class used to speed up computation (default None). Common kernel approximations classes can be found in the scikit-learn library (such as RBFSampler for instance).
    n_jobs (int): number of jobs to use for the computation. See :func:`pairwise_persistence_diagram_kernels` for details.

Member Function Documentation

◆ __call__()

def gudhi.representations.kernel_methods.PersistenceScaleSpaceKernel.__call__ (   self,
  diag1,
  diag2 
)
Apply PersistenceScaleSpaceKernel on a single pair of persistence diagrams and outputs the result.

Parameters:
    diag1 (n x 2 numpy array): first input persistence diagram.
    diag2 (n x 2 numpy array): second input persistence diagram.

Returns:
    float: persistence scale space kernel value.

◆ fit()

def gudhi.representations.kernel_methods.PersistenceScaleSpaceKernel.fit (   self,
  X,
  y = None 
)
Fit the PersistenceScaleSpaceKernel class on a list of persistence diagrams: symmetric to the diagonal of all points are computed and an instance of the PersistenceWeightedGaussianKernel class is fitted on the diagrams and then stored. 

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.kernel_methods.PersistenceScaleSpaceKernel.transform (   self,
  X 
)
Compute all persistence scale space kernel values between the persistence diagrams that were stored after calling the fit() method, and a given list of (possibly different) persistence diagrams.

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

Returns:
    numpy array of shape (number of diagrams in **diagrams**) x (number of diagrams in X): matrix of pairwise persistence scale space kernel values.

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