l2gv2 package#
Subpackages#
- l2gv2.align package
- Subpackages
- Submodules
- l2gv2.align.alignment module
AlignmentProblemAlignmentProblem.align_patches()AlignmentProblem.dimAlignmentProblem.get_aligned_embedding()AlignmentProblem.load()AlignmentProblem.mean_embedding()AlignmentProblem.median_embedding()AlignmentProblem.n_nodesAlignmentProblem.n_patchesAlignmentProblem.rotate_patches()AlignmentProblem.rotationsAlignmentProblem.save_embedding()AlignmentProblem.save_patches()AlignmentProblem.scale_patches()AlignmentProblem.scalesAlignmentProblem.shiftsAlignmentProblem.translate_patches()AlignmentProblem.verboseAlignmentProblem.weight()
WeightedAlignmentProblemlocal_error()orthogonal_MSE_error()procrustes_error()transform_error()
- l2gv2.align.registry module
- l2gv2.align.utils module
- Module contents
AlignmentProblemAlignmentProblem.align_patches()AlignmentProblem.dimAlignmentProblem.get_aligned_embedding()AlignmentProblem.load()AlignmentProblem.mean_embedding()AlignmentProblem.median_embedding()AlignmentProblem.n_nodesAlignmentProblem.n_patchesAlignmentProblem.rotate_patches()AlignmentProblem.rotationsAlignmentProblem.save_embedding()AlignmentProblem.save_patches()AlignmentProblem.scale_patches()AlignmentProblem.scalesAlignmentProblem.shiftsAlignmentProblem.translate_patches()AlignmentProblem.verboseAlignmentProblem.weight()
GeoAlignmentProblemget_aligner()local_error()orthogonal_MSE_error()procrustes_error()register_aligner()transform_error()
- l2gv2.datasets package
- Submodules
- l2gv2.datasets.as733 module
- l2gv2.datasets.base module
- l2gv2.datasets.cora module
- l2gv2.datasets.dgraph module
- l2gv2.datasets.registry module
- l2gv2.datasets.utils module
- Module contents
- l2gv2.embedding package
- l2gv2.graphs package
- Submodules
- l2gv2.graphs.graph module
GraphGraph.adj()Graph.adj_weighted()Graph.bfs_order()Graph.connected_component_ids()Graph.degreeGraph.deviceGraph.edges()Graph.edges_weighted()Graph.from_networkx()Graph.from_tg()Graph.has_node_labels()Graph.is_edge()Graph.lcc()Graph.neighbourhood()Graph.nodesGraph.nodes_in_lcc()Graph.num_edgesGraph.num_featuresGraph.partition_graph()Graph.sample_negative_edges()Graph.sample_positive_edges()Graph.subgraph()Graph.to()Graph.to_networkx()Graph.weightedGraph.weights
- l2gv2.graphs.npgraph module
JitGraphNPGraphNPGraph.bfs_order()NPGraph.connected_component_ids()NPGraph.edges()NPGraph.edges_weighted()NPGraph.is_edge()NPGraph.load()NPGraph.neighbourhood()NPGraph.nodes_in_lcc()NPGraph.partition_graph()NPGraph.sample_negative_edges()NPGraph.sample_positive_edges()NPGraph.save()NPGraph.strengthNPGraph.subgraph()
- l2gv2.graphs.tgraph module
TGraphTGraph.bfs_order()TGraph.connected_component_ids()TGraph.degreeTGraph.deviceTGraph.edges()TGraph.edges_weighted()TGraph.is_edge()TGraph.neighbourhood()TGraph.nodes_in_lcc()TGraph.num_nodesTGraph.partition_graph()TGraph.sample_negative_edges()TGraph.sample_positive_edges()TGraph.strengthTGraph.subgraph()TGraph.to()TGraph.to_networkx()
- l2gv2.graphs.utils module
- Module contents
GraphGraph.adj()Graph.adj_weighted()Graph.bfs_order()Graph.connected_component_ids()Graph.degreeGraph.deviceGraph.edges()Graph.edges_weighted()Graph.from_networkx()Graph.from_tg()Graph.has_node_labels()Graph.is_edge()Graph.lcc()Graph.neighbourhood()Graph.nodesGraph.nodes_in_lcc()Graph.num_edgesGraph.num_featuresGraph.partition_graph()Graph.sample_negative_edges()Graph.sample_positive_edges()Graph.subgraph()Graph.to()Graph.to_networkx()Graph.weightedGraph.weights
JitGraphNPGraphNPGraph.bfs_order()NPGraph.connected_component_ids()NPGraph.degreeNPGraph.edges()NPGraph.edges_weighted()NPGraph.is_edge()NPGraph.load()NPGraph.neighbourhood()NPGraph.nodes_in_lcc()NPGraph.partition_graph()NPGraph.sample_negative_edges()NPGraph.sample_positive_edges()NPGraph.save()NPGraph.strengthNPGraph.subgraph()NPGraph.weights
TGraphTGraph.bfs_order()TGraph.connected_component_ids()TGraph.degreeTGraph.deviceTGraph.edges()TGraph.edges_weighted()TGraph.is_edge()TGraph.neighbourhood()TGraph.nodes_in_lcc()TGraph.num_nodesTGraph.partition_graph()TGraph.sample_negative_edges()TGraph.sample_positive_edges()TGraph.strengthTGraph.subgraph()TGraph.to()TGraph.to_networkx()TGraph.weights
induced_subgraph()spanning_tree()spanning_tree_mask()
- l2gv2.patch package
- Submodules
- l2gv2.patch.clustering module
- l2gv2.patch.lazy module
- l2gv2.patch.patches module
- l2gv2.patch.sparsify module
- l2gv2.patch.utils module
AlignmentProblemAlignmentProblem.align_patches()AlignmentProblem.calc_synchronised_rotations()AlignmentProblem.calc_synchronised_scales()AlignmentProblem.calc_synchronised_translations()AlignmentProblem.dimAlignmentProblem.get_aligned_embedding()AlignmentProblem.load()AlignmentProblem.mean_embedding()AlignmentProblem.median_embedding()AlignmentProblem.n_nodesAlignmentProblem.n_patchesAlignmentProblem.rotate_patches()AlignmentProblem.rotationsAlignmentProblem.save_embedding()AlignmentProblem.save_patches()AlignmentProblem.scale_patches()AlignmentProblem.scalesAlignmentProblem.shiftsAlignmentProblem.translate_patches()AlignmentProblem.verboseAlignmentProblem.weight()
SVDAlignmentProblemWeightedAlignmentProblemensure_extension()local_error()nearest_orthogonal()orthogonal_mse_error()procrustes_error()random_gen()relative_orthogonal_transform()relative_scale()seed()transform_error()
- Module contents
Submodules#
l2gv2.example module#
l2gv2.utils module#
TODO: module docstring for utils.py
- class l2gv2.utils.EarlyStopping(patience: int, delta: float = 0)#
Bases:
objectContext manager for early stopping
- class l2gv2.utils.Timer#
Bases:
objectContext manager for accumulating execution time
Adds the time taken within block to a running total.
- l2gv2.utils.ensure_extension(filename: str, extension: str) Path#
Check filename for extension and add it if necessary
- Parameters:
filename – input filename
extension – desired extension (including .)
- Returns:
Path object with correct extension
- Raises:
ValueError – if filename has the wrong extension
- l2gv2.utils.flatten(lst, ltypes=(<class 'list'>, <class 'tuple'>))#
TODO: docstring for flatten.
- l2gv2.utils.get_device(model: Module) device#
TODO: docstring for get_device.
- l2gv2.utils.set_device(device: str | None = None)#
TODO: docstring for set_device.
- l2gv2.utils.speye(n: int, dtype: dtype = torch.float32) Tensor#
identity matrix of dimension n as sparse_coo_tensor.
- l2gv2.utils.tqdm_close(t: tqdm)#