Skip to content
Snippets Groups Projects
Commit f5d94caa authored by lukas leufen's avatar lukas leufen
Browse files

new function to apply inverse transformation for given mean and std (if required)

parent 4608b470
Branches
Tags
2 merge requests!24include recent development,!23Lukas issue018 feat evaluate train val
......@@ -9,6 +9,18 @@ from typing import Union, Tuple
Data = Union[xr.DataArray, pd.DataFrame]
def apply_inverse_transformation(data, mean, std=None, method="standardise"):
if method == 'standardise':
return standardise_inverse(data, mean, std)
elif method == 'centre':
return centre_inverse(data, mean)
elif method == 'normalise':
# use min/max of data or given min/max
raise NotImplementedError
else:
raise NotImplementedError
def standardise(data: Data, dim: Union[str, int]) -> Tuple[Data, Data, Data]:
"""
This function standardises a xarray.dataarray (along dim) or pandas.DataFrame (along axis) with mean=0 and std=1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment