topobench.transforms.liftings.pointcloud2hypergraph package#
Submodules#
topobench.transforms.liftings.pointcloud2hypergraph.base module#
Abstract class for PointCloud to Hypergraph liftings.
- class topobench.transforms.liftings.pointcloud2hypergraph.base.PointCloud2HypergraphLifting(**kwargs)[source]#
Bases:
PointCloudLifting
Abstract class for lifting pointclouds to hypergraphs.
- Parameters:
- **kwargsoptional
Additional arguments for the class.
topobench.transforms.liftings.pointcloud2hypergraph.mogmst_lifting module#
Mixture of Gaussians and Minimum Spanning Tree (MoGMST) Lifting.
- class topobench.transforms.liftings.pointcloud2hypergraph.mogmst_lifting.MoGMSTLifting(min_components=None, max_components=None, random_state=None, **kwargs)[source]#
Bases:
PointCloud2HypergraphLifting
Lift a point cloud to a hypergraph.
We find a Mixture of Gaussians and then create a Minimum Spanning Tree (MST) between the means of the Gaussians.
- Parameters:
- min_componentsint or None, optional
The minimum number of components for the Mixture of Gaussians model. It needs to be at least 1 (default: None).
- max_componentsint or None, optional
The maximum number of components for the Mixture of Gaussians model. It needs to be greater or equal than min_components (default: None).
- random_stateint, optional
The random state for the Mixture of Gaussians model (default: None).
- **kwargsoptional
Additional arguments for the class.
- find_mog(data) tuple[ndarray, int, ndarray] [source]#
Find the best number of components for a Mixture of Gaussians model.
- Parameters:
- datanp.ndarray
The input data to be fitted.
- Returns:
- tuple[np.ndarray, int, np.ndarray]
The labels of the data, the number of components and the means of the components.
topobench.transforms.liftings.pointcloud2hypergraph.pointnet_lifting module#
This module implements the PointNetLifting class.
- class topobench.transforms.liftings.pointcloud2hypergraph.pointnet_lifting.PointNetLifting(sampling_ratio: float, cluster_radius: float, **kwargs)[source]#
Bases:
PointCloud2HypergraphLifting
Lift a point cloud to a hypergraph.
This is inspired by Qi et al. “PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space” (NeurIPS 2027). This means building approximately equidistantly-spaced clusters of points via farthest point sampling and radius queries. Each of these clusters constitutes a hyperedge which is used for set abstraction.
- Parameters:
- sampling_ratiofloat
The sub-sampling ratio for farthest point sampling.
- cluster_radiusfloat
The radius of the clusters w.r.t. the sub-sampled points.
- **kwargsoptional
Additional arguments for the class.
topobench.transforms.liftings.pointcloud2hypergraph.voronoi_lifting module#
Lifting pointcloud to Voronoi graph induced by Farthest Point Sampling (FPS) support set.
- class topobench.transforms.liftings.pointcloud2hypergraph.voronoi_lifting.VoronoiLifting(support_ratio: float, **kwargs)[source]#
Bases:
PointCloud2HypergraphLifting
Lifts pointcloud to Farthest-point Voronoi graph.
- Parameters:
- support_ratiofloat
Ratio of points to sample with FPS to form voronoi support set.
- **kwargsoptional
Additional arguments for the class.
Module contents#
PointCloud2Hypergraph liftings with automated exports.
- class topobench.transforms.liftings.pointcloud2hypergraph.MoGMSTLifting(min_components=None, max_components=None, random_state=None, **kwargs)#
Bases:
PointCloud2HypergraphLifting
Lift a point cloud to a hypergraph.
We find a Mixture of Gaussians and then create a Minimum Spanning Tree (MST) between the means of the Gaussians.
- Parameters:
- min_componentsint or None, optional
The minimum number of components for the Mixture of Gaussians model. It needs to be at least 1 (default: None).
- max_componentsint or None, optional
The maximum number of components for the Mixture of Gaussians model. It needs to be greater or equal than min_components (default: None).
- random_stateint, optional
The random state for the Mixture of Gaussians model (default: None).
- **kwargsoptional
Additional arguments for the class.
- class topobench.transforms.liftings.pointcloud2hypergraph.PointCloud2HypergraphLifting(**kwargs)[source]#
Bases:
PointCloudLifting
Abstract class for lifting pointclouds to hypergraphs.
- Parameters:
- **kwargsoptional
Additional arguments for the class.
- class topobench.transforms.liftings.pointcloud2hypergraph.PointNetLifting(sampling_ratio: float, cluster_radius: float, **kwargs)#
Bases:
PointCloud2HypergraphLifting
Lift a point cloud to a hypergraph.
This is inspired by Qi et al. “PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space” (NeurIPS 2027). This means building approximately equidistantly-spaced clusters of points via farthest point sampling and radius queries. Each of these clusters constitutes a hyperedge which is used for set abstraction.
- Parameters:
- sampling_ratiofloat
The sub-sampling ratio for farthest point sampling.
- cluster_radiusfloat
The radius of the clusters w.r.t. the sub-sampled points.
- **kwargsoptional
Additional arguments for the class.
- class topobench.transforms.liftings.pointcloud2hypergraph.VoronoiLifting(support_ratio: float, **kwargs)#
Bases:
PointCloud2HypergraphLifting
Lifts pointcloud to Farthest-point Voronoi graph.
- Parameters:
- support_ratiofloat
Ratio of points to sample with FPS to form voronoi support set.
- **kwargsoptional
Additional arguments for the class.