topobench.transforms.liftings.pointcloud2simplicial package#

Submodules#

topobench.transforms.liftings.pointcloud2simplicial.alpha_complex_lifting module#

This module defines the AlphaComplexLifting class, which lifts point clouds to simplicial complexes using the alpha complex method.

class topobench.transforms.liftings.pointcloud2simplicial.alpha_complex_lifting.AlphaComplexLifting(alpha: float, **kwargs)[source]#

Bases: PointCloud2SimplicialLifting

Lift point clouds to simplicial complex domain.

The lifting is done by generating the alpha complex using the Gudhi library. The alpha complex is a simplicial complex constructed from the finite cells of a Delaunay Triangulation. It has the same persistent homology as the Čech complex and is significantly smaller. When the alpha parameter is set to -1, the alpha complex is the Delaunay Triangulation.

Parameters:
alphafloat

The alpha parameter of the alpha complex.

**kwargsoptional

Additional arguments for the class.

lift_topology(data: Data) dict[source]#

Lift the topology of a point cloud to the alpha complex.

Parameters:
datatorch_geometric.data.Data

The input data to be lifted.

Returns:
dict

The lifted topology.

topobench.transforms.liftings.pointcloud2simplicial.base module#

Abstract class for lifting pointclouds to simplicial complexes.

class topobench.transforms.liftings.pointcloud2simplicial.base.PointCloud2SimplicialLifting(complex_dim=2, **kwargs)[source]#

Bases: PointCloudLifting

Abstract class for lifting pointclouds to simplicial complexes.

Parameters:
complex_dimint, optional

The dimension of the simplicial complex to be generated. Default is 2.

**kwargsoptional

Additional arguments for the class.

topobench.transforms.liftings.pointcloud2simplicial.random_flag_complex module#

Random Flag Complex Lifting.

class topobench.transforms.liftings.pointcloud2simplicial.random_flag_complex.RandomFlagComplexLifting(steps, alpha: float | None = None, p: float | None = None, **kwargs)[source]#

Bases: PointCloud2SimplicialLifting

Lifting of pointclouds to simplicial complexes using the Random Flag Complex construction.

Parameters:
stepsint

The number of steps to perform the Random Flag Complex construction.

alphafloat, optional

The exponent of the number of points to use as the probability of an edge appearing. If None, the default value is 0.5.

pfloat, optional

The probability of an edge appearing. If None, the default value is 1/n.

**kwargsdict

Additional arguments.

lift_topology(data: Data) dict[source]#

Lift the pointcloud to a simplicial complex.

The function uses the Random Flag Complex construction.

Parameters:
dataData

The input pointcloud data.

Returns:
dict

The topology of the lifted complex.

Module contents#

PointCloud2Simplicial liftings with automated exports.

class topobench.transforms.liftings.pointcloud2simplicial.AlphaComplexLifting(alpha: float, **kwargs)#

Bases: PointCloud2SimplicialLifting

Lift point clouds to simplicial complex domain.

The lifting is done by generating the alpha complex using the Gudhi library. The alpha complex is a simplicial complex constructed from the finite cells of a Delaunay Triangulation. It has the same persistent homology as the Čech complex and is significantly smaller. When the alpha parameter is set to -1, the alpha complex is the Delaunay Triangulation.

Parameters:
alphafloat

The alpha parameter of the alpha complex.

**kwargsoptional

Additional arguments for the class.

lift_topology(data: Data) dict#

Lift the topology of a point cloud to the alpha complex.

Parameters:
datatorch_geometric.data.Data

The input data to be lifted.

Returns:
dict

The lifted topology.

class topobench.transforms.liftings.pointcloud2simplicial.PointCloud2SimplicialLifting(complex_dim=2, **kwargs)[source]#

Bases: PointCloudLifting

Abstract class for lifting pointclouds to simplicial complexes.

Parameters:
complex_dimint, optional

The dimension of the simplicial complex to be generated. Default is 2.

**kwargsoptional

Additional arguments for the class.

class topobench.transforms.liftings.pointcloud2simplicial.RandomFlagComplexLifting(steps, alpha: float | None = None, p: float | None = None, **kwargs)#

Bases: PointCloud2SimplicialLifting

Lifting of pointclouds to simplicial complexes using the Random Flag Complex construction.

Parameters:
stepsint

The number of steps to perform the Random Flag Complex construction.

alphafloat, optional

The exponent of the number of points to use as the probability of an edge appearing. If None, the default value is 0.5.

pfloat, optional

The probability of an edge appearing. If None, the default value is 1/n.

**kwargsdict

Additional arguments.

lift_topology(data: Data) dict#

Lift the pointcloud to a simplicial complex.

The function uses the Random Flag Complex construction.

Parameters:
dataData

The input pointcloud data.

Returns:
dict

The topology of the lifted complex.