d3266d6e0ff7d771bd408631f7849e2e4500bebd,conceptnet5/vectors/transforms.py,,make_replacements_faster,#Any#Any#Any#Any#,114
Before Change
most_similar = index.get_nns_by_vector(big_frame.loc[term], 1)[0]
replacements[term] = index_map[most_similar]
if verbose:
random.seed(20)
for replacement_pair in random.sample(replacements.items(), 50):
print(replacement_pair)
return replacements
def make_replacements(small_frame, big_frame):
After Change
most_similar = index_map[most_similar_index]
replacements[term] = most_similar
if verbose and not (len(replacements) % 1001):
print("{} ==> {}".format(term, most_similar))
return replacements
def make_replacements(small_frame, big_frame):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: commonsense/conceptnet5
Commit Name: d3266d6e0ff7d771bd408631f7849e2e4500bebd
Time: 2017-06-16
Author: joanna.teresa.duda@gmail.com
File Name: conceptnet5/vectors/transforms.py
Class Name:
Method Name: make_replacements_faster
Project Name: pymc-devs/pymc3
Commit Name: 63a7c34884b8b5a81218fc8e822841bd031e0ff9
Time: 2013-12-19
Author: jsalvatier@gmail.com
File Name: pymc/examples/latent_occupancy.py
Class Name:
Method Name:
Project Name: Scitator/catalyst
Commit Name: ce9ef7662cad1788017899cda41dbca3cc396b71
Time: 2019-03-22
Author: grinchuk.alexey@gmail.com
File Name: catalyst/rl/offpolicy/sampler.py
Class Name: Sampler
Method Name: run