StandardNormalVariate#
- class chemotools.scatter.StandardNormalVariate[fuente]
Bases:
TransformerMixin,OneToOneFeatureMixin,BaseEstimatorA transformer that calculates the standard normal variate of the input data.
- Variables:
n_features_in (int) – The number of features in the training data.
- Muestra:
UserWarning – If the standard deviation of a spectrum is zero (spectrum is flat), a warning is raised indicating that the result will contain NaNs.
Referencias
- [1] Åsmund Rinnan, Frans van den Berg, Søren Balling Engelsen,
«Review of the most common pre-processing techniques for near-infrared spectra,» TrAC Trends in Analytical Chemistry 28 (10) 1201-1222 (2009).
Ejemplos
>>> from chemotools.datasets import load_fermentation_train >>> from chemotools.scatter import StandardNormalVariate >>> # Load sample data >>> X, _ = load_fermentation_train() >>> # Initialize StandardNormalVariate >>> snv = StandardNormalVariate() StandardNormalVariate() >>> # Fit and transform the data >>> X_scaled = snv.fit_transform(X)
- fit(X: ndarray, y=None) StandardNormalVariate[fuente]
Fit the transformer to the input data.
- Parámetros:
X (np.ndarray of shape (n_samples, n_features)) – The input data to fit the transformer to.
y (None) – Ignored to align with API.
- Devuelve:
self – The fitted transformer.
- Tipo del valor devuelto:
StandardNormalVariate
- transform(X: ndarray, y=None) ndarray[fuente]
Transform the input data by calculating the standard normal variate.
- Parámetros:
X (np.ndarray of shape (n_samples, n_features)) – The input data to transform.
y (None) – Ignored to align with API.
- Devuelve:
X_transformed – The transformed data.
- Tipo del valor devuelto:
np.ndarray of shape (n_samples, n_features)