9cf8f6cdf6a2008843cb37da6e34b8d10353b0bf,ml/rl/preprocessing/sparse_to_dense.py,PythonSparseToDenseProcessor,process,#PythonSparseToDenseProcessor#Any#,73

Before Change


    ) -> Tuple[torch.Tensor, torch.Tensor]:
        dense_data = torch.ones([len(sparse_data), len(self.feature_id_to_index)])
        dense_presence = torch.zeros(
            [len(sparse_data), len(self.feature_id_to_index)]
        ).byte()
        for i, feature_map in enumerate(sparse_data):
            assert (

After Change


        ).float()
        if self.set_missing_value_to_zero:
            // When we set missing values to 0, we don"t know what is and isn"t missing
            presence = torch.ones_like(values, dtype=torch.bool)
        else:
            presence = values != missing_value
        return values, presence
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: facebookresearch/Horizon
Commit Name: 9cf8f6cdf6a2008843cb37da6e34b8d10353b0bf
Time: 2019-12-12
Author: kittipat@fb.com
File Name: ml/rl/preprocessing/sparse_to_dense.py
Class Name: PythonSparseToDenseProcessor
Method Name: process


Project Name: enthought/chaco
Commit Name: 4f6aed33e977910f8275ba72aaf373ae6d9e1156
Time: 2009-12-15
Author: warren.weckesser@651a555e-23ca-0310-84fe-ca9f7c59d2ea
File Name: enthought/chaco/color_mapper.py
Class Name: ColorMapper
Method Name: map_screen


Project Name: suavecode/SUAVE
Commit Name: 27cc6523d8b9705fb1fbd879847a8d540c8c9d02
Time: 2020-10-01
Author: ebotero@stanford.edu
File Name: trunk/SUAVE/Methods/Weights/Correlations/FLOPS/wing_weight.py
Class Name:
Method Name: find_sweep


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: b656f8857d91b25d5de73de5e429638ece6b13ce
Time: 2016-08-15
Author: bodo.rueckauer@gmail.com
File Name: snntoolbox/model_libs/keras_input_lib.py
Class Name:
Method Name: extract