Skip to content

Commit 4e98fd1

Browse files
committed
Remove bias option from source-nodes param in eigenvector
1 parent 30cb28e commit 4e98fd1

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

graphdatascience/procedure_surface/api/centrality/eigenvector_endpoints.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def mutate(
2020
mutate_property: str,
2121
max_iterations: int = 20,
2222
tolerance: float = 1.0e-7,
23-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
23+
source_nodes: int | list[int] | None = None,
2424
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
2525
relationship_weight_property: str | None = None,
2626
relationship_types: list[str] = ALL_TYPES,
@@ -53,7 +53,6 @@ def mutate(
5353
node ids to use as starting points. Can be:
5454
- single node id (e.g., 42)
5555
- list of node id (e.g., [42, 43, 44])
56-
- list of tuples to associate each node with a bias > 0 (e.g., [(42, 0.5), (43, 1.0)])
5756
scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
5857
The scaler to use. Can be:
5958
- A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'NONE')
@@ -91,7 +90,7 @@ def stats(
9190
G: GraphV2,
9291
max_iterations: int = 20,
9392
tolerance: float = 1.0e-7,
94-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
93+
source_nodes: int | list[int] | None = None,
9594
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
9695
relationship_weight_property: str | None = None,
9796
relationship_types: list[str] = ALL_TYPES,
@@ -122,7 +121,6 @@ def stats(
122121
node ids to use as starting points. Can be:
123122
- single node id (e.g., 42)
124123
- list of node id (e.g., [42, 43, 44])
125-
- list of tuples to associate each node with a bias > 0 (e.g., [(42, 0.5), (43, 1.0)])
126124
scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
127125
The scaler to use. Can be:
128126
- A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'NONE')
@@ -160,7 +158,7 @@ def stream(
160158
G: GraphV2,
161159
max_iterations: int = 20,
162160
tolerance: float = 1.0e-7,
163-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
161+
source_nodes: int | list[int] | None = None,
164162
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
165163
relationship_weight_property: str | None = None,
166164
relationship_types: list[str] = ALL_TYPES,
@@ -186,7 +184,6 @@ def stream(
186184
node ids to use as starting points. Can be:
187185
- single node id (e.g., 42)
188186
- list of node id (e.g., [42, 43, 44])
189-
- list of tuples to associate each node with a bias > 0 (e.g., [(42, 0.5), (43, 1.0)])
190187
scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
191188
The scaler to use. Can be:
192189
- A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'NONE')
@@ -225,7 +222,7 @@ def write(
225222
write_property: str,
226223
max_iterations: int = 20,
227224
tolerance: float = 1.0e-7,
228-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
225+
source_nodes: int | list[int] | None = None,
229226
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
230227
relationship_weight_property: str | None = None,
231228
relationship_types: list[str] = ALL_TYPES,
@@ -259,7 +256,6 @@ def write(
259256
node ids to use as starting points. Can be:
260257
- single node id (e.g., 42)
261258
- list of node id (e.g., [42, 43, 44])
262-
- list of tuples to associate each node with a bias > 0 (e.g., [(42, 0.5), (43, 1.0)])
263259
scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
264260
The scaler to use. Can be:
265261
- A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'NONE')
@@ -299,7 +295,7 @@ def estimate(
299295
G: GraphV2 | dict[str, Any],
300296
max_iterations: int = 20,
301297
tolerance: float = 1.0e-7,
302-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
298+
source_nodes: int | list[int] | None = None,
303299
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
304300
relationship_weight_property: str | None = None,
305301
relationship_types: list[str] = ALL_TYPES,
@@ -321,7 +317,6 @@ def estimate(
321317
node ids to use as starting points. Can be:
322318
- single node id (e.g., 42)
323319
- list of node id (e.g., [42, 43, 44])
324-
- list of tuples to associate each node with a bias > 0 (e.g., [(42, 0.5), (43, 1.0)])
325320
scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
326321
The scaler to use. Can be:
327322
- A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'NONE')

graphdatascience/procedure_surface/arrow/centrality/eigenvector_arrow_endpoints.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def mutate(
3535
mutate_property: str,
3636
max_iterations: int = 20,
3737
tolerance: float = 1.0e-7,
38-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
38+
source_nodes: int | list[int] | None = None,
3939
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
4040
relationship_weight_property: str | None = None,
4141
relationship_types: list[str] = ALL_TYPES,
@@ -72,7 +72,7 @@ def stats(
7272
G: GraphV2,
7373
max_iterations: int = 20,
7474
tolerance: float = 1.0e-7,
75-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
75+
source_nodes: int | list[int] | None = None,
7676
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
7777
relationship_weight_property: str | None = None,
7878
relationship_types: list[str] = ALL_TYPES,
@@ -109,7 +109,7 @@ def stream(
109109
G: GraphV2,
110110
max_iterations: int = 20,
111111
tolerance: float = 1.0e-7,
112-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
112+
source_nodes: int | list[int] | None = None,
113113
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
114114
relationship_weight_property: str | None = None,
115115
relationship_types: list[str] = ALL_TYPES,
@@ -145,7 +145,7 @@ def write(
145145
write_property: str,
146146
max_iterations: int = 20,
147147
tolerance: float = 1.0e-7,
148-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
148+
source_nodes: int | list[int] | None = None,
149149
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
150150
relationship_weight_property: str | None = None,
151151
relationship_types: list[str] = ALL_TYPES,
@@ -190,7 +190,7 @@ def estimate(
190190
G: GraphV2 | dict[str, Any],
191191
max_iterations: int = 20,
192192
tolerance: float = 1.0e-7,
193-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
193+
source_nodes: int | list[int] | None = None,
194194
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
195195
relationship_weight_property: str | None = None,
196196
relationship_types: list[str] = ALL_TYPES,

graphdatascience/procedure_surface/cypher/centrality/eigenvector_cypher_endpoints.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def mutate(
3131
mutate_property: str,
3232
max_iterations: int = 20,
3333
tolerance: float = 1.0e-7,
34-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
34+
source_nodes: int | list[int] | None = None,
3535
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
3636
relationship_weight_property: str | None = None,
3737
relationship_types: list[str] = ALL_TYPES,
@@ -77,7 +77,7 @@ def stats(
7777
G: GraphV2,
7878
max_iterations: int = 20,
7979
tolerance: float = 1.0e-7,
80-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
80+
source_nodes: int | list[int] | None = None,
8181
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
8282
relationship_weight_property: str | None = None,
8383
relationship_types: list[str] = ALL_TYPES,
@@ -121,7 +121,7 @@ def stream(
121121
G: GraphV2,
122122
max_iterations: int = 20,
123123
tolerance: float = 1.0e-7,
124-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
124+
source_nodes: int | list[int] | None = None,
125125
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
126126
relationship_weight_property: str | None = None,
127127
relationship_types: list[str] = ALL_TYPES,
@@ -163,7 +163,7 @@ def write(
163163
write_property: str,
164164
max_iterations: int = 20,
165165
tolerance: float = 1.0e-7,
166-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
166+
source_nodes: int | list[int] | None = None,
167167
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
168168
relationship_weight_property: str | None = None,
169169
relationship_types: list[str] = ALL_TYPES,
@@ -210,7 +210,7 @@ def estimate(
210210
G: GraphV2 | dict[str, Any],
211211
max_iterations: int = 20,
212212
tolerance: float = 1.0e-7,
213-
source_nodes: int | list[int] | list[tuple[int, float]] | None = None,
213+
source_nodes: int | list[int] | None = None,
214214
scaler: str | dict[str, str | int | float] | ScalerConfig = "NONE",
215215
relationship_weight_property: str | None = None,
216216
relationship_types: list[str] = ALL_TYPES,

graphdatascience/tests/integrationV2/procedure_surface/arrow/centrality/test_eigenvector_arrow_endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def test_eigenvector_mutate(eigenvector_endpoints: EigenvectorArrowEndpoints, sa
8282
result = eigenvector_endpoints.mutate(
8383
G=sample_graph,
8484
mutate_property="eigenvector",
85-
source_nodes=[(0, 0.8), (1, 0.2)],
85+
source_nodes=[0, 2],
8686
)
8787

8888
assert result.pre_processing_millis >= 0

0 commit comments

Comments
 (0)