@@ -294,18 +294,24 @@ def fit(
294294 Parameters
295295 ----------
296296 data : pd.DataFrame
297- The input data to be used for the fitting .
297+ The input data to be used for the SOM algorithm .
298298 directional_variables : List[str], optional
299- A list with the directional variables (will be transformed to u and v).
299+ A list of directional variables that will be transformed to u and v components.
300+ Then, to use custom_scale_factor, you must specify the variables names with the u and v suffixes.
301+ Example: directional_variables=["Dir"], custom_scale_factor={"Dir_u": [0, 1], "Dir_v": [0, 1]}.
300302 Default is [].
301303 custom_scale_factor : dict, optional
302304 A dictionary specifying custom scale factors for normalization.
305+ If normalize_data is True, this will be used to normalize the data.
306+ Example: {"Hs": [0, 10], "Tp": [0, 10]}.
303307 Default is {}.
304308 num_iteration : int, optional
305309 The number of iterations for the SOM fitting.
306310 Default is 1000.
307311 normalize_data : bool, optional
308- A flag to normalize the data. Default is False.
312+ A flag to normalize the data.
313+ If True, the data will be normalized using the custom_scale_factor.
314+ Default is False.
309315 """
310316
311317 super ().fit (
@@ -382,16 +388,22 @@ def fit_predict(
382388 data : pd.DataFrame
383389 The input data to be used for the SOM algorithm.
384390 directional_variables : List[str], optional
385- A list of directional variables (will be transformed to u and v).
391+ A list of directional variables that will be transformed to u and v components.
392+ Then, to use custom_scale_factor, you must specify the variables names with the u and v suffixes.
393+ Example: directional_variables=["Dir"], custom_scale_factor={"Dir_u": [0, 1], "Dir_v": [0, 1]}.
386394 Default is [].
387395 custom_scale_factor : dict, optional
388396 A dictionary specifying custom scale factors for normalization.
397+ If normalize_data is True, this will be used to normalize the data.
398+ Example: {"Hs": [0, 10], "Tp": [0, 10]}.
389399 Default is {}.
390400 num_iteration : int, optional
391401 The number of iterations for the SOM fitting.
392402 Default is 1000.
393403 normalize_data : bool, optional
394- A flag to normalize the data. Default is False.
404+ A flag to normalize the data.
405+ If True, the data will be normalized using the custom_scale_factor.
406+ Default is False.
395407
396408 Returns
397409 -------
0 commit comments