@@ -230,7 +230,7 @@ def quantized_fused_gromov_wasserstein_partitioned(
230
230
231
231
def get_graph_partition (C , npart , part_method = 'random' , F = None , alpha = 1. ,
232
232
random_state = 0 , nx = None ):
233
- """
233
+ r """
234
234
Partitioning a given graph with structure matrix :math:`\mathbf{C} \in R^{n \times n}`
235
235
into `npart` partitions either 'random', or using one of {'louvain', 'fluid'}
236
236
algorithms from networkx, or 'spectral' clustering from scikit-learn,
@@ -335,7 +335,7 @@ def get_graph_partition(C, npart, part_method='random', F=None, alpha=1.,
335
335
336
336
337
337
def get_graph_representants (C , part , rep_method = 'pagerank' , random_state = 0 , nx = None ):
338
- """
338
+ r """
339
339
Get representative node for each partition given by :math:`\mathbf{part} \in R^{n}`
340
340
of a graph with structure matrix :math:`\mathbf{C} \in R^{n \times n}`.
341
341
Selection is either done randomly or using 'pagerank' algorithm from networkx.
@@ -408,7 +408,7 @@ def get_graph_representants(C, part, rep_method='pagerank', random_state=0, nx=N
408
408
409
409
def format_partitioned_graph (C , p , part , rep_indices , F = None , M = None ,
410
410
alpha = 1. , nx = None ):
411
- """
411
+ r """
412
412
Format an attributed graph :math:`(\mathbf{C}, \mathbf{F}, \mathbf{p})`
413
413
with structure matrix :math:`(\mathbf{C} \in R^{n \times n}`, feature matrix
414
414
:math:`(\mathbf{F} \in R^{n \times d}` and node relative importance
@@ -761,7 +761,7 @@ def quantized_fused_gromov_wasserstein(
761
761
762
762
def get_partition_and_representants_samples (
763
763
X , npart , method = 'kmeans' , random_state = 0 , nx = None ):
764
- """
764
+ r """
765
765
Compute `npart` partitions and representants over samples :math:`\mathbf{X} \in R^{n \times d}`
766
766
using either a random or a kmeans algorithm.
767
767
@@ -854,7 +854,7 @@ def get_partition_and_representants_samples(
854
854
855
855
def format_partitioned_samples (
856
856
X , p , part , rep_indices , F = None , alpha = 1. , nx = None ):
857
- """
857
+ r """
858
858
Format an attributed graph :math:`(\mathbf{D}(\mathbf{X}), \mathbf{F}, \mathbf{p})`
859
859
with euclidean structure matrix :math:`(\mathbf{D}(\mathbf{X}) \in R^{n \times n}`,
860
860
feature matrix :math:`(\mathbf{F} \in R^{n \times d}` and node relative importance
0 commit comments