geopfa.extrapolation.standardize_xy¶
- standardize_xy(X_train, X_full)[source]¶
Standardize coordinate arrays using the mean and standard deviation computed from the training coordinates.
- Parameters:
X_train (numpy.ndarray) – Training coordinate array, shape
(n_train, 2).X_full (numpy.ndarray) – Full coordinate array to be standardized using training statistics, shape
(n_full, 2).
- Returns:
X_train_std (numpy.ndarray) – Standardized training coordinates, shape
(n_train, 2).X_full_std (numpy.ndarray) – Standardized full-grid coordinates, shape
(n_full, 2).mean (numpy.ndarray) – Per-dimension mean of the training data, shape
(2,).std (numpy.ndarray) – Per-dimension standard deviation of the training data, shape
(2,).
Notes
This function computes statistics (mean, std) only from the training array X_train, which ensures proper scaling when evaluating generalization.