@@ -48,37 +48,37 @@ def mutate(
4848 The relationship property to store the similarity score in.
4949 node_properties : str | list[str] | dict[str, str],
5050 The node properties to use for similarity computation.
51- top_k : int | None , default=None
51+ top_k : int, default=10
5252 The number of nearest neighbors to find for each node.
53- similarity_cutoff : float | None , default=None
53+ similarity_cutoff : float, default=0.0
5454 The threshold for similarity scores.
55- delta_threshold : float | None , default=None
55+ delta_threshold : float, default=0.001
5656 The threshold for convergence assessment.
57- max_iterations : int | None , default=None
57+ max_iterations : int, default=100
5858 The maximum number of iterations to run.
59- sample_rate : float | None , default=None
59+ sample_rate : float, default=0.5
6060 The sampling rate for the algorithm.
61- perturbation_rate : float | None , default=None
61+ perturbation_rate : float, default=0.0
6262 The rate at which to perturb the similarity graph.
63- random_joins : int | None , default=None
63+ random_joins : int, default=10
6464 The number of random joins to perform.
6565 random_seed : int | None, default=None
6666 The seed for the random number generator.
67- initial_sampler : Any | None , default=None
67+ initial_sampler : str , default="UNIFORM"
6868 The initial sampling strategy.
6969 relationship_types : list[str] | None, default=None
7070 Filter on relationship types.
7171 node_labels : list[str] | None, default=None
7272 Filter on node labels.
73- sudo : bool | None , default=None
73+ sudo : bool, default=False
7474 Run the algorithm with elevated privileges.
7575 log_progress : bool, default=True
7676 Whether to log progress.
7777 username : str | None, default=None
7878 Username for the operation.
79- concurrency : Any | None, default=None
79+ concurrency : int | None, default=None
8080 Concurrency configuration.
81- job_id : Any | None, default=None
81+ job_id : str | None, default=None
8282 Job ID for the operation.
8383
8484 Returns
@@ -118,37 +118,37 @@ def stats(
118118 The graph to run the algorithm on
119119 node_properties: str | list[str] | dict[str, str],
120120 The node properties to use for similarity computation.
121- top_k : int | None , default=None
121+ top_k : int, default=10
122122 The number of nearest neighbors to find for each node.
123- similarity_cutoff : float | None , default=None
123+ similarity_cutoff : float, default=0.0
124124 The threshold for similarity scores.
125- delta_threshold : float | None , default=None
125+ delta_threshold : float, default=0.001
126126 The threshold for convergence assessment.
127- max_iterations : int | None , default=None
127+ max_iterations : int, default=100
128128 The maximum number of iterations to run.
129- sample_rate : float | None , default=None
129+ sample_rate : float, default=0.5
130130 The sampling rate for the algorithm.
131- perturbation_rate : float | None , default=None
131+ perturbation_rate : float, default=0.0
132132 The rate at which to perturb the similarity graph.
133- random_joins : int | None , default=None
133+ random_joins : int, default=10
134134 The number of random joins to perform.
135135 random_seed : int | None, default=None
136136 The seed for the random number generator.
137- initial_sampler : Any | None , default=None
137+ initial_sampler : str , default="UNIFORM"
138138 The initial sampling strategy.
139139 relationship_types : list[str] | None, default=None
140140 Filter on relationship types.
141141 node_labels : list[str] | None, default=None
142142 Filter on node labels.
143- sudo : bool | None , default=None
143+ sudo : bool, default=False
144144 Run the algorithm with elevated privileges.
145145 log_progress : bool, default=True
146146 Whether to log progress.
147147 username : str | None, default=None
148148 Username for the operation.
149- concurrency : Any | None, default=None
149+ concurrency : int | None, default=None
150150 Concurrency configuration.
151- job_id : Any | None, default=None
151+ job_id : str | None, default=None
152152 Job ID for the operation.
153153
154154 Returns
@@ -188,37 +188,37 @@ def stream(
188188 The graph to run the algorithm on
189189 node_properties: str | list[str] | dict[str, str],
190190 The node properties to use for similarity computation.
191- top_k : int | None , default=None
191+ top_k : int, default=10
192192 The number of nearest neighbors to find for each node.
193- similarity_cutoff : float | None , default=None
193+ similarity_cutoff : float, default=0.0
194194 The threshold for similarity scores.
195- delta_threshold : float | None , default=None
195+ delta_threshold : float, default=0.001
196196 The threshold for convergence assessment.
197- max_iterations : int | None , default=None
197+ max_iterations : int, default=100
198198 The maximum number of iterations to run.
199- sample_rate : float | None , default=None
199+ sample_rate : float, default=0.5
200200 The sampling rate for the algorithm.
201- perturbation_rate : float | None , default=None
201+ perturbation_rate : float, default=0.0
202202 The rate at which to perturb the similarity graph.
203- random_joins : int | None , default=None
203+ random_joins : int, default=10
204204 The number of random joins to perform.
205205 random_seed : int | None, default=None
206206 The seed for the random number generator.
207- initial_sampler : Any | None , default=None
207+ initial_sampler : str , default="UNIFORM"
208208 The initial sampling strategy.
209209 relationship_types : list[str] | None, default=None
210210 Filter on relationship types.
211211 node_labels : list[str] | None, default=None
212212 Filter on node labels.
213- sudo : bool | None , default=None
213+ sudo : bool, default=False
214214 Run the algorithm with elevated privileges.
215215 log_progress : bool, default=True
216216 Whether to log progress.
217217 username : str | None, default=None
218218 Username for the operation.
219- concurrency : Any | None, default=None
219+ concurrency : int | None, default=None
220220 Concurrency configuration.
221- job_id : Any | None, default=None
221+ job_id : str | None, default=None
222222 Job ID for the operation.
223223
224224 Returns
@@ -265,37 +265,37 @@ def write(
265265 The relationship property to store the similarity score in.
266266 node_properties: str | list[str] | dict[str, str],
267267 The node properties to use for similarity computation.
268- top_k : int | None , default=None
268+ top_k : int, default=10
269269 The number of nearest neighbors to find for each node.
270- similarity_cutoff : float | None , default=None
270+ similarity_cutoff : float, default=0.0
271271 The threshold for similarity scores.
272- delta_threshold : float | None , default=None
272+ delta_threshold : float, default=0.001
273273 The threshold for convergence assessment.
274- max_iterations : int | None , default=None
274+ max_iterations : int, default=100
275275 The maximum number of iterations to run.
276- sample_rate : float | None , default=None
276+ sample_rate : float, default=0.5
277277 The sampling rate for the algorithm.
278- perturbation_rate : float | None , default=None
278+ perturbation_rate : float, default=0.0
279279 The rate at which to perturb the similarity graph.
280- random_joins : int | None , default=None
280+ random_joins : int, default=10
281281 The number of random joins to perform.
282282 random_seed : int | None, default=None
283283 The seed for the random number generator.
284- initial_sampler : Any | None , default=None
284+ initial_sampler : str , default="UNIFORM"
285285 The initial sampling strategy.
286286 relationship_types : list[str] | None, default=None
287287 Filter on relationship types.
288288 node_labels : list[str] | None, default=None
289289 Filter on node labels.
290- sudo : bool | None , default=None
290+ sudo : bool, default=False
291291 Run the algorithm with elevated privileges.
292292 log_progress : bool, default=True
293293 Whether to log progress.
294294 username : str | None, default=None
295295 Username for the operation.
296- concurrency : Any | None, default=None
296+ concurrency : int | None, default=None
297297 Concurrency configuration.
298- job_id : Any | None, default=None
298+ job_id : str | None, default=None
299299 Job ID for the operation.
300300 write_concurrency : int | None, default=None
301301 Concurrency for writing results.
@@ -309,7 +309,7 @@ def write(
309309 @abstractmethod
310310 def estimate (
311311 self ,
312- G : GraphV2 ,
312+ G : GraphV2 | dict [ str , Any ] ,
313313 node_properties : str | list [str ] | dict [str , str ],
314314 top_k : int = 10 ,
315315 similarity_cutoff : float = 0.0 ,
@@ -332,7 +332,7 @@ def estimate(
332332
333333 Parameters
334334 ----------
335- G : GraphV2
335+ G : GraphV2 | dict[str, Any]
336336 The graph to run the algorithm on
337337 node_properties: str | list[str] | dict[str, str],
338338 The node properties to use for similarity computation.
@@ -364,9 +364,9 @@ def estimate(
364364 Whether to log progress.
365365 username : str | None, default=None
366366 Username for the operation.
367- concurrency : Any | None, default=None
367+ concurrency : int | None, default=None
368368 Concurrency configuration.
369- job_id : Any | None, default=None
369+ job_id : str | None, default=None
370370 Job ID for the operation.
371371
372372 Returns
@@ -383,7 +383,7 @@ class KnnMutateResult(BaseResult):
383383 post_processing_millis : int
384384 nodes_compared : int
385385 relationships_written : int
386- similarity_distribution : dict [str , Any ]
386+ similarity_distribution : dict [str , int | float ]
387387 did_converge : bool
388388 ran_iterations : int
389389 node_pairs_considered : int
@@ -396,7 +396,7 @@ class KnnStatsResult(BaseResult):
396396 post_processing_millis : int
397397 nodes_compared : int
398398 similarity_pairs : int
399- similarity_distribution : dict [str , Any ]
399+ similarity_distribution : dict [str , int | float ]
400400 did_converge : bool
401401 ran_iterations : int
402402 node_pairs_considered : int
@@ -413,5 +413,5 @@ class KnnWriteResult(BaseResult):
413413 did_converge : bool
414414 ran_iterations : int
415415 node_pairs_considered : int
416- similarity_distribution : dict [str , Any ]
416+ similarity_distribution : dict [str , int | float ]
417417 configuration : dict [str , Any ]
0 commit comments