Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data scaling: API and documentation #483

Open
elcorto opened this issue Sep 12, 2023 · 0 comments
Open

Data scaling: API and documentation #483

elcorto opened this issue Sep 12, 2023 · 0 comments
Labels
api documentation Improvements or additions to documentation

Comments

@elcorto
Copy link
Member

elcorto commented Sep 12, 2023

From mala/datahandling/data_scaler.py:

DataScaler.transform()

    def transform(self, unscaled):
        """
        Transform data from unscaled to scaled.

        Unscaled means real world data, scaled means data as is used in
        the network. Data is transformed in-place.

        Parameters
        ----------
        unscaled : torch.Tensor
            Real world data.

        Returns
        -------
        scaled : torch.Tensor
            Scaled data.
        """

That method in-place modifies the array unscaled (that is documented), but it returns nothing (so None), so the doc string needs to be adapted (remove Returns section).

The method DataScaler.inverse_transform() returns a new array and doesn't modify the scaled input array.

The naming of the methods suggests that DataScaler operates like e.g., sklearn.preprocessing.StandardScaler, but this API is different in the following ways:

@elcorto elcorto added documentation Improvements or additions to documentation api labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant