Kernel Representation: Persistence Fisher Kernel
Source:R/representation-kernel-methods.R
PersistenceFisherKernel.RdComputes 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.
Super classes
rgudhi::PythonClass -> rgudhi::SKLearnClass -> rgudhi::KernelRepresentationStep -> PersistenceFisherKernel
Methods
Inherited methods
rgudhi::PythonClass$get_python_class()rgudhi::PythonClass$set_python_class()rgudhi::SKLearnClass$get_params()rgudhi::SKLearnClass$set_params()rgudhi::KernelRepresentationStep$apply()rgudhi::KernelRepresentationStep$fit()rgudhi::KernelRepresentationStep$fit_transform()rgudhi::KernelRepresentationStep$transform()
Method new()
The PersistenceFisherKernel constructor.
Usage
PersistenceFisherKernel$new(
bandwidth_fisher = 1,
bandwidth = 1,
kernel_approx = NULL,
n_jobs = 1
)Arguments
bandwidth_fisherA numeric value specifying the bandwidth of the Gaussian kernel used to turn persistence diagrams into probability distributions by the
PersistenceFisherDistanceclass. Defaults to1.0.bandwidthA numeric value specifying the bandwidth of the Gaussian kernel applied to the persistence Fisher distance. Defaults to
1.0.kernel_approxA Python class specifying the kernel approximation class used to speed up computation. Defaults to
NULL. Common kernel approximations classes can be found in the scikit-learn library (such asRBFSamplerfor instance).n_jobsAn integer value specifying the number of jobs to use for the computation. Defaults to
1.
Examples
if (FALSE) { # reticulate::py_module_available("gudhi")
X <- seq_circle(10)
ac <- AlphaComplex$new(points = X)
st <- ac$create_simplex_tree()
dgm <- st$compute_persistence()$persistence_intervals_in_dimension(0)
ds <- DiagramSelector$new(use = TRUE)
dgm <- ds$apply(dgm)
pfk <- PersistenceFisherKernel$new()
pfk$apply(dgm, dgm)
pfk$fit_transform(list(dgm))
}