From e2532a909fd156d019acf4c88991cf095b5f51dd Mon Sep 17 00:00:00 2001 From: Mats Rydberg Date: Thu, 28 Aug 2025 17:14:24 +0200 Subject: [PATCH 1/7] Update docstring for RWR - Content copied as much as possible from GDS Manual - Add default values --- .../api/graph_sampling_endpoints.py | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py b/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py index 337b659ea..cf55b2823 100644 --- a/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py +++ b/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py @@ -10,7 +10,7 @@ class GraphSamplingEndpoints(ABC): """ - Abstract base class defining the API for graph sampling algorithms algorithm. + Abstract base class defining the API for graph sampling operations. """ @abstractmethod @@ -32,11 +32,11 @@ def rwr( job_id: Optional[str] = None, ) -> GraphWithSamplingResult: """ - Computes a set of Random Walks with Restart (RWR) for the given graph and stores the result as a new graph in the catalog. + Random walk with restarts (RWR) samples the graph by taking random walks from a set of start nodes. - This method performs a random walk, beginning from a set of nodes (if provided), - where at each step there is a probability to restart back at the original nodes. - The result is turned into a new graph induced by the random walks and stored in the catalog. + On each step of a random walk, there is a probability that the walk stops, and a new walk from one of the start + nodes starts instead (i.e. the walk restarts). Each node visited on these walks will be part of the sampled + subgraph. The resulting subgraph is stored as a new graph in the Graph Catalog. Parameters ---------- @@ -44,43 +44,46 @@ def rwr( The input graph on which the Random Walk with Restart (RWR) will be performed. graph_name : str - The name of the new graph in the catalog. + The name of the new graph that is stored in the graph catalog. start_nodes : list of int, optional - A list of node IDs to start the random walk from. If not provided, all - nodes are used as potential starting points. + IDs of the initial set of nodes in the original graph from which the sampling random walks will start. + By default, a single node is chosen uniformly at random. restart_probability : float, optional - The probability of restarting back to the original node at each step. - Should be a value between 0 and 1. If not specified, a default value is used. + The probability that a sampling random walk restarts from one of the start nodes. + Default is 0.1. sampling_ratio : float, optional - The ratio of nodes to sample during the computation. This value should - be between 0 and 1. If not specified, no sampling is performed. + The fraction of nodes in the original graph to be sampled. + Default is 0.15. node_label_stratification : bool, optional - If True, the algorithm tries to preserve the label distribution of the original graph in the sampled graph. + If true, preserves the node label distribution of the original graph. + Default is False. relationship_weight_property : str, optional - The name of the property on relationships to use as weights during - the random walk. If not specified, the relationships are treated as - unweighted. + Name of the relationship property to use as weights. If unspecified, the algorithm runs unweighted. relationship_types : list of str, optional - The relationship types used to select relationships for this algorithm run. + Filter the named graph using the given relationship types. Relationships with any of the given types will be + included. node_labels : list of str, optional - The node labels used to select nodes for this algorithm run. + Filter the named graph using the given node labels. Nodes with any of the given labels will be included. sudo : bool, optional - Override memory estimation limits. Use with caution as this can lead to - memory issues if the estimation is significantly wrong. + Bypass heap control. Use with caution. + Default is False. log_progress : bool, optional - If True, logs the progress of the computation. + Turn `on/off` percentage logging while running procedure. + Default is True. username : str, optional - The username to attribute the procedure run to + Use Administrator access to run an algorithm on a graph owned by another user. + Default is None. concurrency : int, optional - The number of concurrent threads used for the algorithm execution. + The number of concurrent threads used for running the algorithm. + Default is 4. job_id : str, optional - An identifier for the job that can be used for monitoring and cancellation + An ID that can be provided to more easily track the algorithm’s progress. + By default, a random job id is generated. Returns ------- GraphWithSamplingResult - Tuple of the graph object and the result of the Random Walk with Restart (RWR), including the sampled - nodes and their scores. + Tuple of the graph object and the result of the Random Walk with Restart (RWR), including the dimensions of the sampled graph. """ pass From d355e6265b70c80b5a1d7162083d53990b5e94fb Mon Sep 17 00:00:00 2001 From: Mats Rydberg Date: Thu, 28 Aug 2025 17:24:04 +0200 Subject: [PATCH 2/7] Update docstring for CNARW - Content copied as much as possible from GDS Manual - Add default values --- .../api/graph_sampling_endpoints.py | 61 ++++++++++--------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py b/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py index cf55b2823..d49b0dd7f 100644 --- a/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py +++ b/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py @@ -41,8 +41,7 @@ def rwr( Parameters ---------- G : GraphV2 - The input graph on which the Random Walk with Restart (RWR) will be - performed. + The input graph to be sampled. graph_name : str The name of the new graph that is stored in the graph catalog. start_nodes : list of int, optional @@ -106,55 +105,59 @@ def cnarw( job_id: Optional[str] = None, ) -> GraphWithSamplingResult: """ - Computes a set of Random Walks with Restart (RWR) for the given graph and stores the result as a new graph in the catalog. + Common Neighbour Aware Random Walk (CNARW) samples the graph by taking random walks from a set of start nodes - This method performs a random walk, beginning from a set of nodes (if provided), - where at each step there is a probability to restart back at the original nodes. - The result is turned into a new graph induced by the random walks and stored in the catalog. + CNARW is a graph sampling technique that involves optimizing the selection of the next-hop node. It takes into + account the number of common neighbours between the current node and the next-hop candidates. On each step of a + random walk, there is a probability that the walk stops, and a new walk from one of the start nodes starts + instead (i.e. the walk restarts). Each node visited on these walks will be part of the sampled subgraph. The + resulting subgraph is stored as a new graph in the Graph Catalog. Parameters ---------- G : GraphV2 - The input graph on which the Random Walk with Restart (RWR) will be - performed. + The input graph to be sampled. graph_name : str - The name of the new graph in the catalog. + The name of the new graph that is stored in the graph catalog. start_nodes : list of int, optional - A list of node IDs to start the random walk from. If not provided, all - nodes are used as potential starting points. + IDs of the initial set of nodes in the original graph from which the sampling random walks will start. + By default, a single node is chosen uniformly at random. restart_probability : float, optional - The probability of restarting back to the original node at each step. - Should be a value between 0 and 1. If not specified, a default value is used. + The probability that a sampling random walk restarts from one of the start nodes. + Default is 0.1. sampling_ratio : float, optional - The ratio of nodes to sample during the computation. This value should - be between 0 and 1. If not specified, no sampling is performed. + The fraction of nodes in the original graph to be sampled. + Default is 0.15. node_label_stratification : bool, optional - If True, the algorithm tries to preserve the label distribution of the original graph in the sampled graph. + If true, preserves the node label distribution of the original graph. + Default is False. relationship_weight_property : str, optional - The name of the property on relationships to use as weights during - the random walk. If not specified, the relationships are treated as - unweighted. + Name of the relationship property to use as weights. If unspecified, the algorithm runs unweighted. relationship_types : list of str, optional - The relationship types used to select relationships for this algorithm run. + Filter the named graph using the given relationship types. Relationships with any of the given types will be + included. node_labels : list of str, optional - The node labels used to select nodes for this algorithm run. + Filter the named graph using the given node labels. Nodes with any of the given labels will be included. sudo : bool, optional - Override memory estimation limits. Use with caution as this can lead to - memory issues if the estimation is significantly wrong. + Bypass heap control. Use with caution. + Default is False. log_progress : bool, optional - If True, logs the progress of the computation. + Turn `on/off` percentage logging while running procedure. + Default is True. username : str, optional - The username to attribute the procedure run to + Use Administrator access to run an algorithm on a graph owned by another user. + Default is None. concurrency : int, optional - The number of concurrent threads used for the algorithm execution. + The number of concurrent threads used for running the algorithm. + Default is 4. job_id : str, optional - An identifier for the job that can be used for monitoring and cancellation + An ID that can be provided to more easily track the algorithm’s progress. + By default, a random job id is generated. Returns ------- GraphSamplingResult - Tuple of the graph object and the result of the Random Walk with Restart (RWR), including the sampled - nodes and their scores. + Tuple of the graph object and the result of the Common Neighbour Aware Random Walk (CNARW), including the dimensions of the sampled graph. """ pass From 29bf5433579f6f0346cb6be5aee07d38007897c4 Mon Sep 17 00:00:00 2001 From: Mats Rydberg Date: Thu, 18 Sep 2025 16:10:03 +0200 Subject: [PATCH 3/7] Move api files into categorized packages --- .../api/{ => catalog}/graph_sampling_endpoints.py | 8 ++++---- .../procedure_surface/api/catalog_endpoints.py | 2 +- .../procedure_surface/api/centrality/__init__.py | 0 .../api/{ => centrality}/articlerank_endpoints.py | 2 +- .../api/{ => centrality}/articulationpoints_endpoints.py | 2 +- .../api/{ => centrality}/betweenness_endpoints.py | 2 +- .../api/{ => centrality}/celf_endpoints.py | 4 ++-- .../api/{ => centrality}/closeness_endpoints.py | 4 ++-- .../api/{ => centrality}/closeness_harmonic_endpoints.py | 4 ++-- .../api/{ => centrality}/degree_endpoints.py | 4 ++-- .../api/{ => centrality}/eigenvector_endpoints.py | 4 ++-- .../api/{ => centrality}/pagerank_endpoints.py | 2 +- .../procedure_surface/api/community/__init__.py | 0 .../api/{ => community}/k1coloring_endpoints.py | 4 ++-- .../api/{ => community}/kcore_endpoints.py | 4 ++-- .../api/{ => community}/louvain_endpoints.py | 4 ++-- .../api/{ => community}/scc_endpoints.py | 4 ++-- .../api/{ => community}/wcc_endpoints.py | 4 ++-- .../procedure_surface/api/model/graphsage_model.py | 2 +- .../procedure_surface/api/node_embedding/__init__.py | 0 .../api/{ => node_embedding}/fastrp_endpoints.py | 2 +- .../{ => node_embedding}/graphsage_predict_endpoints.py | 0 .../api/{ => node_embedding}/graphsage_train_endpoints.py | 0 .../api/{ => node_embedding}/hashgnn_endpoints.py | 2 +- .../api/{ => node_embedding}/node2vec_endpoints.py | 2 +- .../arrow/articlerank_arrow_endpoints.py | 2 +- .../arrow/articulationpoints_arrow_endpoints.py | 2 +- .../arrow/betweenness_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/catalog_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/celf_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/closeness_arrow_endpoints.py | 2 +- .../arrow/closeness_harmonic_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/degree_arrow_endpoints.py | 2 +- .../arrow/eigenvector_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/fastrp_arrow_endpoints.py | 2 +- .../arrow/graph_sampling_arrow_endpoints.py | 2 +- .../arrow/graphsage_predict_arrow_endpoints.py | 2 +- .../arrow/graphsage_train_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/hashgnn_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/k1coloring_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/kcore_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/louvain_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/node2vec_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/pagerank_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/scc_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/wcc_arrow_endpoints.py | 2 +- .../cypher/articlerank_cypher_endpoints.py | 2 +- .../cypher/articulationpoints_cypher_endpoints.py | 2 +- .../cypher/betweenness_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/catalog_cypher_endpoints.py | 4 ++-- .../procedure_surface/cypher/celf_cypher_endpoints.py | 2 +- .../cypher/closeness_cypher_endpoints.py | 2 +- .../cypher/closeness_harmonic_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/degree_cypher_endpoints.py | 2 +- .../cypher/eigenvector_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/fastrp_cypher_endpoints.py | 2 +- .../cypher/graph_sampling_cypher_endpoints.py | 2 +- .../cypher/graphsage_predict_cypher_endpoints.py | 2 +- .../cypher/graphsage_train_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/hashgnn_cypher_endpoints.py | 2 +- .../cypher/k1coloring_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/kcore_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/louvain_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/node2vec_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/pagerank_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/scc_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/wcc_cypher_endpoints.py | 2 +- .../arrow/test_articulationpoints_arrow_endpoints.py | 2 +- .../arrow/test_betweenness_arrow_endpoints.py | 2 +- .../procedure_surface/arrow/test_scc_arrow_endpoints.py | 2 +- .../cypher/test_articulationpoints_cypher_endpoints.py | 2 +- .../procedure_surface/cypher/test_scc_cypher_endpoints.py | 2 +- .../procedure_surface/session/test_walking_skeleton.py | 2 ++ .../cypher/test_unit_articlerank_cypher_endpoints.py | 2 +- .../test_unit_articulationpoints_cypher_endpoints.py | 2 +- .../cypher/test_unit_betweenness_cypher_endpoints.py | 2 +- .../cypher/test_unit_celf_cypher_endpoints.py | 2 +- .../cypher/test_unit_closeness_cypher_endpoints.py | 2 +- .../test_unit_closeness_harmonic_cypher_endpoints.py | 2 +- .../cypher/test_unit_degree_cypher_endpoints.py | 2 +- .../cypher/test_unit_eigenvector_cypher_endpoints.py | 2 +- .../cypher/test_unit_k1coloring_cypher_endpoints.py | 2 +- .../cypher/test_unit_louvain_cypher_endpoints.py | 2 +- .../cypher/test_unit_pagerank_cypher_endpoints.py | 2 +- .../cypher/test_unit_scc_cypher_endpoints.py | 2 +- .../cypher/test_unit_wcc_cypher_endpoints.py | 2 +- 86 files changed, 96 insertions(+), 94 deletions(-) rename graphdatascience/procedure_surface/api/{ => catalog}/graph_sampling_endpoints.py (95%) create mode 100644 graphdatascience/procedure_surface/api/centrality/__init__.py rename graphdatascience/procedure_surface/api/{ => centrality}/articlerank_endpoints.py (99%) rename graphdatascience/procedure_surface/api/{ => centrality}/articulationpoints_endpoints.py (99%) rename graphdatascience/procedure_surface/api/{ => centrality}/betweenness_endpoints.py (99%) rename graphdatascience/procedure_surface/api/{ => centrality}/celf_endpoints.py (98%) rename graphdatascience/procedure_surface/api/{ => centrality}/closeness_endpoints.py (98%) rename graphdatascience/procedure_surface/api/{ => centrality}/closeness_harmonic_endpoints.py (98%) rename graphdatascience/procedure_surface/api/{ => centrality}/degree_endpoints.py (98%) rename graphdatascience/procedure_surface/api/{ => centrality}/eigenvector_endpoints.py (98%) rename graphdatascience/procedure_surface/api/{ => centrality}/pagerank_endpoints.py (99%) create mode 100644 graphdatascience/procedure_surface/api/community/__init__.py rename graphdatascience/procedure_surface/api/{ => community}/k1coloring_endpoints.py (98%) rename graphdatascience/procedure_surface/api/{ => community}/kcore_endpoints.py (98%) rename graphdatascience/procedure_surface/api/{ => community}/louvain_endpoints.py (98%) rename graphdatascience/procedure_surface/api/{ => community}/scc_endpoints.py (98%) rename graphdatascience/procedure_surface/api/{ => community}/wcc_endpoints.py (98%) create mode 100644 graphdatascience/procedure_surface/api/node_embedding/__init__.py rename graphdatascience/procedure_surface/api/{ => node_embedding}/fastrp_endpoints.py (99%) rename graphdatascience/procedure_surface/api/{ => node_embedding}/graphsage_predict_endpoints.py (100%) rename graphdatascience/procedure_surface/api/{ => node_embedding}/graphsage_train_endpoints.py (100%) rename graphdatascience/procedure_surface/api/{ => node_embedding}/hashgnn_endpoints.py (99%) rename graphdatascience/procedure_surface/api/{ => node_embedding}/node2vec_endpoints.py (99%) diff --git a/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py b/graphdatascience/procedure_surface/api/catalog/graph_sampling_endpoints.py similarity index 95% rename from graphdatascience/procedure_surface/api/graph_sampling_endpoints.py rename to graphdatascience/procedure_surface/api/catalog/graph_sampling_endpoints.py index d49b0dd7f..e47945067 100644 --- a/graphdatascience/procedure_surface/api/graph_sampling_endpoints.py +++ b/graphdatascience/procedure_surface/api/catalog/graph_sampling_endpoints.py @@ -34,9 +34,9 @@ def rwr( """ Random walk with restarts (RWR) samples the graph by taking random walks from a set of start nodes. - On each step of a random walk, there is a probability that the walk stops, and a new walk from one of the start - nodes starts instead (i.e. the walk restarts). Each node visited on these walks will be part of the sampled - subgraph. The resulting subgraph is stored as a new graph in the Graph Catalog. + On each step of a random walk, there is a probability that the walk stops, and a new walk from one of the start + nodes starts instead (i.e. the walk restarts). Each node visited on these walks will be part of the sampled + subgraph. The resulting subgraph is stored as a new graph in the Graph Catalog. Parameters ---------- @@ -46,7 +46,7 @@ def rwr( The name of the new graph that is stored in the graph catalog. start_nodes : list of int, optional IDs of the initial set of nodes in the original graph from which the sampling random walks will start. - By default, a single node is chosen uniformly at random. + By default, a single node is chosen uniformly at random. restart_probability : float, optional The probability that a sampling random walk restarts from one of the start nodes. Default is 0.1. diff --git a/graphdatascience/procedure_surface/api/catalog_endpoints.py b/graphdatascience/procedure_surface/api/catalog_endpoints.py index 859d495fc..fb5c66705 100644 --- a/graphdatascience/procedure_surface/api/catalog_endpoints.py +++ b/graphdatascience/procedure_surface/api/catalog_endpoints.py @@ -10,7 +10,7 @@ from graphdatascience.procedure_surface.api.catalog.node_label_endpoints import NodeLabelEndpoints from graphdatascience.procedure_surface.api.catalog.node_properties_endpoints import NodePropertiesEndpoints from graphdatascience.procedure_surface.api.catalog.relationships_endpoints import RelationshipsEndpoints -from graphdatascience.procedure_surface.api.graph_sampling_endpoints import GraphSamplingEndpoints +from graphdatascience.procedure_surface.api.catalog.graph_sampling_endpoints import GraphSamplingEndpoints class CatalogEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/centrality/__init__.py b/graphdatascience/procedure_surface/api/centrality/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/graphdatascience/procedure_surface/api/articlerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py similarity index 99% rename from graphdatascience/procedure_surface/api/articlerank_endpoints.py rename to graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py index d17092362..17cb0a07e 100644 --- a/graphdatascience/procedure_surface/api/articlerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py @@ -8,7 +8,7 @@ from graphdatascience.procedure_surface.api.base_result import BaseResult from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class ArticleRankEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/articulationpoints_endpoints.py b/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py similarity index 99% rename from graphdatascience/procedure_surface/api/articulationpoints_endpoints.py rename to graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py index 5d26871c4..19cece15b 100644 --- a/graphdatascience/procedure_surface/api/articulationpoints_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py @@ -6,7 +6,7 @@ from graphdatascience.procedure_surface.api.base_result import BaseResult from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class ArticulationPointsEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/betweenness_endpoints.py b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py similarity index 99% rename from graphdatascience/procedure_surface/api/betweenness_endpoints.py rename to graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py index fa1a53553..65d46dc07 100644 --- a/graphdatascience/procedure_surface/api/betweenness_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py @@ -8,7 +8,7 @@ from graphdatascience.procedure_surface.api.base_result import BaseResult from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class BetweennessEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/celf_endpoints.py b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/celf_endpoints.py rename to graphdatascience/procedure_surface/api/centrality/celf_endpoints.py index f21b461c6..ad0678552 100644 --- a/graphdatascience/procedure_surface/api/celf_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class CelfEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/closeness_endpoints.py b/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/closeness_endpoints.py rename to graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py index 886fd6ac6..36957ae94 100644 --- a/graphdatascience/procedure_surface/api/closeness_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class ClosenessEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/closeness_harmonic_endpoints.py b/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/closeness_harmonic_endpoints.py rename to graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py index e3068d40b..a882d1b29 100644 --- a/graphdatascience/procedure_surface/api/closeness_harmonic_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class ClosenessHarmonicEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/degree_endpoints.py b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/degree_endpoints.py rename to graphdatascience/procedure_surface/api/centrality/degree_endpoints.py index 8e352f85b..dd4aa1ce9 100644 --- a/graphdatascience/procedure_surface/api/degree_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class DegreeEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/eigenvector_endpoints.py b/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/eigenvector_endpoints.py rename to graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py index f81a021ca..42a8466a3 100644 --- a/graphdatascience/procedure_surface/api/eigenvector_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class EigenvectorEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/pagerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py similarity index 99% rename from graphdatascience/procedure_surface/api/pagerank_endpoints.py rename to graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py index 95551b8fc..dd0c9b170 100644 --- a/graphdatascience/procedure_surface/api/pagerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py @@ -8,7 +8,7 @@ from graphdatascience.procedure_surface.api.base_result import BaseResult from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class PageRankEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/community/__init__.py b/graphdatascience/procedure_surface/api/community/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/graphdatascience/procedure_surface/api/k1coloring_endpoints.py b/graphdatascience/procedure_surface/api/community/k1coloring_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/k1coloring_endpoints.py rename to graphdatascience/procedure_surface/api/community/k1coloring_endpoints.py index b5b53875c..1aeb42b17 100644 --- a/graphdatascience/procedure_surface/api/k1coloring_endpoints.py +++ b/graphdatascience/procedure_surface/api/community/k1coloring_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class K1ColoringEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/kcore_endpoints.py b/graphdatascience/procedure_surface/api/community/kcore_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/kcore_endpoints.py rename to graphdatascience/procedure_surface/api/community/kcore_endpoints.py index 92968a2fa..d0466e660 100644 --- a/graphdatascience/procedure_surface/api/kcore_endpoints.py +++ b/graphdatascience/procedure_surface/api/community/kcore_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class KCoreEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/louvain_endpoints.py b/graphdatascience/procedure_surface/api/community/louvain_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/louvain_endpoints.py rename to graphdatascience/procedure_surface/api/community/louvain_endpoints.py index 7ed68fea7..2664de639 100644 --- a/graphdatascience/procedure_surface/api/louvain_endpoints.py +++ b/graphdatascience/procedure_surface/api/community/louvain_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class LouvainEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/scc_endpoints.py b/graphdatascience/procedure_surface/api/community/scc_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/scc_endpoints.py rename to graphdatascience/procedure_surface/api/community/scc_endpoints.py index 28bd47715..2366d7ea6 100644 --- a/graphdatascience/procedure_surface/api/scc_endpoints.py +++ b/graphdatascience/procedure_surface/api/community/scc_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class SccEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/wcc_endpoints.py b/graphdatascience/procedure_surface/api/community/wcc_endpoints.py similarity index 98% rename from graphdatascience/procedure_surface/api/wcc_endpoints.py rename to graphdatascience/procedure_surface/api/community/wcc_endpoints.py index 0843f2501..a7013d385 100644 --- a/graphdatascience/procedure_surface/api/wcc_endpoints.py +++ b/graphdatascience/procedure_surface/api/community/wcc_endpoints.py @@ -7,8 +7,8 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .base_result import BaseResult -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.base_result import BaseResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class WccEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/model/graphsage_model.py b/graphdatascience/procedure_surface/api/model/graphsage_model.py index 9e1aa65ba..ca2dcffe7 100644 --- a/graphdatascience/procedure_surface/api/model/graphsage_model.py +++ b/graphdatascience/procedure_surface/api/model/graphsage_model.py @@ -7,7 +7,7 @@ from graphdatascience.model.v2.model_api import ModelApi from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 from graphdatascience.procedure_surface.api.estimation_result import EstimationResult -from graphdatascience.procedure_surface.api.graphsage_predict_endpoints import ( +from graphdatascience.procedure_surface.api.node_embedding.graphsage_predict_endpoints import ( GraphSageMutateResult, GraphSagePredictEndpoints, GraphSageWriteResult, diff --git a/graphdatascience/procedure_surface/api/node_embedding/__init__.py b/graphdatascience/procedure_surface/api/node_embedding/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/graphdatascience/procedure_surface/api/fastrp_endpoints.py b/graphdatascience/procedure_surface/api/node_embedding/fastrp_endpoints.py similarity index 99% rename from graphdatascience/procedure_surface/api/fastrp_endpoints.py rename to graphdatascience/procedure_surface/api/node_embedding/fastrp_endpoints.py index edafb6b2d..245a4f3b9 100644 --- a/graphdatascience/procedure_surface/api/fastrp_endpoints.py +++ b/graphdatascience/procedure_surface/api/node_embedding/fastrp_endpoints.py @@ -8,7 +8,7 @@ from graphdatascience.procedure_surface.api.base_result import BaseResult from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class FastRPEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/graphsage_predict_endpoints.py b/graphdatascience/procedure_surface/api/node_embedding/graphsage_predict_endpoints.py similarity index 100% rename from graphdatascience/procedure_surface/api/graphsage_predict_endpoints.py rename to graphdatascience/procedure_surface/api/node_embedding/graphsage_predict_endpoints.py diff --git a/graphdatascience/procedure_surface/api/graphsage_train_endpoints.py b/graphdatascience/procedure_surface/api/node_embedding/graphsage_train_endpoints.py similarity index 100% rename from graphdatascience/procedure_surface/api/graphsage_train_endpoints.py rename to graphdatascience/procedure_surface/api/node_embedding/graphsage_train_endpoints.py diff --git a/graphdatascience/procedure_surface/api/hashgnn_endpoints.py b/graphdatascience/procedure_surface/api/node_embedding/hashgnn_endpoints.py similarity index 99% rename from graphdatascience/procedure_surface/api/hashgnn_endpoints.py rename to graphdatascience/procedure_surface/api/node_embedding/hashgnn_endpoints.py index 0f4dad0bd..1c405d8c6 100644 --- a/graphdatascience/procedure_surface/api/hashgnn_endpoints.py +++ b/graphdatascience/procedure_surface/api/node_embedding/hashgnn_endpoints.py @@ -8,7 +8,7 @@ from graphdatascience.procedure_surface.api.base_result import BaseResult from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class HashGNNEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/api/node2vec_endpoints.py b/graphdatascience/procedure_surface/api/node_embedding/node2vec_endpoints.py similarity index 99% rename from graphdatascience/procedure_surface/api/node2vec_endpoints.py rename to graphdatascience/procedure_surface/api/node_embedding/node2vec_endpoints.py index db6714ca7..7ea26fb99 100644 --- a/graphdatascience/procedure_surface/api/node2vec_endpoints.py +++ b/graphdatascience/procedure_surface/api/node_embedding/node2vec_endpoints.py @@ -8,7 +8,7 @@ from graphdatascience.procedure_surface.api.base_result import BaseResult from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from .estimation_result import EstimationResult +from graphdatascience.procedure_surface.api.estimation_result import EstimationResult class Node2VecEndpoints(ABC): diff --git a/graphdatascience/procedure_surface/arrow/articlerank_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/articlerank_arrow_endpoints.py index b4cc734ca..4c356f073 100644 --- a/graphdatascience/procedure_surface/arrow/articlerank_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/articlerank_arrow_endpoints.py @@ -6,7 +6,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient -from ..api.articlerank_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.articlerank_endpoints import ( ArticleRankEndpoints, ArticleRankMutateResult, ArticleRankStatsResult, diff --git a/graphdatascience/procedure_surface/arrow/articulationpoints_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/articulationpoints_arrow_endpoints.py index b9bac58a3..f37a87e7c 100644 --- a/graphdatascience/procedure_surface/arrow/articulationpoints_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/articulationpoints_arrow_endpoints.py @@ -6,7 +6,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient -from ..api.articulationpoints_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.articulationpoints_endpoints import ( ArticulationPointsEndpoints, ArticulationPointsMutateResult, ArticulationPointsStatsResult, diff --git a/graphdatascience/procedure_surface/arrow/betweenness_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/betweenness_arrow_endpoints.py index d9f72ffa6..d25c33a50 100644 --- a/graphdatascience/procedure_surface/arrow/betweenness_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/betweenness_arrow_endpoints.py @@ -6,7 +6,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient -from ..api.betweenness_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.betweenness_endpoints import ( BetweennessEndpoints, BetweennessMutateResult, BetweennessStatsResult, diff --git a/graphdatascience/procedure_surface/arrow/catalog_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/catalog_arrow_endpoints.py index bd129a1d8..0ca08089d 100644 --- a/graphdatascience/procedure_surface/arrow/catalog_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/catalog_arrow_endpoints.py @@ -18,7 +18,7 @@ GraphWithGenerationStats, RelationshipPropertySpec, ) -from graphdatascience.procedure_surface.api.graph_sampling_endpoints import GraphSamplingEndpoints +from graphdatascience.procedure_surface.api.catalog.graph_sampling_endpoints import GraphSamplingEndpoints from graphdatascience.procedure_surface.arrow.catalog.graph_backend_arrow import get_graph from graphdatascience.procedure_surface.arrow.catalog.graph_ops_arrow import GraphOpsArrow from graphdatascience.procedure_surface.arrow.catalog.node_label_arrow_endpoints import NodeLabelArrowEndpoints diff --git a/graphdatascience/procedure_surface/arrow/celf_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/celf_arrow_endpoints.py index 355c4a11e..c0bb0edc3 100644 --- a/graphdatascience/procedure_surface/arrow/celf_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/celf_arrow_endpoints.py @@ -6,7 +6,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient -from ..api.celf_endpoints import CelfEndpoints, CelfMutateResult, CelfStatsResult, CelfWriteResult +from graphdatascience.procedure_surface.api.centrality.celf_endpoints import CelfEndpoints, CelfMutateResult, CelfStatsResult, CelfWriteResult from ..api.estimation_result import EstimationResult from .node_property_endpoints import NodePropertyEndpoints diff --git a/graphdatascience/procedure_surface/arrow/closeness_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/closeness_arrow_endpoints.py index fbf72cab2..4a066a567 100644 --- a/graphdatascience/procedure_surface/arrow/closeness_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/closeness_arrow_endpoints.py @@ -6,7 +6,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient -from ..api.closeness_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.closeness_endpoints import ( ClosenessEndpoints, ClosenessMutateResult, ClosenessStatsResult, diff --git a/graphdatascience/procedure_surface/arrow/closeness_harmonic_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/closeness_harmonic_arrow_endpoints.py index cad3a2542..c128d8c30 100644 --- a/graphdatascience/procedure_surface/arrow/closeness_harmonic_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/closeness_harmonic_arrow_endpoints.py @@ -6,7 +6,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient -from ..api.closeness_harmonic_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.closeness_harmonic_endpoints import ( ClosenessHarmonicEndpoints, ClosenessHarmonicMutateResult, ClosenessHarmonicStatsResult, diff --git a/graphdatascience/procedure_surface/arrow/degree_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/degree_arrow_endpoints.py index 686bdaf9e..639bc70c5 100644 --- a/graphdatascience/procedure_surface/arrow/degree_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/degree_arrow_endpoints.py @@ -6,7 +6,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient -from ..api.degree_endpoints import DegreeEndpoints, DegreeMutateResult, DegreeStatsResult, DegreeWriteResult +from graphdatascience.procedure_surface.api.centrality.degree_endpoints import DegreeEndpoints, DegreeMutateResult, DegreeStatsResult, DegreeWriteResult from ..api.estimation_result import EstimationResult from .node_property_endpoints import NodePropertyEndpoints diff --git a/graphdatascience/procedure_surface/arrow/eigenvector_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/eigenvector_arrow_endpoints.py index 09a7ea3d7..e7f8564f3 100644 --- a/graphdatascience/procedure_surface/arrow/eigenvector_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/eigenvector_arrow_endpoints.py @@ -6,7 +6,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient -from ..api.eigenvector_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.eigenvector_endpoints import ( EigenvectorEndpoints, EigenvectorMutateResult, EigenvectorStatsResult, diff --git a/graphdatascience/procedure_surface/arrow/fastrp_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/fastrp_arrow_endpoints.py index b742e0d4c..485396775 100644 --- a/graphdatascience/procedure_surface/arrow/fastrp_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/fastrp_arrow_endpoints.py @@ -7,7 +7,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient from ..api.estimation_result import EstimationResult -from ..api.fastrp_endpoints import ( +from graphdatascience.procedure_surface.api.node_embedding.fastrp_endpoints import ( FastRPEndpoints, FastRPMutateResult, FastRPStatsResult, diff --git a/graphdatascience/procedure_surface/arrow/graph_sampling_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/graph_sampling_arrow_endpoints.py index 746db16ee..35c7a9ed5 100644 --- a/graphdatascience/procedure_surface/arrow/graph_sampling_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/graph_sampling_arrow_endpoints.py @@ -5,7 +5,7 @@ from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient from graphdatascience.arrow_client.v2.job_client import JobClient from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.graph_sampling_endpoints import ( +from graphdatascience.procedure_surface.api.catalog.graph_sampling_endpoints import ( GraphSamplingEndpoints, GraphSamplingResult, GraphWithSamplingResult, diff --git a/graphdatascience/procedure_surface/arrow/graphsage_predict_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/graphsage_predict_arrow_endpoints.py index ef4cf207e..df0c493fb 100644 --- a/graphdatascience/procedure_surface/arrow/graphsage_predict_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/graphsage_predict_arrow_endpoints.py @@ -4,7 +4,7 @@ from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 from graphdatascience.procedure_surface.api.estimation_result import EstimationResult -from graphdatascience.procedure_surface.api.graphsage_predict_endpoints import ( +from graphdatascience.procedure_surface.api.node_embedding.graphsage_predict_endpoints import ( GraphSageMutateResult, GraphSagePredictEndpoints, GraphSageWriteResult, diff --git a/graphdatascience/procedure_surface/arrow/graphsage_train_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/graphsage_train_arrow_endpoints.py index 3585e6346..72dc3cda4 100644 --- a/graphdatascience/procedure_surface/arrow/graphsage_train_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/graphsage_train_arrow_endpoints.py @@ -5,7 +5,7 @@ from graphdatascience.procedure_surface.arrow.graphsage_predict_arrow_endpoints import GraphSagePredictArrowEndpoints from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient -from ..api.graphsage_train_endpoints import ( +from graphdatascience.procedure_surface.api.node_embedding.graphsage_train_endpoints import ( GraphSageTrainEndpoints, GraphSageTrainResult, ) diff --git a/graphdatascience/procedure_surface/arrow/hashgnn_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/hashgnn_arrow_endpoints.py index 28d863d04..c38e064f3 100644 --- a/graphdatascience/procedure_surface/arrow/hashgnn_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/hashgnn_arrow_endpoints.py @@ -7,7 +7,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient from ..api.estimation_result import EstimationResult -from ..api.hashgnn_endpoints import ( +from graphdatascience.procedure_surface.api.node_embedding.hashgnn_endpoints import ( HashGNNEndpoints, HashGNNMutateResult, HashGNNWriteResult, diff --git a/graphdatascience/procedure_surface/arrow/k1coloring_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/k1coloring_arrow_endpoints.py index 134e67b28..9cef8ba20 100644 --- a/graphdatascience/procedure_surface/arrow/k1coloring_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/k1coloring_arrow_endpoints.py @@ -7,7 +7,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient from ..api.estimation_result import EstimationResult -from ..api.k1coloring_endpoints import ( +from graphdatascience.procedure_surface.api.community.k1coloring_endpoints import ( K1ColoringEndpoints, K1ColoringMutateResult, K1ColoringStatsResult, diff --git a/graphdatascience/procedure_surface/arrow/kcore_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/kcore_arrow_endpoints.py index 9f182c491..1f9991985 100644 --- a/graphdatascience/procedure_surface/arrow/kcore_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/kcore_arrow_endpoints.py @@ -7,7 +7,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient from ..api.estimation_result import EstimationResult -from ..api.kcore_endpoints import KCoreEndpoints, KCoreMutateResult, KCoreStatsResult, KCoreWriteResult +from graphdatascience.procedure_surface.api.community.kcore_endpoints import KCoreEndpoints, KCoreMutateResult, KCoreStatsResult, KCoreWriteResult from .node_property_endpoints import NodePropertyEndpoints diff --git a/graphdatascience/procedure_surface/arrow/louvain_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/louvain_arrow_endpoints.py index 39fd1ccf2..99508ba48 100644 --- a/graphdatascience/procedure_surface/arrow/louvain_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/louvain_arrow_endpoints.py @@ -7,7 +7,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient from ..api.estimation_result import EstimationResult -from ..api.louvain_endpoints import LouvainEndpoints, LouvainMutateResult, LouvainStatsResult, LouvainWriteResult +from graphdatascience.procedure_surface.api.community.louvain_endpoints import LouvainEndpoints, LouvainMutateResult, LouvainStatsResult, LouvainWriteResult from .node_property_endpoints import NodePropertyEndpoints diff --git a/graphdatascience/procedure_surface/arrow/node2vec_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/node2vec_arrow_endpoints.py index 0da64cab6..b44b47f9a 100644 --- a/graphdatascience/procedure_surface/arrow/node2vec_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/node2vec_arrow_endpoints.py @@ -7,7 +7,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient from ..api.estimation_result import EstimationResult -from ..api.node2vec_endpoints import Node2VecEndpoints, Node2VecMutateResult, Node2VecWriteResult +from graphdatascience.procedure_surface.api.node_embedding.node2vec_endpoints import Node2VecEndpoints, Node2VecMutateResult, Node2VecWriteResult from .node_property_endpoints import NodePropertyEndpoints diff --git a/graphdatascience/procedure_surface/arrow/pagerank_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/pagerank_arrow_endpoints.py index f5ed916ea..57e2a8633 100644 --- a/graphdatascience/procedure_surface/arrow/pagerank_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/pagerank_arrow_endpoints.py @@ -7,7 +7,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient from ..api.estimation_result import EstimationResult -from ..api.pagerank_endpoints import PageRankEndpoints, PageRankMutateResult, PageRankStatsResult, PageRankWriteResult +from graphdatascience.procedure_surface.api.centrality.pagerank_endpoints import PageRankEndpoints, PageRankMutateResult, PageRankStatsResult, PageRankWriteResult from .node_property_endpoints import NodePropertyEndpoints diff --git a/graphdatascience/procedure_surface/arrow/scc_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/scc_arrow_endpoints.py index 811d63e1e..a3a0d3e1d 100644 --- a/graphdatascience/procedure_surface/arrow/scc_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/scc_arrow_endpoints.py @@ -7,7 +7,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient from ..api.estimation_result import EstimationResult -from ..api.scc_endpoints import SccEndpoints, SccMutateResult, SccStatsResult, SccWriteResult +from graphdatascience.procedure_surface.api.community.scc_endpoints import SccEndpoints, SccMutateResult, SccStatsResult, SccWriteResult from .node_property_endpoints import NodePropertyEndpoints diff --git a/graphdatascience/procedure_surface/arrow/wcc_arrow_endpoints.py b/graphdatascience/procedure_surface/arrow/wcc_arrow_endpoints.py index 105668c7c..9e1fa3aa7 100644 --- a/graphdatascience/procedure_surface/arrow/wcc_arrow_endpoints.py +++ b/graphdatascience/procedure_surface/arrow/wcc_arrow_endpoints.py @@ -7,7 +7,7 @@ from ...arrow_client.authenticated_flight_client import AuthenticatedArrowClient from ...arrow_client.v2.remote_write_back_client import RemoteWriteBackClient from ..api.estimation_result import EstimationResult -from ..api.wcc_endpoints import WccEndpoints, WccMutateResult, WccStatsResult, WccWriteResult +from graphdatascience.procedure_surface.api.community.wcc_endpoints import WccEndpoints, WccMutateResult, WccStatsResult, WccWriteResult from .node_property_endpoints import NodePropertyEndpoints diff --git a/graphdatascience/procedure_surface/cypher/articlerank_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/articlerank_cypher_endpoints.py index 53552ade0..bdb0b351d 100644 --- a/graphdatascience/procedure_surface/cypher/articlerank_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/articlerank_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.articlerank_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.articlerank_endpoints import ( ArticleRankEndpoints, ArticleRankMutateResult, ArticleRankStatsResult, diff --git a/graphdatascience/procedure_surface/cypher/articulationpoints_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/articulationpoints_cypher_endpoints.py index 6e795f978..6859e8536 100644 --- a/graphdatascience/procedure_surface/cypher/articulationpoints_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/articulationpoints_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.articulationpoints_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.articulationpoints_endpoints import ( ArticulationPointsEndpoints, ArticulationPointsMutateResult, ArticulationPointsStatsResult, diff --git a/graphdatascience/procedure_surface/cypher/betweenness_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/betweenness_cypher_endpoints.py index ab6c47b50..658ca666a 100644 --- a/graphdatascience/procedure_surface/cypher/betweenness_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/betweenness_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.betweenness_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.betweenness_endpoints import ( BetweennessEndpoints, BetweennessMutateResult, BetweennessStatsResult, diff --git a/graphdatascience/procedure_surface/cypher/catalog_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/catalog_cypher_endpoints.py index 5b44ff486..13913e305 100644 --- a/graphdatascience/procedure_surface/cypher/catalog_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/catalog_cypher_endpoints.py @@ -10,7 +10,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.base_result import BaseResult -from ..api.catalog_endpoints import ( +from graphdatascience.procedure_surface.api.catalog_endpoints import ( CatalogEndpoints, GraphFilterResult, GraphGenerationStats, @@ -18,7 +18,7 @@ GraphWithGenerationStats, RelationshipPropertySpec, ) -from ..api.graph_sampling_endpoints import GraphSamplingEndpoints +from graphdatascience.procedure_surface.api.catalog.graph_sampling_endpoints import GraphSamplingEndpoints from ..utils.config_converter import ConfigConverter from .catalog.node_label_cypher_endpoints import NodeLabelCypherEndpoints from .catalog.node_properties_cypher_endpoints import NodePropertiesCypherEndpoints diff --git a/graphdatascience/procedure_surface/cypher/celf_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/celf_cypher_endpoints.py index 3452bd6b3..95691a0ca 100644 --- a/graphdatascience/procedure_surface/cypher/celf_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/celf_cypher_endpoints.py @@ -6,7 +6,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.celf_endpoints import CelfEndpoints, CelfMutateResult, CelfStatsResult, CelfWriteResult +from graphdatascience.procedure_surface.api.centrality.celf_endpoints import CelfEndpoints, CelfMutateResult, CelfStatsResult, CelfWriteResult from ..api.estimation_result import EstimationResult from ..utils.config_converter import ConfigConverter from .estimation_utils import estimate_algorithm diff --git a/graphdatascience/procedure_surface/cypher/closeness_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/closeness_cypher_endpoints.py index caa9c6194..4094f0a81 100644 --- a/graphdatascience/procedure_surface/cypher/closeness_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/closeness_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.closeness_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.closeness_endpoints import ( ClosenessEndpoints, ClosenessMutateResult, ClosenessStatsResult, diff --git a/graphdatascience/procedure_surface/cypher/closeness_harmonic_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/closeness_harmonic_cypher_endpoints.py index 1dc348f4a..99c08ff79 100644 --- a/graphdatascience/procedure_surface/cypher/closeness_harmonic_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/closeness_harmonic_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.closeness_harmonic_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.closeness_harmonic_endpoints import ( ClosenessHarmonicEndpoints, ClosenessHarmonicMutateResult, ClosenessHarmonicStatsResult, diff --git a/graphdatascience/procedure_surface/cypher/degree_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/degree_cypher_endpoints.py index 8c5d9b9c6..bf19d6b06 100644 --- a/graphdatascience/procedure_surface/cypher/degree_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/degree_cypher_endpoints.py @@ -6,7 +6,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.degree_endpoints import DegreeEndpoints, DegreeMutateResult, DegreeStatsResult, DegreeWriteResult +from graphdatascience.procedure_surface.api.centrality.degree_endpoints import DegreeEndpoints, DegreeMutateResult, DegreeStatsResult, DegreeWriteResult from ..api.estimation_result import EstimationResult from ..utils.config_converter import ConfigConverter from .estimation_utils import estimate_algorithm diff --git a/graphdatascience/procedure_surface/cypher/eigenvector_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/eigenvector_cypher_endpoints.py index 6e44ff323..451ebf5b0 100644 --- a/graphdatascience/procedure_surface/cypher/eigenvector_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/eigenvector_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.eigenvector_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.eigenvector_endpoints import ( EigenvectorEndpoints, EigenvectorMutateResult, EigenvectorStatsResult, diff --git a/graphdatascience/procedure_surface/cypher/fastrp_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/fastrp_cypher_endpoints.py index 9fd2eb9d9..c2000f150 100644 --- a/graphdatascience/procedure_surface/cypher/fastrp_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/fastrp_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.estimation_result import EstimationResult -from ..api.fastrp_endpoints import ( +from graphdatascience.procedure_surface.api.node_embedding.fastrp_endpoints import ( FastRPEndpoints, FastRPMutateResult, FastRPStatsResult, diff --git a/graphdatascience/procedure_surface/cypher/graph_sampling_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/graph_sampling_cypher_endpoints.py index ed9187e61..cda932632 100644 --- a/graphdatascience/procedure_surface/cypher/graph_sampling_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/graph_sampling_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.graph_sampling_endpoints import GraphSamplingEndpoints, GraphSamplingResult, GraphWithSamplingResult +from graphdatascience.procedure_surface.api.catalog.graph_sampling_endpoints import GraphSamplingEndpoints, GraphSamplingResult, GraphWithSamplingResult from ..utils.config_converter import ConfigConverter diff --git a/graphdatascience/procedure_surface/cypher/graphsage_predict_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/graphsage_predict_cypher_endpoints.py index 2d0c0e00a..b0519b251 100644 --- a/graphdatascience/procedure_surface/cypher/graphsage_predict_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/graphsage_predict_cypher_endpoints.py @@ -5,7 +5,7 @@ from graphdatascience.call_parameters import CallParameters from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 from graphdatascience.procedure_surface.api.estimation_result import EstimationResult -from graphdatascience.procedure_surface.api.graphsage_predict_endpoints import ( +from graphdatascience.procedure_surface.api.node_embedding.graphsage_predict_endpoints import ( GraphSageMutateResult, GraphSagePredictEndpoints, GraphSageWriteResult, diff --git a/graphdatascience/procedure_surface/cypher/graphsage_train_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/graphsage_train_cypher_endpoints.py index d550e50f7..e663d34ed 100644 --- a/graphdatascience/procedure_surface/cypher/graphsage_train_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/graphsage_train_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner -from ..api.graphsage_train_endpoints import ( +from graphdatascience.procedure_surface.api.node_embedding.graphsage_train_endpoints import ( GraphSageTrainEndpoints, GraphSageTrainResult, ) diff --git a/graphdatascience/procedure_surface/cypher/hashgnn_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/hashgnn_cypher_endpoints.py index b6f496e91..e01a2ee57 100644 --- a/graphdatascience/procedure_surface/cypher/hashgnn_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/hashgnn_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.estimation_result import EstimationResult -from ..api.hashgnn_endpoints import ( +from graphdatascience.procedure_surface.api.node_embedding.hashgnn_endpoints import ( HashGNNEndpoints, HashGNNMutateResult, HashGNNWriteResult, diff --git a/graphdatascience/procedure_surface/cypher/k1coloring_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/k1coloring_cypher_endpoints.py index e3a29cbd5..900b713ee 100644 --- a/graphdatascience/procedure_surface/cypher/k1coloring_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/k1coloring_cypher_endpoints.py @@ -8,7 +8,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.estimation_result import EstimationResult -from ..api.k1coloring_endpoints import ( +from graphdatascience.procedure_surface.api.community.k1coloring_endpoints import ( K1ColoringEndpoints, K1ColoringMutateResult, K1ColoringStatsResult, diff --git a/graphdatascience/procedure_surface/cypher/kcore_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/kcore_cypher_endpoints.py index 81ed4e09f..ce9b3706e 100644 --- a/graphdatascience/procedure_surface/cypher/kcore_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/kcore_cypher_endpoints.py @@ -8,7 +8,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.estimation_result import EstimationResult -from ..api.kcore_endpoints import KCoreEndpoints, KCoreMutateResult, KCoreStatsResult, KCoreWriteResult +from graphdatascience.procedure_surface.api.community.kcore_endpoints import KCoreEndpoints, KCoreMutateResult, KCoreStatsResult, KCoreWriteResult from ..utils.config_converter import ConfigConverter diff --git a/graphdatascience/procedure_surface/cypher/louvain_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/louvain_cypher_endpoints.py index 80d9434f0..f1e510f1e 100644 --- a/graphdatascience/procedure_surface/cypher/louvain_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/louvain_cypher_endpoints.py @@ -8,7 +8,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.estimation_result import EstimationResult -from ..api.louvain_endpoints import LouvainEndpoints, LouvainMutateResult, LouvainStatsResult, LouvainWriteResult +from graphdatascience.procedure_surface.api.community.louvain_endpoints import LouvainEndpoints, LouvainMutateResult, LouvainStatsResult, LouvainWriteResult from ..utils.config_converter import ConfigConverter diff --git a/graphdatascience/procedure_surface/cypher/node2vec_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/node2vec_cypher_endpoints.py index 0ba0c8c29..39532479f 100644 --- a/graphdatascience/procedure_surface/cypher/node2vec_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/node2vec_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.estimation_result import EstimationResult -from ..api.node2vec_endpoints import Node2VecEndpoints, Node2VecMutateResult, Node2VecWriteResult +from graphdatascience.procedure_surface.api.node_embedding.node2vec_endpoints import Node2VecEndpoints, Node2VecMutateResult, Node2VecWriteResult from ..utils.config_converter import ConfigConverter diff --git a/graphdatascience/procedure_surface/cypher/pagerank_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/pagerank_cypher_endpoints.py index c8482fec2..64001ffa3 100644 --- a/graphdatascience/procedure_surface/cypher/pagerank_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/pagerank_cypher_endpoints.py @@ -7,7 +7,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.estimation_result import EstimationResult -from ..api.pagerank_endpoints import PageRankEndpoints, PageRankMutateResult, PageRankStatsResult, PageRankWriteResult +from graphdatascience.procedure_surface.api.centrality.pagerank_endpoints import PageRankEndpoints, PageRankMutateResult, PageRankStatsResult, PageRankWriteResult from ..utils.config_converter import ConfigConverter from .estimation_utils import estimate_algorithm diff --git a/graphdatascience/procedure_surface/cypher/scc_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/scc_cypher_endpoints.py index d59857d05..0c17b2d4f 100644 --- a/graphdatascience/procedure_surface/cypher/scc_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/scc_cypher_endpoints.py @@ -8,7 +8,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.estimation_result import EstimationResult -from ..api.scc_endpoints import SccEndpoints, SccMutateResult, SccStatsResult, SccWriteResult +from graphdatascience.procedure_surface.api.community.scc_endpoints import SccEndpoints, SccMutateResult, SccStatsResult, SccWriteResult from ..utils.config_converter import ConfigConverter diff --git a/graphdatascience/procedure_surface/cypher/wcc_cypher_endpoints.py b/graphdatascience/procedure_surface/cypher/wcc_cypher_endpoints.py index 1cfb48871..9ce47ae3a 100644 --- a/graphdatascience/procedure_surface/cypher/wcc_cypher_endpoints.py +++ b/graphdatascience/procedure_surface/cypher/wcc_cypher_endpoints.py @@ -8,7 +8,7 @@ from ...call_parameters import CallParameters from ...query_runner.query_runner import QueryRunner from ..api.estimation_result import EstimationResult -from ..api.wcc_endpoints import WccEndpoints, WccMutateResult, WccStatsResult, WccWriteResult +from graphdatascience.procedure_surface.api.community.wcc_endpoints import WccEndpoints, WccMutateResult, WccStatsResult, WccWriteResult from ..utils.config_converter import ConfigConverter diff --git a/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_articulationpoints_arrow_endpoints.py b/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_articulationpoints_arrow_endpoints.py index 514df3d45..5efe8e341 100644 --- a/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_articulationpoints_arrow_endpoints.py +++ b/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_articulationpoints_arrow_endpoints.py @@ -3,7 +3,7 @@ import pytest from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient -from graphdatascience.procedure_surface.api.articulationpoints_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.articulationpoints_endpoints import ( ArticulationPointsMutateResult, ArticulationPointsStatsResult, ) diff --git a/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_betweenness_arrow_endpoints.py b/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_betweenness_arrow_endpoints.py index 6b84752b0..99d424134 100644 --- a/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_betweenness_arrow_endpoints.py +++ b/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_betweenness_arrow_endpoints.py @@ -3,7 +3,7 @@ import pytest from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient -from graphdatascience.procedure_surface.api.betweenness_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.betweenness_endpoints import ( BetweennessMutateResult, BetweennessStatsResult, ) diff --git a/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_scc_arrow_endpoints.py b/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_scc_arrow_endpoints.py index d5c8a7ce5..ef0d2d5bd 100644 --- a/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_scc_arrow_endpoints.py +++ b/graphdatascience/tests/integrationV2/procedure_surface/arrow/test_scc_arrow_endpoints.py @@ -4,7 +4,7 @@ from graphdatascience.arrow_client.authenticated_flight_client import AuthenticatedArrowClient from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.scc_endpoints import SccMutateResult, SccStatsResult +from graphdatascience.procedure_surface.api.community.scc_endpoints import SccMutateResult, SccStatsResult from graphdatascience.procedure_surface.arrow.scc_arrow_endpoints import SccArrowEndpoints from graphdatascience.tests.integrationV2.procedure_surface.arrow.graph_creation_helper import create_graph diff --git a/graphdatascience/tests/integrationV2/procedure_surface/cypher/test_articulationpoints_cypher_endpoints.py b/graphdatascience/tests/integrationV2/procedure_surface/cypher/test_articulationpoints_cypher_endpoints.py index a1fa04922..10fefe969 100644 --- a/graphdatascience/tests/integrationV2/procedure_surface/cypher/test_articulationpoints_cypher_endpoints.py +++ b/graphdatascience/tests/integrationV2/procedure_surface/cypher/test_articulationpoints_cypher_endpoints.py @@ -3,7 +3,7 @@ import pytest from pandas import DataFrame -from graphdatascience.procedure_surface.api.articulationpoints_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.articulationpoints_endpoints import ( ArticulationPointsMutateResult, ArticulationPointsStatsResult, ArticulationPointsWriteResult, diff --git a/graphdatascience/tests/integrationV2/procedure_surface/cypher/test_scc_cypher_endpoints.py b/graphdatascience/tests/integrationV2/procedure_surface/cypher/test_scc_cypher_endpoints.py index 184d87c2b..b3a5d4ec2 100644 --- a/graphdatascience/tests/integrationV2/procedure_surface/cypher/test_scc_cypher_endpoints.py +++ b/graphdatascience/tests/integrationV2/procedure_surface/cypher/test_scc_cypher_endpoints.py @@ -4,7 +4,7 @@ from graphdatascience import QueryRunner from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.scc_endpoints import SccMutateResult, SccStatsResult, SccWriteResult +from graphdatascience.procedure_surface.api.community.scc_endpoints import SccMutateResult, SccStatsResult, SccWriteResult from graphdatascience.procedure_surface.cypher.scc_cypher_endpoints import SccCypherEndpoints from graphdatascience.tests.integrationV2.procedure_surface.cypher.cypher_graph_helper import create_graph diff --git a/graphdatascience/tests/integrationV2/procedure_surface/session/test_walking_skeleton.py b/graphdatascience/tests/integrationV2/procedure_surface/session/test_walking_skeleton.py index 9ed81668a..7b2498557 100644 --- a/graphdatascience/tests/integrationV2/procedure_surface/session/test_walking_skeleton.py +++ b/graphdatascience/tests/integrationV2/procedure_surface/session/test_walking_skeleton.py @@ -53,3 +53,5 @@ def test_walking_skeleton(gds: AuraGraphDataScience) -> None: drop_result = gds.v2.graph.node_properties.drop(G, node_properties=["wcc"]) assert drop_result.properties_removed == 2 + + gds.v2.graph.sample.rwr() diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_articlerank_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_articlerank_cypher_endpoints.py index d9d27fe50..26b213890 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_articlerank_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_articlerank_cypher_endpoints.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from graphdatascience.procedure_surface.api.articlerank_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.articlerank_endpoints import ( ArticleRankMutateResult, ArticleRankStatsResult, ArticleRankWriteResult, diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_articulationpoints_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_articulationpoints_cypher_endpoints.py index 50b76743a..c703c516c 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_articulationpoints_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_articulationpoints_cypher_endpoints.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from graphdatascience.procedure_surface.api.articulationpoints_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.articulationpoints_endpoints import ( ArticulationPointsMutateResult, ArticulationPointsStatsResult, ArticulationPointsWriteResult, diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_betweenness_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_betweenness_cypher_endpoints.py index 956c67dca..1bbfe207e 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_betweenness_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_betweenness_cypher_endpoints.py @@ -1,7 +1,7 @@ import pandas as pd import pytest -from graphdatascience.procedure_surface.api.betweenness_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.betweenness_endpoints import ( BetweennessMutateResult, BetweennessStatsResult, BetweennessWriteResult, diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_celf_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_celf_cypher_endpoints.py index 6b29c0a68..3b1660660 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_celf_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_celf_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.celf_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.celf_endpoints import ( CelfMutateResult, CelfStatsResult, CelfWriteResult, diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_closeness_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_closeness_cypher_endpoints.py index 1496fdf81..abc76ea68 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_closeness_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_closeness_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.closeness_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.closeness_endpoints import ( ClosenessStatsResult, ClosenessWriteResult, ) diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_closeness_harmonic_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_closeness_harmonic_cypher_endpoints.py index 2bb65b864..30fc67814 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_closeness_harmonic_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_closeness_harmonic_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.closeness_harmonic_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.closeness_harmonic_endpoints import ( ClosenessHarmonicStatsResult, ClosenessHarmonicWriteResult, ) diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_degree_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_degree_cypher_endpoints.py index 976f109f1..566fd1337 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_degree_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_degree_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.degree_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.degree_endpoints import ( DegreeMutateResult, DegreeStatsResult, DegreeWriteResult, diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_eigenvector_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_eigenvector_cypher_endpoints.py index 436845983..103c2d855 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_eigenvector_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_eigenvector_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.eigenvector_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.eigenvector_endpoints import ( EigenvectorMutateResult, EigenvectorStatsResult, EigenvectorWriteResult, diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_k1coloring_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_k1coloring_cypher_endpoints.py index 054047de3..3848d8a58 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_k1coloring_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_k1coloring_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.k1coloring_endpoints import ( +from graphdatascience.procedure_surface.api.community.k1coloring_endpoints import ( K1ColoringMutateResult, K1ColoringStatsResult, K1ColoringWriteResult, diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_louvain_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_louvain_cypher_endpoints.py index a54ad2f28..d95468829 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_louvain_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_louvain_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.louvain_endpoints import ( +from graphdatascience.procedure_surface.api.community.louvain_endpoints import ( LouvainMutateResult, LouvainStatsResult, LouvainWriteResult, diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_pagerank_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_pagerank_cypher_endpoints.py index 5a720004b..570641e9d 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_pagerank_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_pagerank_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.pagerank_endpoints import ( +from graphdatascience.procedure_surface.api.centrality.pagerank_endpoints import ( PageRankMutateResult, PageRankStatsResult, PageRankWriteResult, diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_scc_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_scc_cypher_endpoints.py index 72359b49f..ce5c26877 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_scc_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_scc_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.scc_endpoints import SccMutateResult, SccStatsResult, SccWriteResult +from graphdatascience.procedure_surface.api.community.scc_endpoints import SccMutateResult, SccStatsResult, SccWriteResult from graphdatascience.procedure_surface.cypher.catalog.graph_backend_cypher import get_graph from graphdatascience.procedure_surface.cypher.scc_cypher_endpoints import SccCypherEndpoints from graphdatascience.tests.unit.conftest import DEFAULT_SERVER_VERSION, CollectingQueryRunner diff --git a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_wcc_cypher_endpoints.py b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_wcc_cypher_endpoints.py index efdea2297..ba82dc01a 100644 --- a/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_wcc_cypher_endpoints.py +++ b/graphdatascience/tests/unit/procedure_surface/cypher/test_unit_wcc_cypher_endpoints.py @@ -2,7 +2,7 @@ import pytest from graphdatascience.procedure_surface.api.catalog.graph_api import GraphV2 -from graphdatascience.procedure_surface.api.wcc_endpoints import WccMutateResult, WccStatsResult, WccWriteResult +from graphdatascience.procedure_surface.api.community.wcc_endpoints import WccMutateResult, WccStatsResult, WccWriteResult from graphdatascience.procedure_surface.cypher.catalog.graph_backend_cypher import get_graph from graphdatascience.procedure_surface.cypher.wcc_cypher_endpoints import WccCypherEndpoints from graphdatascience.tests.unit.conftest import DEFAULT_SERVER_VERSION, CollectingQueryRunner From 8ee4318730f118988d1b9a7e6a46a8b8197233b8 Mon Sep 17 00:00:00 2001 From: Mats Rydberg Date: Thu, 18 Sep 2025 16:34:22 +0200 Subject: [PATCH 4/7] Centrality mutate docstrings --- .../api/centrality/articlerank_endpoints.py | 6 +++++- .../api/centrality/articulationpoints_endpoints.py | 5 ++++- .../api/centrality/betweenness_endpoints.py | 7 ++++++- .../procedure_surface/api/centrality/celf_endpoints.py | 4 +++- .../api/centrality/closeness_endpoints.py | 6 +++++- .../api/centrality/closeness_harmonic_endpoints.py | 5 ++++- .../procedure_surface/api/centrality/degree_endpoints.py | 7 ++++++- .../api/centrality/eigenvector_endpoints.py | 7 ++++++- .../procedure_surface/api/centrality/pagerank_endpoints.py | 5 ++++- 9 files changed, 43 insertions(+), 9 deletions(-) diff --git a/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py index 17cb0a07e..20c1a83c8 100644 --- a/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py @@ -36,7 +36,11 @@ def mutate( source_nodes: Optional[Any] = None, ) -> ArticleRankMutateResult: """ - Executes the ArticleRank algorithm and writes the results back to the graph as a node property. + Runs the Article Rank algorithm and stores the results in the graph catalog as a new node property. + + ArticleRank is a variant of the Page Rank algorithm, which measures the transitive influence of nodes. + Page Rank follows the assumption that relationships originating from low-degree nodes have a higher influence than relationships from high-degree nodes. + Article Rank lowers the influence of low-degree nodes by lowering the scores being sent to their neighbors in each iteration. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py b/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py index 19cece15b..b4ca42e78 100644 --- a/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py @@ -28,7 +28,10 @@ def mutate( job_id: Optional[Any] = None, ) -> "ArticulationPointsMutateResult": """ - Executes the ArticulationPoints algorithm and writes the results to the in-memory graph as node properties. + Runs the Articulation Points algorithm and stores the results in the graph catalog as a new node property. + + Given a graph, an articulation point is a node whose removal increases the number of connected components in the graph. + The Neo4j GDS Library provides an efficient linear time sequential algorithm to compute all articulation points in a graph. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py index 65d46dc07..6baa00623 100644 --- a/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py @@ -33,7 +33,12 @@ def mutate( relationship_weight_property: Optional[str] = None, ) -> BetweennessMutateResult: """ - Executes the Betweenness Centrality algorithm and returns result statistics without persisting the results + Runs the Betweenness Centrality algorithm and stores the results in the graph catalog as a new node property. + + Betweenness centrality is a way of detecting the amount of influence a node has over the flow of information in a graph. + It is often used to find nodes that serve as a bridge from one part of a graph to another. + The algorithm calculates shortest paths between all pairs of nodes in a graph. + Each node receives a score, based on the number of shortest paths that pass through the node. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py index ad0678552..7c5f65a52 100644 --- a/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py @@ -37,7 +37,9 @@ def mutate( job_id: Optional[Any] = None, ) -> CelfMutateResult: """ - Executes the CELF algorithm and writes the results to the in-memory graph as node properties. + Runs the CELF algorithm and stores the results in the graph catalog as a new node property. + + The influence maximization problem asks for a set of k nodes that maximize the expected spread of influence in the network. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py b/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py index 36957ae94..d72e21447 100644 --- a/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py @@ -35,7 +35,11 @@ def mutate( job_id: Optional[Any] = None, ) -> ClosenessMutateResult: """ - Executes the Closeness Centrality algorithm and writes the results to the in-memory graph as node properties. + Runs the Closeness Centrality algorithm and stores the results in the graph catalog as a new node property. + + Closeness centrality is a way of detecting nodes that are able to spread information very efficiently through a graph. + The closeness centrality of a node measures its average farness (inverse distance) to all other nodes. + Nodes with a high closeness score have the shortest distances to all other nodes. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py b/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py index a882d1b29..4987583d6 100644 --- a/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py @@ -34,7 +34,10 @@ def mutate( job_id: Optional[Any] = None, ) -> ClosenessHarmonicMutateResult: """ - Executes the Harmonic Closeness Centrality algorithm and writes the results to the in-memory graph as node properties. + Runs the Harmonic Centrality algorithm and stores the results in the graph catalog as a new node property. + + Harmonic centrality (also known as valued centrality) is a variant of closeness centrality, that was invented to + solve the problem the original formula had when dealing with unconnected graphs. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py index dd4aa1ce9..c1167db1c 100644 --- a/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py @@ -36,7 +36,12 @@ def mutate( relationship_weight_property: Optional[str] = None, ) -> DegreeMutateResult: """ - Executes the Degree Centrality algorithm and writes the results to the in-memory graph as node properties. + Runs the Degree Centrality algorithm and stores the results in the graph catalog as a new node property. + + The Degree Centrality algorithm can be used to find popular nodes within a graph. + The degree centrality measures the number of incoming or outgoing (or both) relationships from a node, which can be defined by the orientation of a relationship projection. + It can be applied to either weighted or unweighted graphs. + In the weighted case the algorithm computes the sum of all positive weights of adjacent relationships of a node, for each node in the graph. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py b/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py index 42a8466a3..2ec3cdd5c 100644 --- a/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py @@ -40,7 +40,12 @@ def mutate( job_id: Optional[Any] = None, ) -> EigenvectorMutateResult: """ - Executes the Eigenvector Centrality algorithm and writes the results to the in-memory graph as node properties. + Runs the Eigenvector Centrality algorithm and stores the results in the graph catalog as a new node property. + + Eigenvector Centrality is an algorithm that measures the transitive influence of nodes. + Relationships originating from high-scoring nodes contribute more to the score of a node than connections from low-scoring nodes. + A high eigenvector score means that a node is connected to many nodes who themselves have high scores. + The algorithm computes the eigenvector associated with the largest absolute eigenvalue. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py index dd0c9b170..b1adfccef 100644 --- a/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py @@ -36,7 +36,10 @@ def mutate( source_nodes: Optional[Any] = None, ) -> PageRankMutateResult: """ - Executes the PageRank algorithm and writes the results to the in-memory graph as node properties. + Runs the PageRank algorithm and stores the results in the graph catalog as a new node property. + + The PageRank algorithm measures the importance of each node within the graph, based on the number of incoming relationships and the importance of the corresponding source nodes. + The underlying assumption roughly speaking is that a page is only as important as the pages that link to it. Parameters ---------- From 29f902545ac739f4723d3c0556fa235a94fe92d2 Mon Sep 17 00:00:00 2001 From: Mats Rydberg Date: Thu, 18 Sep 2025 18:00:26 +0200 Subject: [PATCH 5/7] Centrality stats/write docstrings --- .../api/centrality/articlerank_endpoints.py | 12 ++++++++++-- .../api/centrality/articulationpoints_endpoints.py | 10 ++++++++-- .../api/centrality/betweenness_endpoints.py | 14 ++++++++++++-- .../api/centrality/celf_endpoints.py | 8 ++++++-- .../api/centrality/closeness_endpoints.py | 12 ++++++++++-- .../api/centrality/closeness_harmonic_endpoints.py | 14 ++++++++++++-- .../api/centrality/degree_endpoints.py | 14 ++++++++++++-- .../api/centrality/eigenvector_endpoints.py | 14 ++++++++++++-- .../api/centrality/pagerank_endpoints.py | 10 ++++++++-- 9 files changed, 90 insertions(+), 18 deletions(-) diff --git a/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py index 20c1a83c8..62cb8199f 100644 --- a/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py @@ -100,7 +100,11 @@ def stats( source_nodes: Optional[Any] = None, ) -> ArticleRankStatsResult: """ - Executes the ArticleRank algorithm and returns result statistics without writing the result to Neo4j. + Runs the Article Rank algorithm and returns result statistics without storing the results. + + ArticleRank is a variant of the Page Rank algorithm, which measures the transitive influence of nodes. + Page Rank follows the assumption that relationships originating from low-degree nodes have a higher influence than relationships from high-degree nodes. + Article Rank lowers the influence of low-degree nodes by lowering the scores being sent to their neighbors in each iteration. Parameters ---------- @@ -218,7 +222,11 @@ def write( write_concurrency: Optional[int] = None, ) -> ArticleRankWriteResult: """ - Executes the ArticleRank algorithm and writes the results to Neo4j. + Runs the Article Rank algorithm and stores the result in the Neo4j database as a new node property. + + ArticleRank is a variant of the Page Rank algorithm, which measures the transitive influence of nodes. + Page Rank follows the assumption that relationships originating from low-degree nodes have a higher influence than relationships from high-degree nodes. + Article Rank lowers the influence of low-degree nodes by lowering the scores being sent to their neighbors in each iteration. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py b/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py index b4ca42e78..6b541ee15 100644 --- a/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py @@ -73,7 +73,10 @@ def stats( job_id: Optional[Any] = None, ) -> "ArticulationPointsStatsResult": """ - Executes the ArticulationPoints algorithm and returns result statistics without writing the result to Neo4j. + Runs the Articulation Points algorithm and returns result statistics without storing the results. + + Given a graph, an articulation point is a node whose removal increases the number of connected components in the graph. + The Neo4j GDS Library provides an efficient linear time sequential algorithm to compute all articulation points in a graph. Parameters ---------- @@ -157,7 +160,10 @@ def write( write_concurrency: Optional[Any] = None, ) -> "ArticulationPointsWriteResult": """ - Executes the ArticulationPoints algorithm and writes the results back to the Neo4j database. + Runs the Articulation Points algorithm and stores the result in the Neo4j database as a new node property. + + Given a graph, an articulation point is a node whose removal increases the number of connected components in the graph. + The Neo4j GDS Library provides an efficient linear time sequential algorithm to compute all articulation points in a graph. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py index 6baa00623..eac0a740b 100644 --- a/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py @@ -89,7 +89,12 @@ def stats( relationship_weight_property: Optional[str] = None, ) -> BetweennessStatsResult: """ - Executes the Betweenness Centrality algorithm and returns result statistics without writing the result to Neo4j. + Runs the Betweenness Centrality algorithm and returns result statistics without storing the results. + + Betweenness centrality is a way of detecting the amount of influence a node has over the flow of information in a graph. + It is often used to find nodes that serve as a bridge from one part of a graph to another. + The algorithm calculates shortest paths between all pairs of nodes in a graph. + Each node receives a score, based on the number of shortest paths that pass through the node. Parameters ---------- @@ -189,7 +194,12 @@ def write( write_concurrency: Optional[Any] = None, ) -> BetweennessWriteResult: """ - Executes the Betweenness Centrality algorithm and writes the results to the Neo4j database. + Runs the Betweenness Centrality algorithm and stores the result in the Neo4j database as a new node property. + + Betweenness centrality is a way of detecting the amount of influence a node has over the flow of information in a graph. + It is often used to find nodes that serve as a bridge from one part of a graph to another. + The algorithm calculates shortest paths between all pairs of nodes in a graph. + Each node receives a score, based on the number of shortest paths that pass through the node. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py index 7c5f65a52..08345c19c 100644 --- a/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py @@ -95,7 +95,9 @@ def stats( job_id: Optional[Any] = None, ) -> CelfStatsResult: """ - Executes the CELF algorithm and returns statistics without writing the result to Neo4j. + Runs the CELF algorithm and returns result statistics without storing the results. + + The influence maximization problem asks for a set of k nodes that maximize the expected spread of influence in the network. Parameters ---------- @@ -206,7 +208,9 @@ def write( write_concurrency: Optional[Any] = None, ) -> CelfWriteResult: """ - Executes the CELF algorithm and writes the results to the Neo4j database. + Runs the CELF algorithm and stores the result in the Neo4j database as a new node property. + + The influence maximization problem asks for a set of k nodes that maximize the expected spread of influence in the network. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py b/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py index d72e21447..dc9e484df 100644 --- a/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py @@ -86,7 +86,11 @@ def stats( job_id: Optional[Any] = None, ) -> ClosenessStatsResult: """ - Executes the Closeness Centrality algorithm and returns statistics without writing the result to Neo4j. + Runs the Closeness Centrality algorithm and returns result statistics without storing the results. + + Closeness centrality is a way of detecting nodes that are able to spread information very efficiently through a graph. + The closeness centrality of a node measures its average farness (inverse distance) to all other nodes. + Nodes with a high closeness score have the shortest distances to all other nodes. Parameters ---------- @@ -179,7 +183,11 @@ def write( write_concurrency: Optional[Any] = None, ) -> ClosenessWriteResult: """ - Executes the Closeness Centrality algorithm and writes the results to the Neo4j database. + Runs the Closeness Centrality algorithm and stores the result in the Neo4j database as a new node property. + + Closeness centrality is a way of detecting nodes that are able to spread information very efficiently through a graph. + The closeness centrality of a node measures its average farness (inverse distance) to all other nodes. + Nodes with a high closeness score have the shortest distances to all other nodes. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py b/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py index 4987583d6..fac4cfafd 100644 --- a/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py @@ -81,7 +81,12 @@ def stats( job_id: Optional[Any] = None, ) -> ClosenessHarmonicStatsResult: """ - Executes the Harmonic Closeness Centrality algorithm and returns statistics without writing the result to Neo4j. + Runs the Harmonic Centrality algorithm and returns result statistics without storing the results. + + Harmonic centrality was proposed by Marchiori and Latora while trying to come up with a sensible notion of "average shortest path". + They suggested a different way of calculating the average distance to that used in the Closeness Centrality algorithm. + Rather than summing the distances of a node to all other nodes, the harmonic centrality algorithm sums the inverse of those distances. + This enables it deal with infinite values. Parameters ---------- @@ -167,7 +172,12 @@ def write( write_concurrency: Optional[Any] = None, ) -> ClosenessHarmonicWriteResult: """ - Executes the Harmonic Closeness Centrality algorithm and writes the results to the Neo4j database. + Runs the Harmonic Centrality algorithm and stores the result in the Neo4j database as a new node property. + + Harmonic centrality was proposed by Marchiori and Latora while trying to come up with a sensible notion of "average shortest path". + They suggested a different way of calculating the average distance to that used in the Closeness Centrality algorithm. + Rather than summing the distances of a node to all other nodes, the harmonic centrality algorithm sums the inverse of those distances. + This enables it deal with infinite values. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py index c1167db1c..2176b153a 100644 --- a/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py @@ -96,7 +96,12 @@ def stats( relationship_weight_property: Optional[str] = None, ) -> DegreeStatsResult: """ - Executes the Degree Centrality algorithm and returns statistics without writing the result to Neo4j. + Runs the Degree Centrality algorithm and returns result statistics without storing the results. + + The Degree Centrality algorithm can be used to find popular nodes within a graph. + The degree centrality measures the number of incoming or outgoing (or both) relationships from a node, which can be defined by the orientation of a relationship projection. + It can be applied to either weighted or unweighted graphs. + In the weighted case the algorithm computes the sum of all positive weights of adjacent relationships of a node, for each node in the graph. Parameters ---------- @@ -205,7 +210,12 @@ def write( write_concurrency: Optional[Any] = None, ) -> DegreeWriteResult: """ - Executes the Degree Centrality algorithm and writes the results to the Neo4j database. + Runs the Degree Centrality algorithm and stores the result in the Neo4j database as a new node property. + + The Degree Centrality algorithm can be used to find popular nodes within a graph. + The degree centrality measures the number of incoming or outgoing (or both) relationships from a node, which can be defined by the orientation of a relationship projection. + It can be applied to either weighted or unweighted graphs. + In the weighted case the algorithm computes the sum of all positive weights of adjacent relationships of a node, for each node in the graph. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py b/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py index 2ec3cdd5c..ddb4052f1 100644 --- a/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py @@ -104,7 +104,12 @@ def stats( job_id: Optional[Any] = None, ) -> EigenvectorStatsResult: """ - Executes the Eigenvector Centrality algorithm and returns statistics without writing the result to Neo4j. + Runs the Eigenvector Centrality algorithm and returns result statistics without storing the results. + + Eigenvector Centrality is an algorithm that measures the transitive influence of nodes. + Relationships originating from high-scoring nodes contribute more to the score of a node than connections from low-scoring nodes. + A high eigenvector score means that a node is connected to many nodes who themselves have high scores. + The algorithm computes the eigenvector associated with the largest absolute eigenvalue. Parameters ---------- @@ -220,7 +225,12 @@ def write( write_concurrency: Optional[Any] = None, ) -> EigenvectorWriteResult: """ - Executes the Eigenvector Centrality algorithm and writes the results to the Neo4j database. + Runs the Eigenvector Centrality algorithm and stores the result in the Neo4j database as a new node property. + + Eigenvector Centrality is an algorithm that measures the transitive influence of nodes. + Relationships originating from high-scoring nodes contribute more to the score of a node than connections from low-scoring nodes. + A high eigenvector score means that a node is connected to many nodes who themselves have high scores. + The algorithm computes the eigenvector associated with the largest absolute eigenvalue. Parameters ---------- diff --git a/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py index b1adfccef..db2a73027 100644 --- a/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py @@ -100,7 +100,10 @@ def stats( source_nodes: Optional[Any] = None, ) -> PageRankStatsResult: """ - Executes the PageRank algorithm and returns statistics. + Runs the PageRank algorithm and returns result statistics without storing the results. + + The PageRank algorithm measures the importance of each node within the graph, based on the number of incoming relationships and the importance of the corresponding source nodes. + The underlying assumption roughly speaking is that a page is only as important as the pages that link to it. Parameters ---------- @@ -220,7 +223,10 @@ def write( write_concurrency: Optional[int] = None, ) -> PageRankWriteResult: """ - Executes the PageRank algorithm and writes the results back to the database. + Runs the PageRank algorithm and stores the result in the Neo4j database as a new node property. + + The PageRank algorithm measures the importance of each node within the graph, based on the number of incoming relationships and the importance of the corresponding source nodes. + The underlying assumption roughly speaking is that a page is only as important as the pages that link to it. Parameters ---------- From 7cdf34cfa6895fbe98a4daf47f1cc327578fda4c Mon Sep 17 00:00:00 2001 From: Mats Rydberg Date: Thu, 18 Sep 2025 18:02:12 +0200 Subject: [PATCH 6/7] Remove top-level docstrings --- .../api/centrality/articlerank_endpoints.py | 3 --- .../api/centrality/articulationpoints_endpoints.py | 3 --- .../api/centrality/betweenness_endpoints.py | 3 --- .../procedure_surface/api/centrality/celf_endpoints.py | 6 ------ .../api/centrality/closeness_endpoints.py | 7 ------- .../api/centrality/closeness_harmonic_endpoints.py | 7 ------- .../procedure_surface/api/centrality/degree_endpoints.py | 7 ------- .../api/centrality/eigenvector_endpoints.py | 8 -------- .../api/centrality/pagerank_endpoints.py | 3 --- 9 files changed, 47 deletions(-) diff --git a/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py index 62cb8199f..b6686a187 100644 --- a/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py @@ -12,9 +12,6 @@ class ArticleRankEndpoints(ABC): - """ - Abstract base class defining the API for the ArticleRank algorithm. - """ @abstractmethod def mutate( diff --git a/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py b/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py index 6b541ee15..3a035379d 100644 --- a/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/articulationpoints_endpoints.py @@ -10,9 +10,6 @@ class ArticulationPointsEndpoints(ABC): - """ - Abstract base class defining the API for the Articulation Points algorithm. - """ @abstractmethod def mutate( diff --git a/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py index eac0a740b..b9312d6a5 100644 --- a/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py @@ -12,9 +12,6 @@ class BetweennessEndpoints(ABC): - """ - Abstract base class defining the API for the Betweenness Centrality algorithm. - """ @abstractmethod def mutate( diff --git a/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py index 08345c19c..0df3da245 100644 --- a/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py @@ -12,12 +12,6 @@ class CelfEndpoints(ABC): - """ - Abstract base class defining the API for the Cost Effective Lazy Forward (CELF) algorithm. - - The CELF algorithm aims to find k nodes that maximize the expected spread of influence - in the network. - """ @abstractmethod def mutate( diff --git a/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py b/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py index dc9e484df..3a674e1cc 100644 --- a/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/closeness_endpoints.py @@ -12,13 +12,6 @@ class ClosenessEndpoints(ABC): - """ - Abstract base class defining the API for the Closeness Centrality algorithm. - - Closeness centrality measures how close a node is to all other nodes in the network. - It's calculated as the reciprocal of the sum of the shortest path distances from - the node to all other nodes in the graph. - """ @abstractmethod def mutate( diff --git a/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py b/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py index fac4cfafd..6542cddc0 100644 --- a/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/closeness_harmonic_endpoints.py @@ -12,13 +12,6 @@ class ClosenessHarmonicEndpoints(ABC): - """ - Abstract base class defining the API for the Harmonic Centrality algorithm. - - Harmonic centrality is a variant of closeness centrality that uses the - harmonic mean of shortest path distances. It handles disconnected graphs better - than standard closeness centrality. - """ @abstractmethod def mutate( diff --git a/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py index 2176b153a..545ec8581 100644 --- a/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py @@ -12,13 +12,6 @@ class DegreeEndpoints(ABC): - """ - Abstract base class defining the API for the Degree Centrality algorithm. - - Degree centrality measures the number of incoming and outgoing relationships from a node. - It's one of the simplest centrality measures, where a node's importance is determined by - the number of direct connections it has. - """ @abstractmethod def mutate( diff --git a/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py b/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py index ddb4052f1..d752fb57b 100644 --- a/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py @@ -12,14 +12,6 @@ class EigenvectorEndpoints(ABC): - """ - Abstract base class defining the API for the Eigenvector Centrality algorithm. - - Eigenvector centrality measures the influence of a node in a network based on the - concept that connections to high-scoring nodes contribute more to the score than - equal connections to low-scoring nodes. It's computed as the principal eigenvector - of the adjacency matrix. - """ @abstractmethod def mutate( diff --git a/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py index db2a73027..bbe2bd277 100644 --- a/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py @@ -12,9 +12,6 @@ class PageRankEndpoints(ABC): - """ - Abstract base class defining the API for the PageRank algorithm. - """ @abstractmethod def mutate( From 5e80e0f38c2e29b5d2899f700949f8986353cd9d Mon Sep 17 00:00:00 2001 From: Mats Rydberg Date: Thu, 18 Sep 2025 18:38:13 +0200 Subject: [PATCH 7/7] Standardise some parameter descriptions --- .../api/centrality/articlerank_endpoints.py | 74 +++++++++--------- .../api/centrality/betweenness_endpoints.py | 58 +++++++------- .../api/centrality/celf_endpoints.py | 55 +++++++------- .../api/centrality/degree_endpoints.py | 62 ++++++--------- .../api/centrality/pagerank_endpoints.py | 76 +++++++++---------- 5 files changed, 152 insertions(+), 173 deletions(-) diff --git a/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py index b6686a187..3fcd0d006 100644 --- a/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/articlerank_endpoints.py @@ -44,33 +44,33 @@ def mutate( G : GraphV2 The graph to run the algorithm on mutate_property : str - The property name to store the ArticleRank score for each node + Name of the node property to store the results in. damping_factor : Optional[float], default=None - The damping factor controls the probability of a random jump to a random node + Probability of a jump to a random node. tolerance : Optional[float], default=None - Minimum change in scores between iterations + Minimum change in scores between iterations. max_iterations : Optional[int], default=None - The maximum number of iterations to run + Maximum number of iterations to run. scaler : Optional[Any], default=None - Configuration for scaling the scores + Name of the scaler applied on the resulting scores. relationship_types : Optional[List[str]], default=None - The relationships types used to select relationships for this algorithm run + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains weight + Name of the property to be used as weights. source_nodes : Optional[Any], default=None - The source nodes for personalized ArticleRank + List of node ids to use as starting points. Use a list of list pairs to associate each node with a bias > 0. Returns ------- @@ -108,31 +108,31 @@ def stats( G : GraphV2 The graph to run the algorithm on damping_factor : Optional[float], default=None - The damping factor controls the probability of a random jump to a random node + Probability of a jump to a random node. tolerance : Optional[float], default=None - Minimum change in scores between iterations + Minimum change in scores between iterations. max_iterations : Optional[int], default=None - The maximum number of iterations to run + Maximum number of iterations to run. scaler : Optional[Any], default=None - Configuration for scaling the scores + Name of the scaler applied on the resulting scores. relationship_types : Optional[List[str]], default=None - The relationships types used to select relationships for this algorithm run + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains weight + Name of the property to be used as weights. source_nodes : Optional[Any], default=None - The source nodes for personalized ArticleRank + List of node ids to use as starting points. Use a list of list pairs to associate each node with a bias > 0. Returns ------- @@ -232,31 +232,31 @@ def write( write_property : str The property name to write the ArticleRank score for each node damping_factor : Optional[float], default=None - The damping factor controls the probability of a random jump to a random node + Probability of a jump to a random node. tolerance : Optional[float], default=None - Minimum change in scores between iterations + Minimum change in scores between iterations. max_iterations : Optional[int], default=None - The maximum number of iterations to run + Maximum number of iterations to run. scaler : Optional[Any], default=None - Configuration for scaling the scores + Name of the scaler applied on the resulting scores. relationship_types : Optional[List[str]], default=None - The relationships types used to select relationships for this algorithm run + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains weight + Name of the property to be used as weights. source_nodes : Optional[Any], default=None - The source nodes for personalized ArticleRank + List of node ids to use as starting points. Use a list of list pairs to associate each node with a bias > 0. write_concurrency : Optional[int], default=None The number of concurrent threads used for writing diff --git a/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py index b9312d6a5..8c5f8e1b1 100644 --- a/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/betweenness_endpoints.py @@ -42,27 +42,27 @@ def mutate( G : GraphV2 The graph to run the algorithm on mutate_property : str - The property name to store the betweenness centrality score for each node + Name of the node property to store the results in. sampling_size : Optional[int], default=None - The number of nodes to use for sampling. + Number of source nodes to consider for computing centrality scores. sampling_seed : Optional[int], default=None - The seed value for sampling randomization + Seed value for the random number generator that selects source nodes. relationship_types : Optional[List[str]], default=None - The relationship types used to select relationships for this algorithm run + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains relationship weights + Name of the property to be used as weights. Returns ------- @@ -98,25 +98,25 @@ def stats( G : GraphV2 The graph to run the algorithm on sampling_size : Optional[int], default=None - The number of nodes to use for sampling. + Number of source nodes to consider for computing centrality scores. sampling_seed : Optional[int], default=None - The seed value for sampling randomization + Seed value for the random number generator that selects source nodes. relationship_types : Optional[List[str]], default=None - The relationship types used to select relationships for this algorithm run + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains relationship weights + Name of the property to be used as weights. Returns ------- @@ -203,27 +203,27 @@ def write( G : GraphV2 The graph to run the algorithm on write_property : str - The property name to store the betweenness centrality score for each node + Name of the node property to store the results in. sampling_size : Optional[int], default=None - The number of nodes to use for sampling. + Number of source nodes to consider for computing centrality scores. sampling_seed : Optional[int], default=None - The seed value for sampling randomization + Seed value for the random number generator that selects source nodes. relationship_types : Optional[List[str]], default=None - The relationship types used to select relationships for this algorithm run + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains relationship weights + Name of the property to be used as weights. write_concurrency : Optional[Any], default=None The number of concurrent threads during the write phase diff --git a/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py index 0df3da245..8f94b5a34 100644 --- a/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/celf_endpoints.py @@ -42,28 +42,27 @@ def mutate( seed_set_size : int The number of nodes to select as the seed set for influence maximization mutate_property : str - The property name to store the influence spread value for each selected node + Name of the node property to store the results in. propagation_probability : Optional[float], default=None - The probability that influence spreads from one node to another. + Probability of a node being activated by an active neighbour node. monte_carlo_simulations : Optional[int], default=None - The number of Monte-Carlo simulations. + Number of Monte-Carlo simulations. random_seed : Optional[Any], default=None Random seed for reproducible results. relationship_types : Optional[List[str]], default=None - The relationship types used to select relationships for this algorithm run. + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run. + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits. Use with caution as this can lead to - memory issues if the estimation is significantly wrong. + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress of the algorithm execution + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads used for the algorithm execution. + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job that can be used for monitoring and cancellation + Identifier for the job. Returns ------- @@ -100,26 +99,25 @@ def stats( seed_set_size : int The number of nodes to select as the seed set for influence maximization propagation_probability : Optional[float], default=None - The probability that influence spreads from one node to another. + Probability of a node being activated by an active neighbour node. monte_carlo_simulations : Optional[int], default=None - The number of Monte-Carlo simulations. + Number of Monte-Carlo simulations. random_seed : Optional[Any], default=None Random seed for reproducible results. relationship_types : Optional[List[str]], default=None - The relationship types used to select relationships for this algorithm run. + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run. + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits. Use with caution as this can lead to - memory issues if the estimation is significantly wrong. + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress of the algorithm execution + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads used for the algorithm execution. + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job that can be used for monitoring and cancellation + Identifier for the job. Returns ------- @@ -213,28 +211,27 @@ def write( seed_set_size : int The number of nodes to select as the seed set for influence maximization write_property : str - The property name to store the influence spread value for each selected node in the database + Name of the node property to store the results in. propagation_probability : Optional[float], default=None - The probability that influence spreads from one node to another. + Probability of a node being activated by an active neighbour node. monte_carlo_simulations : Optional[int], default=None - The number of Monte-Carlo simulations. + Number of Monte-Carlo simulations. random_seed : Optional[Any], default=None Random seed for reproducible results. relationship_types : Optional[List[str]], default=None - The relationship types used to select relationships for this algorithm run. + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run. + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits. Use with caution as this can lead to - memory issues if the estimation is significantly wrong. + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress of the algorithm execution + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads used for the algorithm execution. + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job that can be used for monitoring and cancellation + Identifier for the job. write_concurrency : Optional[Any], default=None The number of concurrent threads used during the write phase. diff --git a/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py index 545ec8581..584c3d91f 100644 --- a/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/degree_endpoints.py @@ -41,31 +41,25 @@ def mutate( G : GraphV2 The graph to run the algorithm on mutate_property : str - The property name to store the degree centrality score for each node + Name of the node property to store the results in. orientation : Optional[Any], default=None The orientation of relationships to consider. Can be 'NATURAL', 'REVERSE', or 'UNDIRECTED'. - 'NATURAL' (default) respects the direction of relationships as they are stored in the graph. - 'REVERSE' treats each relationship as if it were directed in the opposite direction. - 'UNDIRECTED' treats all relationships as undirected, effectively counting both directions. relationship_types : Optional[List[str]], default=None - The relationship types used to select relationships for this algorithm run. + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run. + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits. Use with caution as this can lead to - memory issues if the estimation is significantly wrong. + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress of the algorithm execution + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads used for the algorithm execution. + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job that can be used for monitoring and cancellation + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains relationship weights. If specified, - weighted degree centrality is computed where each relationship contributes - its weight to the total degree. + Name of the property to be used as weights. Returns ------- @@ -102,28 +96,22 @@ def stats( The graph to run the algorithm on orientation : Optional[Any], default=None The orientation of relationships to consider. Can be 'NATURAL', 'REVERSE', or 'UNDIRECTED'. - 'NATURAL' (default) respects the direction of relationships as they are stored in the graph. - 'REVERSE' treats each relationship as if it were directed in the opposite direction. - 'UNDIRECTED' treats all relationships as undirected, effectively counting both directions. relationship_types : Optional[List[str]], default=None - The relationship types used to select relationships for this algorithm run. + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run. + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits. Use with caution as this can lead to - memory issues if the estimation is significantly wrong. + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress of the algorithm execution + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads used for the algorithm execution. + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job that can be used for monitoring and cancellation + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains relationship weights. If specified, - weighted degree centrality is computed where each relationship contributes - its weight to the total degree. + Name of the property to be used as weights. Returns ------- @@ -218,28 +206,22 @@ def write( The property name to store the degree centrality score for each node in the database orientation : Optional[Any], default=None The orientation of relationships to consider. Can be 'NATURAL', 'REVERSE', or 'UNDIRECTED'. - 'NATURAL' (default) respects the direction of relationships as they are stored in the graph. - 'REVERSE' treats each relationship as if it were directed in the opposite direction. - 'UNDIRECTED' treats all relationships as undirected, effectively counting both directions. relationship_types : Optional[List[str]], default=None - The relationship types used to select relationships for this algorithm run. + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run. + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits. Use with caution as this can lead to - memory issues if the estimation is significantly wrong. + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress of the algorithm execution + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads used for the algorithm execution. + The number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job that can be used for monitoring and cancellation + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains relationship weights. If specified, - weighted degree centrality is computed where each relationship contributes - its weight to the total degree. + Name of the property to be used as weights. write_concurrency : Optional[Any], default=None The number of concurrent threads used during the write phase. diff --git a/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py index bbe2bd277..3ce353ce8 100644 --- a/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py +++ b/graphdatascience/procedure_surface/api/centrality/pagerank_endpoints.py @@ -43,33 +43,33 @@ def mutate( G : GraphV2 The graph to run the algorithm on mutate_property : str - The property name to store the PageRank score for each node + Name of the node property to store the results in. damping_factor : Optional[float], default=None - The damping factor controls the probability of a random jump to a random node + Probability of a jump to a random node. tolerance : Optional[float], default=None - Minimum change in scores between iterations + Minimum change in scores between iterations. max_iterations : Optional[int], default=None - The maximum number of iterations to run + Maximum number of iterations to run. scaler : Optional[Any], default=None - Configuration for scaling the scores + Name of the scaler applied on the resulting scores. relationship_types : Optional[List[str]], default=None - The relationships types used to select relationships for this algorithm run + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains weight + Name of the property to be used as weights. source_nodes : Optional[Any], default=None - The source nodes for personalized PageRank + List of node ids to use as starting points. Use a list of list pairs to associate each node with a bias > 0. Returns ------- @@ -107,31 +107,31 @@ def stats( G : GraphV2 The graph to run the algorithm on damping_factor : Optional[float], default=None - The damping factor controls the probability of a random jump to a random node + Probability of a jump to a random node. tolerance : Optional[float], default=None - Minimum change in scores between iterations + Minimum change in scores between iterations. max_iterations : Optional[int], default=None - The maximum number of iterations to run + Maximum number of iterations to run. scaler : Optional[Any], default=None - Configuration for scaling the scores + Name of the scaler applied on the resulting scores. relationship_types : Optional[List[str]], default=None - The relationships types used to select relationships for this algorithm run + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains weight + Name of the property to be used as weights. source_nodes : Optional[Any], default=None - The source nodes for personalized PageRank + List of node ids to use as starting points. Use a list of list pairs to associate each node with a bias > 0. Returns ------- @@ -230,33 +230,33 @@ def write( G : GraphV2 The graph to run the algorithm on write_property : str - The property name to write the PageRank score for each node + Name of the node property to store the results in. damping_factor : Optional[float], default=None - The damping factor controls the probability of a random jump to a random node + Probability of a jump to a random node. tolerance : Optional[float], default=None - Minimum change in scores between iterations + Minimum change in scores between iterations. max_iterations : Optional[int], default=None - The maximum number of iterations to run + Maximum number of iterations to run. scaler : Optional[Any], default=None - Configuration for scaling the scores + Name of the scaler applied on the resulting scores. relationship_types : Optional[List[str]], default=None - The relationships types used to select relationships for this algorithm run + Filter the graph using the given relationship types. Relationships with any of the given types will be included. node_labels : Optional[List[str]], default=None - The node labels used to select nodes for this algorithm run + Filter the graph using the given node labels. Nodes with any of the given labels will be included. sudo : Optional[bool], default=None - Override memory estimation limits + Disable the memory guard. log_progress : Optional[bool], default=None - Whether to log progress + Display progress logging. username : Optional[str], default=None The username to attribute the procedure run to concurrency : Optional[Any], default=None - The number of concurrent threads + Number of threads to use for running the algorithm. job_id : Optional[Any], default=None - An identifier for the job + Identifier for the job. relationship_weight_property : Optional[str], default=None - The property name that contains weight + Name of the property to be used as weights. source_nodes : Optional[Any], default=None - The source nodes for personalized PageRank + List of node ids to use as starting points. Use a list of list pairs to associate each node with a bias > 0. write_concurrency : Optional[int], default=None The number of concurrent threads used for writing