locan.data.transform.spatial_transformation.standardize#
- locan.data.transform.spatial_transformation.standardize(locdata, loc_properties=None, with_mean=True, with_std=True)[source]#
Transform locdata properties by centering to the mean and property-wise scaling to unit standard deviation (variance).
Note
This function makes use of :func:sklearn.preprocessing.scale and thus works with a biased estimator for the standard deviation.
- Parameters:
locdata (
LocData
) – Localization data to be standardized.loc_properties (
Optional
[list
[str
]]) – Localization properties to be standardized. If None The coordinate_values of locdata are used.with_mean (
bool
) – If True center to the mean.with_std (
bool
) – If True scale to unit standard deviation (variance).
- Returns:
New localization data with standardized properties.
- Return type: