938e9716faa50db5695d937cae0b30d2cdbfd07c,conceptnet5/vectors/transforms.py,,l2_normalize_rows,#,67
Before Change
Pandas-approved way to represent missing data, so Pandas should be able to
deal with those.
row_norms = np.sqrt(np.sum(np.power(frame, 2), axis="columns")) + offset
return frame.div(row_norms, axis="rows")
def subtract_mean_vector(frame):
After Change
distance are all 1. This enables cosine similarities to be computed as
dot-products between these rows.
index = frame.index
return pd.DataFrame(data=normalize(frame, norm="l2", copy=False, axis=1), index=index)
def subtract_mean_vector(frame):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: commonsense/conceptnet5
Commit Name: 938e9716faa50db5695d937cae0b30d2cdbfd07c
Time: 2017-09-11
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/transforms.py
Class Name:
Method Name: l2_normalize_rows
Project Name: commonsense/conceptnet5
Commit Name: 938e9716faa50db5695d937cae0b30d2cdbfd07c
Time: 2017-09-11
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/transforms.py
Class Name:
Method Name: l1_normalize_columns
Project Name: jakeret/tf_unet
Commit Name: 67bd0ba416366c2b31006a5bf951ae9586135f7c
Time: 2018-06-25
Author: joel.akeret@gmail.com
File Name: tf_unet/layers.py
Class Name:
Method Name: pixel_wise_softmax