gudhi.representations.kernel_methods.PersistenceFisherKernel Class Reference

Public Member Functions

def __init__ (self, bandwidth_fisher=1., 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 Fisher kernel matrix from a list of persistence diagrams. The persistence Fisher kernel is computed by exponentiating the corresponding persistence Fisher distance with a Gaussian kernel. See papers.nips.cc/paper/8205-persistence-fisher-kernel-a-riemannian-manifold-kernel-for-persistence-diagrams for more details. 

Constructor & Destructor Documentation

◆ __init__()

def gudhi.representations.kernel_methods.PersistenceFisherKernel.__init__ (   self,
  bandwidth_fisher = 1.,
  bandwidth = 1.,
  kernel_approx = None,
  n_jobs = None 
)
Constructor for the PersistenceFisherKernel class.

Parameters:
    bandwidth (double): bandwidth of the Gaussian kernel applied to the persistence Fisher distance (default 1.).
    bandwidth_fisher (double): bandwidth of the Gaussian kernel used to turn persistence diagrams into probability distributions by PersistenceFisherDistance class (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.PersistenceFisherKernel.__call__ (   self,
  diag1,
  diag2 
)
Apply PersistenceFisherKernel 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 Fisher kernel value.

◆ fit()

def gudhi.representations.kernel_methods.PersistenceFisherKernel.fit (   self,
  X,
  y = None 
)
Fit the PersistenceFisherKernel class on a list of persistence diagrams: an instance of the PersistenceFisherDistance 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.PersistenceFisherKernel.transform (   self,
  X 
)
Compute all persistence Fisher 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 Fisher 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