cbe2758007e312c168aef30328693027b6a4b7e9,conceptnet5/vectors/debias.py,,de_bias_binary,#Any#Any#Any#Any#Any#,439

Before Change



    // Make another component representing the vectors that should not be
    // de-biased: the original space times (1 - applicability).
    result = frame.mul(1 - applicability, axis=0)

    // The sum of these two components is the de-biased space, where de-biasing
    // applies to each row proportional to its applicability.
    np.add(result.values, modified_component.values, out=result.values)
    del modified_component

    // L_2-normalize the resulting rows in-place.
    normalize(result.values, norm="l2", copy=False)
    return result


def de_bias_category(frame, category_examples, bias_examples):
    

After Change



    // Make another component representing the vectors that should not be
    // de-biased: the original space times (1 - applicability).
    np.multiply(1 - applicability.reshape((len(frame), 1)), frame.values,
                out=frame.values)

    // The sum of these two components is the de-biased space, where de-biasing
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: commonsense/conceptnet5
Commit Name: cbe2758007e312c168aef30328693027b6a4b7e9
Time: 2018-06-06
Author: rbeaudoin@luminoso.com
File Name: conceptnet5/vectors/debias.py
Class Name:
Method Name: de_bias_binary


Project Name: geomstats/geomstats
Commit Name: 1ffc5ad914da39a369337c1606a8ba788dbf9055
Time: 2020-08-25
Author: nicolas.guigui@inria.fr
File Name: geomstats/geometry/grassmannian.py
Class Name: Grassmannian
Method Name: random_uniform


Project Name: commonsense/conceptnet5
Commit Name: cbe2758007e312c168aef30328693027b6a4b7e9
Time: 2018-06-06
Author: rbeaudoin@luminoso.com
File Name: conceptnet5/vectors/debias.py
Class Name:
Method Name: de_bias_category