Mixture of Gaussians + MST lifting (Pointcloud to Hypergraph) #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This approach creates a hypergraph from a point cloud by fitting a mixture of Gaussians to the points in a point cloud and then constructing a minimal spanning tree between the means of the fitted Gaussians. The hypergraph we obtain represents two things; Firstly, it groups points with similar coordinates together. Secondly, it creates discrete dependencies between neighbouring groups of points.
We provide several ways to set the number of components (Gaussians) fitted. By providing the minimal and maximal number of components, our approach selects the number of components with the lowest Akaike information criterion from the range [minimal number of components, maximal number of components]. If only one of these parameters is provided, the number of components is equal to this number. Finally, if no parameter is provided, we select the number of components with the lowest Akaike information criterion from the set$\{2^i, 1\leq i \leq \lfloor log_2(N/2) \rfloor\}$ , where $N$ is the number of points in the pointcloud.
For testing purposes, we implemented a pointcloud loader that loads points sampled from a random geometric shape (contained in pytorch geometric data set GeometricShapes) by default.
Lastly, we fixed a bug in the original code (file modules/utils/utils.py, line 236) that returned an error when the user provided a non-square incidence matrix.