8ea593ba135faf00d9ba39f393682172366eee9b,conceptnet5/vectors/retrofit.py,,retrofit,#,53

Before Change



    // Subtract the mean so that vectors don"t just clump around common
    // hypernyms
    orig_vecs -= orig_vecs.mean(0)

    // Delete the frame we built, we won"t need its indices again until the end
    del retroframe

After Change


    // subtract the mean of each language, reducing clumping by language and
    // improving multilingual alignment.
    rows_by_language = defaultdict(list)
    for i, label in enumerate(row_labels):
        lang = label.split("/")[2]
        rows_by_language[lang].append(i)
    all_languages = sorted(rows_by_language)
    row_groups = [rows_by_language[lang] for lang in all_languages]

    // Subtract the mean so that vectors don"t just clump around common
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: commonsense/conceptnet5
Commit Name: 8ea593ba135faf00d9ba39f393682172366eee9b
Time: 2017-06-09
Author: rob@luminoso.com
File Name: conceptnet5/vectors/retrofit.py
Class Name:
Method Name: retrofit


Project Name: commonsense/conceptnet5
Commit Name: 8ea593ba135faf00d9ba39f393682172366eee9b
Time: 2017-06-09
Author: rob@luminoso.com
File Name: conceptnet5/vectors/retrofit.py
Class Name:
Method Name: retrofit


Project Name: biocore/scikit-bio
Commit Name: 30d73c7518adcde7ed8340d76e306bd290e0949a
Time: 2016-06-07
Author: gregcaporaso@gmail.com
File Name: skbio/stats/composition.py
Class Name:
Method Name: ancom


Project Name: D2KLab/entity2rec
Commit Name: 23ee13aef276de7ad726eb4825e201d3c885c008
Time: 2018-01-25
Author: enricopalumbo0@gmail.com
File Name: entity2rec/entity2rec.py
Class Name: Entity2Rec
Method Name: content_similarities