(self, X_sample, y_sample, timestamps_sample, asset_names)
return X_sample_new, y_sample, timestamps_sample, asset_names
Perform transform.

        Parameters
        ----------
        X_sample : torch.Tensor
            Feature vector of shape `(n_channels, lookback, n_assets)`.

        y_sample : torch.Tesnor
            Target vector of shape `(n_channels, horizon, n_assets)`.

        timestamps_sample : datetime
            Time stamp of the sample.

        asset_names
            Asset names corresponding to the last channel of `X_sample` and `y_sample`.

        Returns
        -------
        X_sample_new : torch.Tensor
            Feature vector of shape `(n_channels, lookback, n_assets)` with some elements being set to zero.

        y_sample : torch.Tensor
            Same as input.

        timestamps_sample : datetime
            Same as input.

        asset_names
            Same as input.
Perform transform.
Perform transform .
def __call__(self, X_sample, y_sample, timestamps_sample, asset_names):
        """Perform transform.

        Parameters
        ----------
        X_sample : torch.Tensor
            Feature vector of shape `(n_channels, lookback, n_assets)`.

        y_sample : torch.Tesnor
            Target vector of shape `(n_channels, horizon, n_assets)`.

        timestamps_sample : datetime
            Time stamp of the sample.

        asset_names
            Asset names corresponding to the last channel of `X_sample` and `y_sample`.

        Returns
        -------
        X_sample_new : torch.Tensor
            Feature vector of shape `(n_channels, lookback, n_assets)` with some elements being set to zero.

        y_sample : torch.Tensor
            Same as input.

        timestamps_sample : datetime
            Same as input.

        asset_names
            Same as input.
        """
        X_sample_new = torch.nn.functional.dropout(X_sample, p=self.p, training=self.training)

        return X_sample_new, y_sample, timestamps_sample, asset_names
def __call__ ( self , X_sample , y_sample , timestamps_sample , asset_names ) : X_sample_new = torch . nn . functional . dropout ( X_sample , p = self . p , training = self . training ) return X_sample_new , y_sample , timestamps_sample , asset_names