48da7a82bc8b9bca8c503f436d982c816573291d,torch_geometric/datasets/pubmed.py,PubMed,_read,#PubMed#,61

Before Change


        path = os.path.join(raw_folder, "Pubmed-Diabetes.NODE.paper.tab")
        with open(path, "r") as f:
            feature_name = next(islice(f, 1, 2))[:-1].split("\t")[1:-1]
            feature_name = list(map(lambda x: x[8:-4], feature_name))

            for line in f:
                s = line[:-1].split("\t")

After Change


                feature = s[2:-1]
                index = [feature_name.index(f.split("=")[0]) for f in feature]
                index = torch.LongTensor(index)
                value = [float(f.split("=")[1]) for f in feature]
                value = torch.FloatTensor(value)
                feature = torch.zeros(500)
                feature[index] = value
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: 48da7a82bc8b9bca8c503f436d982c816573291d
Time: 2017-10-29
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/pubmed.py
Class Name: PubMed
Method Name: _read


Project Name: NifTK/NiftyNet
Commit Name: 898a9387984d8434245618eda47a6e3f052bbba0
Time: 2018-03-20
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/utilities/user_parameters_regex.py
Class Name:
Method Name: match_array


Project Name: ANSSI-FR/SecuML
Commit Name: 14b0d3efb14e998029aa3f2e633afda4b8436118
Time: 2019-05-03
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/tools/plots/barplot.py
Class Name: BarPlot
Method Name: to_json