77
88from graphdatascience .procedure_surface .api .base_result import BaseResult
99from graphdatascience .procedure_surface .api .catalog .graph_api import GraphV2
10+ from graphdatascience .procedure_surface .api .catalog .scaler_config import ScalerConfig
1011from graphdatascience .procedure_surface .api .default_values import ALL_LABELS , ALL_TYPES
1112from graphdatascience .procedure_surface .api .estimation_result import EstimationResult
1213
@@ -20,7 +21,7 @@ def mutate(
2021 max_iterations : int = 20 ,
2122 tolerance : float = 1.0e-7 ,
2223 source_nodes : Any | None = None ,
23- scaler : Any = "NONE" ,
24+ scaler : str | dict [ str , str | int | float ] | ScalerConfig = "NONE" ,
2425 relationship_weight_property : str | None = None ,
2526 relationship_types : list [str ] = ALL_TYPES ,
2627 node_labels : list [str ] = ALL_LABELS ,
@@ -50,8 +51,12 @@ def mutate(
5051 The tolerance for convergence detection
5152 source_nodes : Any | None, default=None
5253 The source nodes to start the computation from
53- scaler : Any
54- Scaling configuration for the algorithm
54+ scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
55+ The scaler to use. Can be:
56+ - A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'L1Norm', 'L2Norm', 'NONE')
57+ - A dictionary with scaler configuration (e.g., {'type': 'Log', 'offset': 1.0})
58+ - A ScalerConfig instance
59+ - "NONE" (default, no scaling)
5560 relationship_weight_property : str | None, default=None
5661 The property name that contains weight values for relationships
5762 relationship_types : list[str]
@@ -84,7 +89,7 @@ def stats(
8489 max_iterations : int = 20 ,
8590 tolerance : float = 1.0e-7 ,
8691 source_nodes : Any | None = None ,
87- scaler : Any = "NONE" ,
92+ scaler : str | dict [ str , str | int | float ] | ScalerConfig = "NONE" ,
8893 relationship_weight_property : str | None = None ,
8994 relationship_types : list [str ] = ALL_TYPES ,
9095 node_labels : list [str ] = ALL_LABELS ,
@@ -112,8 +117,12 @@ def stats(
112117 The tolerance for convergence detection
113118 source_nodes : Any | None, default=None
114119 The source nodes to start the computation from
115- scaler : Any
116- Scaling configuration for the algorithm
120+ scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
121+ The scaler to use. Can be:
122+ - A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'L1Norm', 'L2Norm', 'NONE')
123+ - A dictionary with scaler configuration (e.g., {'type': 'Log', 'offset': 1.0})
124+ - A ScalerConfig instance
125+ - "NONE" (default, no scaling)
117126 relationship_weight_property : str | None, default=None
118127 The property name that contains weight values for relationships
119128 relationship_types : list[str]
@@ -146,7 +155,7 @@ def stream(
146155 max_iterations : int = 20 ,
147156 tolerance : float = 1.0e-7 ,
148157 source_nodes : Any | None = None ,
149- scaler : Any = "NONE" ,
158+ scaler : str | dict [ str , str | int | float ] | ScalerConfig = "NONE" ,
150159 relationship_weight_property : str | None = None ,
151160 relationship_types : list [str ] = ALL_TYPES ,
152161 node_labels : list [str ] = ALL_LABELS ,
@@ -169,8 +178,12 @@ def stream(
169178 The tolerance for convergence detection
170179 source_nodes : Any | None, default=None
171180 The source nodes to start the computation from
172- scaler : Any
173- Scaling configuration for the algorithm
181+ scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
182+ The scaler to use. Can be:
183+ - A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'L1Norm', 'L2Norm', 'NONE')
184+ - A dictionary with scaler configuration (e.g., {'type': 'Log', 'offset': 1.0})
185+ - A ScalerConfig instance
186+ - "NONE" (default, no scaling)
174187 relationship_weight_property : str | None, default=None
175188 The property name that contains weight values for relationships
176189 relationship_types : list[str]
@@ -204,7 +217,7 @@ def write(
204217 max_iterations : int = 20 ,
205218 tolerance : float = 1.0e-7 ,
206219 source_nodes : Any | None = None ,
207- scaler : Any = "NONE" ,
220+ scaler : str | dict [ str , str | int | float ] | ScalerConfig = "NONE" ,
208221 relationship_weight_property : str | None = None ,
209222 relationship_types : list [str ] = ALL_TYPES ,
210223 node_labels : list [str ] = ALL_LABELS ,
@@ -235,8 +248,12 @@ def write(
235248 The tolerance for convergence detection
236249 source_nodes : Any | None, default=None
237250 The source nodes to start the computation from
238- scaler : Any
239- Scaling configuration for the algorithm
251+ scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
252+ The scaler to use. Can be:
253+ - A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'L1Norm', 'L2Norm', 'NONE')
254+ - A dictionary with scaler configuration (e.g., {'type': 'Log', 'offset': 1.0})
255+ - A ScalerConfig instance
256+ - "NONE" (default, no scaling)
240257 relationship_weight_property : str | None, default=None
241258 The property name that contains weight values for relationships
242259 relationship_types : list[str]
@@ -271,7 +288,7 @@ def estimate(
271288 max_iterations : int = 20 ,
272289 tolerance : float = 1.0e-7 ,
273290 source_nodes : Any | None = None ,
274- scaler : Any = "NONE" ,
291+ scaler : str | dict [ str , str | int | float ] | ScalerConfig = "NONE" ,
275292 relationship_weight_property : str | None = None ,
276293 relationship_types : list [str ] = ALL_TYPES ,
277294 node_labels : list [str ] = ALL_LABELS ,
@@ -290,8 +307,12 @@ def estimate(
290307 The tolerance for convergence detection
291308 source_nodes : Any | None, default=None
292309 The source nodes to start the computation from
293- scaler : Any
294- Scaling configuration for the algorithm
310+ scaler : str | dict[str, str | int | float] | ScalerConfig, default="NONE"
311+ The scaler to use. Can be:
312+ - A string (e.g., 'MinMax', 'Mean', 'Max', 'Log', 'StdScore', 'Center', 'L1Norm', 'L2Norm', 'NONE')
313+ - A dictionary with scaler configuration (e.g., {'type': 'Log', 'offset': 1.0})
314+ - A ScalerConfig instance
315+ - "NONE" (default, no scaling)
295316 relationship_weight_property : str | None, default=None
296317 The property name that contains weight values for relationships
297318 relationship_types : list[str]
0 commit comments