Public Member Functions | |
def | __init__ (self, mode="scalar", normalized=True, resolution=100, sample_range=[np.nan, np.nan]) |
def | fit (self, X, y=None) |
def | transform (self, X) |
def | __call__ (self, diag) |
This is a class for computing persistence entropy. Persistence entropy is a statistic for persistence diagrams inspired from Shannon entropy. This statistic can also be used to compute a feature vector, called the entropy summary function. See https://arxiv.org/pdf/1803.08304.pdf for more details. Note that a previous implementation was contributed by Manuel Soriano-Trigueros.
def gudhi.representations.vector_methods.Entropy.__init__ | ( | self, | |
mode = "scalar" , |
|||
normalized = True , |
|||
resolution = 100 , |
|||
sample_range = [np.nan, np.nan] |
|||
) |
Constructor for the Entropy class. Parameters: mode (string): what entropy to compute: either "scalar" for computing the entropy statistics, or "vector" for computing the entropy summary functions (default "scalar"). normalized (bool): whether to normalize the entropy summary function (default True). Used only if **mode** = "vector". resolution (int): number of sample for the entropy summary function (default 100). Used only if **mode** = "vector". sample_range ([double, double]): minimum and maximum of the entropy summary 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. Used only if **mode** = "vector".
def gudhi.representations.vector_methods.Entropy.__call__ | ( | self, | |
diag | |||
) |
Apply Entropy on a single persistence diagram and outputs the result. Parameters: diag (n x 2 numpy array): input persistence diagram. Returns: numpy array with shape (1 if **mode** = "scalar" else **resolution**): output entropy.
def gudhi.representations.vector_methods.Entropy.fit | ( | self, | |
X, | |||
y = None |
|||
) |
Fit the Entropy class on a 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).
def gudhi.representations.vector_methods.Entropy.transform | ( | self, | |
X | |||
) |
Compute the entropy 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 (1 if **mode** = "scalar" else **resolution**): output entropy.
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 |