c49bd59c7d43af4a3baadbfe17d6d77a6a6040fd,torch_geometric/datasets/particle.py,TrackMLParticleTrackingDataset,get,#TrackMLParticleTrackingDataset#Any#,58

Before Change


        y = pandas.read_csv(truth_path, usecols=["particle_id"],
                            dtype=np.int64)
        y = torch.from_numpy(y.values).squeeze()
        _, y = y.unique(return_inverse=True)
        y = y - 1  // Zero entries are marked as invalid via `-1`.

        return TrackingData(x=x, pos=pos, y=y)

After Change


        y = pandas.read_csv(truth_path, usecols=["particle_id"],
                            dtype=np.int64)
        y = torch.from_numpy(y.values).squeeze()
        y_row = y.unique(return_inverse=True)[1].sub_(1)
        mask = y_row != -1
        y_row = y_row[mask]
        y_col = torch.arange(y.size(0))[mask]
        perm = (y_row * y.size(0) + y_col).argsort()
        y_index = torch.stack([y_row[perm], y_col[perm]], dim=0)

        return TrackingData(x=x, pos=pos, y_index=y_index)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: c49bd59c7d43af4a3baadbfe17d6d77a6a6040fd
Time: 2020-03-25
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/particle.py
Class Name: TrackMLParticleTrackingDataset
Method Name: get


Project Name: has2k1/plotnine
Commit Name: 43ae81ebbe860010aaaa3d739284ebeb8284e59e
Time: 2017-05-07
Author: has2k1@gmail.com
File Name: plotnine/facets/facet.py
Class Name:
Method Name: unique_combs


Project Name: tensorflow/privacy
Commit Name: c30c3fcb7a5498974992d647e260f2ffe1644170
Time: 2020-09-28
Author: dmarn@google.com
File Name: tensorflow_privacy/privacy/membership_inference_attack/privacy_report.py
Class Name:
Method Name: _generate_subplots