summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2019-11-14 14:07:06 +0100
committerMarc Glisse <marc.glisse@inria.fr>2019-11-14 14:07:06 +0100
commita043bee376c25254bd413c5579e9611aa57dbf47 (patch)
treeeb2b6916f139712d05c40d818457df00cb4283f9
parent3b58332d4f5849dd05ee08d8a222ca0fe9475832 (diff)
Attributes -> Parameters in __init__
-rw-r--r--src/python/gudhi/sktda/kernel_methods.py8
-rw-r--r--src/python/gudhi/sktda/metrics.py6
-rw-r--r--src/python/gudhi/sktda/preprocessing.py10
-rw-r--r--src/python/gudhi/sktda/vector_methods.py14
4 files changed, 19 insertions, 19 deletions
diff --git a/src/python/gudhi/sktda/kernel_methods.py b/src/python/gudhi/sktda/kernel_methods.py
index e93138e6..c855d2be 100644
--- a/src/python/gudhi/sktda/kernel_methods.py
+++ b/src/python/gudhi/sktda/kernel_methods.py
@@ -24,7 +24,7 @@ class SlicedWassersteinKernel(BaseEstimator, TransformerMixin):
"""
Constructor for the SlicedWassersteinKernel class.
- Attributes:
+ Parameters:
bandwidth (double): bandwidth of the Gaussian kernel applied to the sliced Wasserstein distance (default 1.).
num_directions (int): number of lines evenly sampled from [-pi/2,pi/2] in order to approximate and speed up the kernel computation (default 10).
"""
@@ -62,7 +62,7 @@ class PersistenceWeightedGaussianKernel(BaseEstimator, TransformerMixin):
"""
Constructor for the PersistenceWeightedGaussianKernel class.
- Attributes:
+ Parameters:
bandwidth (double): bandwidth of the Gaussian kernel with which persistence diagrams will be convolved (default 1.)
weight (function): weight function for the persistence diagram points (default constant function, ie lambda x: 1). This function must be defined on 2D points, ie lists or numpy arrays of the form [p_x,p_y].
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).
@@ -128,7 +128,7 @@ class PersistenceScaleSpaceKernel(BaseEstimator, TransformerMixin):
"""
Constructor for the PersistenceScaleSpaceKernel class.
- Attributes:
+ 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).
"""
@@ -173,7 +173,7 @@ class PersistenceFisherKernel(BaseEstimator, TransformerMixin):
"""
Constructor for the PersistenceFisherKernel class.
- Attributes:
+ 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).
diff --git a/src/python/gudhi/sktda/metrics.py b/src/python/gudhi/sktda/metrics.py
index c51b8f3b..c512cb82 100644
--- a/src/python/gudhi/sktda/metrics.py
+++ b/src/python/gudhi/sktda/metrics.py
@@ -29,7 +29,7 @@ class SlicedWassersteinDistance(BaseEstimator, TransformerMixin):
"""
Constructor for the SlicedWassersteinDistance class.
- Attributes:
+ Parameters:
num_directions (int): number of lines evenly sampled from [-pi/2,pi/2] in order to approximate and speed up the distance computation (default 10).
"""
self.num_directions = num_directions
@@ -90,7 +90,7 @@ class BottleneckDistance(BaseEstimator, TransformerMixin):
"""
Constructor for the BottleneckDistance class.
- Attributes:
+ Parameters:
epsilon (double): approximation quality (default 1e-4).
"""
self.epsilon = epsilon
@@ -152,7 +152,7 @@ class PersistenceFisherDistance(BaseEstimator, TransformerMixin):
"""
Constructor for the PersistenceFisherDistance class.
- Attributes:
+ Parameters:
bandwidth (double): bandwidth of the Gaussian kernel used to turn persistence diagrams into probability distributions (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).
"""
diff --git a/src/python/gudhi/sktda/preprocessing.py b/src/python/gudhi/sktda/preprocessing.py
index 294b5aeb..83227ca1 100644
--- a/src/python/gudhi/sktda/preprocessing.py
+++ b/src/python/gudhi/sktda/preprocessing.py
@@ -62,7 +62,7 @@ class Clamping(BaseEstimator, TransformerMixin):
"""
Constructor for the Clamping class.
- Attributes:
+ Parameters:
limit (double): clamping value (default np.inf).
"""
self.limit = limit
@@ -99,7 +99,7 @@ class DiagramScaler(BaseEstimator, TransformerMixin):
"""
Constructor for the DiagramScaler class.
- Attributes:
+ Parameters:
use (bool): whether to use the class or not (default False).
scalers (list of classes): list of scalers to be fit on the persistence diagrams (default []). Each element of the list is a tuple with two elements: the first one is a list of coordinates, and the second one is a scaler (i.e. a class with fit() and transform() methods) that is going to be applied to these coordinates. Common scalers can be found in the scikit-learn library (such as MinMaxScaler for instance).
"""
@@ -150,7 +150,7 @@ class Padding(BaseEstimator, TransformerMixin):
"""
Constructor for the Padding class.
- Attributes:
+ Parameters:
use (bool): whether to use the class or not (default False).
"""
self.use = use
@@ -194,7 +194,7 @@ class ProminentPoints(BaseEstimator, TransformerMixin):
"""
Constructor for the ProminentPoints class.
- Attributes:
+ Parameters:
use (bool): whether to use the class or not (default False).
location (string): either "upper" or "lower" (default "upper"). Whether to keep the points that are far away ("upper") or close ("lower") to the diagonal.
num_pts (int): cardinality threshold (default 10). If location == "upper", keep the top **num_pts** points that are the farthest away from the diagonal. If location == "lower", keep the top **num_pts** points that are the closest to the diagonal.
@@ -267,7 +267,7 @@ class DiagramSelector(BaseEstimator, TransformerMixin):
"""
Constructor for the DiagramSelector class.
- Attributes:
+ Parameters:
use (bool): whether to use the class or not (default False).
limit (double): second coordinate value that is the criterion for being an essential point (default numpy.inf).
point_type (string): either "finite" or "essential". The type of the points that are going to be extracted.
diff --git a/src/python/gudhi/sktda/vector_methods.py b/src/python/gudhi/sktda/vector_methods.py
index 91f1bc31..bf32f18e 100644
--- a/src/python/gudhi/sktda/vector_methods.py
+++ b/src/python/gudhi/sktda/vector_methods.py
@@ -26,7 +26,7 @@ class PersistenceImage(BaseEstimator, TransformerMixin):
"""
Constructor for the PersistenceImage class.
- Attributes:
+ Parameters:
bandwidth (double): bandwidth of the Gaussian kernel (default 1.).
weight (function): weight function for the persistence diagram points (default constant function, ie lambda x: 1). This function must be defined on 2D points, ie lists or numpy arrays of the form [p_x,p_y].
resolution ([int,int]): size (in pixels) of the persistence image (default [20,20]).
@@ -89,7 +89,7 @@ class Landscape(BaseEstimator, TransformerMixin):
"""
Constructor for the Landscape class.
- Attributes:
+ Parameters:
num_landscapes (int): number of piecewise-linear functions to output (default 5).
resolution (int): number of sample for all piecewise-linear functions (default 100).
sample_range ([double, double]): minimum and maximum of all piecewise-linear function domains, of the form [x_min, x_max] (default [numpy.nan, numpy.nan]). It is the interval on which samples will be drawn uniformly. If one of the values is numpy.nan, it can be computed from the persistence diagrams with the fit() method.
@@ -171,7 +171,7 @@ class Silhouette(BaseEstimator, TransformerMixin):
"""
Constructor for the Silhouette class.
- Attributes:
+ Parameters:
weight (function): weight function for the persistence diagram points (default constant function, ie lambda x: 1). This function must be defined on 2D points, ie on lists or numpy arrays of the form [p_x,p_y].
resolution (int): number of samples for the weighted average (default 100).
sample_range ([double, double]): minimum and maximum for the weighted average domain, of the form [x_min, x_max] (default [numpy.nan, numpy.nan]). It is the interval on which samples will be drawn uniformly. If one of the values is numpy.nan, it can be computed from the persistence diagrams with the fit() method.
@@ -249,7 +249,7 @@ class BettiCurve(BaseEstimator, TransformerMixin):
"""
Constructor for the BettiCurve class.
- Attributes:
+ Parameters:
resolution (int): number of sample for the piecewise-constant function (default 100).
sample_range ([double, double]): minimum and maximum of the piecewise-constant function domain, of the form [x_min, x_max] (default [numpy.nan, numpy.nan]). It is the interval on which samples will be drawn uniformly. If one of the values is numpy.nan, it can be computed from the persistence diagrams with the fit() method.
"""
@@ -309,7 +309,7 @@ class Entropy(BaseEstimator, TransformerMixin):
"""
Constructor for the Entropy class.
- Attributes:
+ 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".
@@ -379,7 +379,7 @@ class TopologicalVector(BaseEstimator, TransformerMixin):
"""
Constructor for the TopologicalVector class.
- Attributes:
+ Parameters:
threshold (int): number of distances to keep (default 10). This is the dimension of the topological vector. If -1, this threshold is computed from the list of persistence diagrams by considering the one with the largest number of points and using the dimension of its corresponding topological vector as threshold.
"""
self.threshold = threshold
@@ -432,7 +432,7 @@ class ComplexPolynomial(BaseEstimator, TransformerMixin):
"""
Constructor for the ComplexPolynomial class.
- Attributes:
+ Parameters:
polynomial_type (char): either "R", "S" or "T" (default "R"). Type of complex polynomial that is going to be computed (explained in https://link.springer.com/chapter/10.1007%2F978-3-319-23231-7_27).
threshold (int): number of coefficients (default 10). This is the dimension of the complex vector of coefficients, i.e. the number of coefficients corresponding to the largest degree terms of the polynomial. If -1, this threshold is computed from the list of persistence diagrams by considering the one with the largest number of points and using the dimension of its corresponding complex vector of coefficients as threshold.
"""