fynance.features.scale.Scale.fit¶
-
Scale.
fit
(X, kind=None, a=0.0, b=1.0, axis=0, **kwargs)¶ Compute the parameters of the scale transformation.
Parameters: - X : np.ndarray[dtype, ndim=1 or 2]
Data to fit the parameters of scale transformation.
- kind : str, optional
- “std” : Standardized scale transformation (default), see
standardize
. - “norm” : Normalized scale transformation, see
normalize
. - “raw” : No scale is apply.
- “roll_std” : Standardized scale transformation, computed with
rolling mean and standard deviation (see
roll_standardize
). - “roll_norm” : Normalized scale transformation, computed with
roling minimum and maximum (see
roll_normalize
).
- “std” : Standardized scale transformation (default), see
- a, b : float or array_like, optional
Some scale factors to apply after the transformation. By default is respectively 0 and 1.
- axis : int, optional
Axis along which compute the scale parameters. Default is 0.
- **kwargs : keyword arguments for particular functions
E.g: for rolling function set
w
the lagged window (seeroll_normalize
) or for rolling standardization setkind_moment={"s", "w", "e"}
(seeroll_standardize
).