multipers.filtrations package
Submodules
multipers.filtrations.filtrations module
- multipers.filtrations.filtrations.CoreDelaunay(points, *, beta=1.0, ks=None, precision='safe', verbose=False, max_alpha_square=inf)
Computes the Delaunay core bifiltration of a point cloud presented in the paper “Core Bifiltration” https://arxiv.org/abs/2405.01214, and returns the (multi-critical) bifiltration as a SimplexTreeMulti. The Delaunay core bifiltration is an alpha complex version of the core bifiltration which is smaller in size. Moreover, along the horizontal line k=1, the Delaunay core bifiltration is identical to the alpha complex.
- Input:
points: The point cloud as an ArrayLike of shape (n, d) where n is the number of points and d is the dimension of the points.
beta: The beta parameter for the Delaunay Core Bifiltration (default 1.0).
ks: The list of k-values to include in the bifiltration (default None). If None, the k-values are set to [1, 2, …, n] where n is the number of points in the point cloud. For large point clouds, it is recommended to set ks to a smaller list of k-values to reduce computation time. The values in ks must all be integers, positive, and less than or equal to the number of points in the point cloud.
precision: The precision of the computation of the AlphaComplex, one of [‘safe’, ‘exact’, ‘fast’] (default ‘safe’). See the GUDHI documentation for more information.
verbose: Whether to print progress messages (default False).
max_alpha_square: The maximum squared alpha value to consider when createing the alpha complex (default inf). See the GUDHI documentation for more information.
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
beta (float)
ks (Sequence[int] | None)
precision (str)
verbose (bool)
max_alpha_square (float)
- Return type:
SimplexTreeMulti_KFi32 | SimplexTreeMulti_Fi32 | SimplexTreeMulti_KFi64 | SimplexTreeMulti_Fi64 | SimplexTreeMulti_KFf32 | SimplexTreeMulti_Ff32 | SimplexTreeMulti_KFf64 | SimplexTreeMulti_Ff64
- multipers.filtrations.filtrations.Cubical(image, **slicer_kwargs)
Computes the cubical filtration of an image. The last axis dimention is interpreted as the number of parameters.
- Input:
image: ArrayLike of shape (*image_resolution, num_parameters)
** args : specify non-default slicer parameters
- Parameters:
image (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
- multipers.filtrations.filtrations.DegreeRips(*, points=None, distance_matrix=None, ks=None, threshold_radius=None)
The DegreeRips filtration.
- multipers.filtrations.filtrations.DelaunayCodensity(points, bandwidth=None, *, return_log=True, dtm_mass=None, kernel='gaussian', threshold_radius=None, reduce_degree=-1, vineyard=None, dtype=<class 'numpy.float64'>, verbose=False, clear=True)
TODO
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
bandwidth (float | None)
return_log (bool)
dtm_mass (float | None)
kernel (Literal['gaussian', 'exponential', 'exponential_kernel', 'multivariate_gaussian', 'sinc'] | ~collections.abc.Callable)
threshold_radius (float | None)
reduce_degree (int)
vineyard (bool | None)
verbose (bool)
clear (bool)
- multipers.filtrations.filtrations.DelaunayLowerstar(points, function, *, distance_matrix=None, threshold_radius=None, reduce_degree=-1, vineyard=None, dtype=<class 'numpy.float64'>, verbose=False, clear=True)
Computes the Function Delaunay bifiltration. Similar to RipsLowerstar, but most suited for low-dimensional euclidean data. See [Delaunay bifiltrations of functions on point clouds, Alonso et al] https://doi.org/10.1137/1.9781611977912.173
- Input:
points or distance_matrix: ArrayLike
function : ArrayLike of shape (num_data, )
threshold_radius: max edge length of the rips. Defaults at min(max(distance_matrix, axis=1)).
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
function (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
distance_matrix (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None)
threshold_radius (float | None)
reduce_degree (int)
vineyard (bool | None)
verbose (bool)
clear (bool)
- multipers.filtrations.filtrations.RipsCodensity(points, bandwidth=None, *, return_log=True, dtm_mass=None, kernel='gaussian', threshold_radius=None)
Computes the Rips density filtration.
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
bandwidth (float | None)
return_log (bool)
dtm_mass (float | None)
kernel (Literal['gaussian', 'exponential', 'exponential_kernel', 'multivariate_gaussian', 'sinc'] | ~collections.abc.Callable)
threshold_radius (float | None)
- multipers.filtrations.filtrations.RipsLowerstar(*, points=None, distance_matrix=None, function=None, threshold_radius=None)
Computes the Rips complex, with the usual rips filtration as a first parameter, and the lower star multi filtration as other parameter.
- Input:
points or distance_matrix: ArrayLike
function : ArrayLike of shape (num_data, num_parameters -1)
threshold_radius: max edge length of the rips. Defaults at min(max(distance_matrix, axis=1)).
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None)
distance_matrix (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None)
Module contents
- multipers.filtrations.CoreDelaunay(points, *, beta=1.0, ks=None, precision='safe', verbose=False, max_alpha_square=inf)
Computes the Delaunay core bifiltration of a point cloud presented in the paper “Core Bifiltration” https://arxiv.org/abs/2405.01214, and returns the (multi-critical) bifiltration as a SimplexTreeMulti. The Delaunay core bifiltration is an alpha complex version of the core bifiltration which is smaller in size. Moreover, along the horizontal line k=1, the Delaunay core bifiltration is identical to the alpha complex.
- Input:
points: The point cloud as an ArrayLike of shape (n, d) where n is the number of points and d is the dimension of the points.
beta: The beta parameter for the Delaunay Core Bifiltration (default 1.0).
ks: The list of k-values to include in the bifiltration (default None). If None, the k-values are set to [1, 2, …, n] where n is the number of points in the point cloud. For large point clouds, it is recommended to set ks to a smaller list of k-values to reduce computation time. The values in ks must all be integers, positive, and less than or equal to the number of points in the point cloud.
precision: The precision of the computation of the AlphaComplex, one of [‘safe’, ‘exact’, ‘fast’] (default ‘safe’). See the GUDHI documentation for more information.
verbose: Whether to print progress messages (default False).
max_alpha_square: The maximum squared alpha value to consider when createing the alpha complex (default inf). See the GUDHI documentation for more information.
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
beta (float)
ks (Sequence[int] | None)
precision (str)
verbose (bool)
max_alpha_square (float)
- Return type:
SimplexTreeMulti_KFi32 | SimplexTreeMulti_Fi32 | SimplexTreeMulti_KFi64 | SimplexTreeMulti_Fi64 | SimplexTreeMulti_KFf32 | SimplexTreeMulti_Ff32 | SimplexTreeMulti_KFf64 | SimplexTreeMulti_Ff64
- multipers.filtrations.Cubical(image, **slicer_kwargs)
Computes the cubical filtration of an image. The last axis dimention is interpreted as the number of parameters.
- Input:
image: ArrayLike of shape (*image_resolution, num_parameters)
** args : specify non-default slicer parameters
- Parameters:
image (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
- multipers.filtrations.DegreeRips(*, points=None, distance_matrix=None, ks=None, threshold_radius=None)
The DegreeRips filtration.
- multipers.filtrations.DelaunayCodensity(points, bandwidth=None, *, return_log=True, dtm_mass=None, kernel='gaussian', threshold_radius=None, reduce_degree=-1, vineyard=None, dtype=<class 'numpy.float64'>, verbose=False, clear=True)
TODO
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
bandwidth (float | None)
return_log (bool)
dtm_mass (float | None)
kernel (Literal['gaussian', 'exponential', 'exponential_kernel', 'multivariate_gaussian', 'sinc'] | ~collections.abc.Callable)
threshold_radius (float | None)
reduce_degree (int)
vineyard (bool | None)
verbose (bool)
clear (bool)
- multipers.filtrations.DelaunayLowerstar(points, function, *, distance_matrix=None, threshold_radius=None, reduce_degree=-1, vineyard=None, dtype=<class 'numpy.float64'>, verbose=False, clear=True)
Computes the Function Delaunay bifiltration. Similar to RipsLowerstar, but most suited for low-dimensional euclidean data. See [Delaunay bifiltrations of functions on point clouds, Alonso et al] https://doi.org/10.1137/1.9781611977912.173
- Input:
points or distance_matrix: ArrayLike
function : ArrayLike of shape (num_data, )
threshold_radius: max edge length of the rips. Defaults at min(max(distance_matrix, axis=1)).
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
function (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
distance_matrix (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None)
threshold_radius (float | None)
reduce_degree (int)
vineyard (bool | None)
verbose (bool)
clear (bool)
- multipers.filtrations.RipsCodensity(points, bandwidth=None, *, return_log=True, dtm_mass=None, kernel='gaussian', threshold_radius=None)
Computes the Rips density filtration.
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
bandwidth (float | None)
return_log (bool)
dtm_mass (float | None)
kernel (Literal['gaussian', 'exponential', 'exponential_kernel', 'multivariate_gaussian', 'sinc'] | ~collections.abc.Callable)
threshold_radius (float | None)
- multipers.filtrations.RipsLowerstar(*, points=None, distance_matrix=None, function=None, threshold_radius=None)
Computes the Rips complex, with the usual rips filtration as a first parameter, and the lower star multi filtration as other parameter.
- Input:
points or distance_matrix: ArrayLike
function : ArrayLike of shape (num_data, num_parameters -1)
threshold_radius: max edge length of the rips. Defaults at min(max(distance_matrix, axis=1)).
- Parameters:
points (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None)
distance_matrix (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes] | None)