simple fix

This commit is contained in:
Jonas Weinz 2018-07-10 16:23:54 +02:00
parent 7f6c9791ae
commit 16551c64f6

View File

@ -240,7 +240,7 @@ class sample_data_manager(object):
# so far filtering for the latest emoji. TODO: maybe there are also better approaches # so far filtering for the latest emoji. TODO: maybe there are also better approaches
labels_i = emoji2sent([latest(e) for e in emojis_i], only_emoticons=only_emoticons ) labels_i = emoji2sent([latest(e) for e in emojis_i], only_emoticons=only_emoticons )
else: else:
labels_i = np.array([np.mean(emoji2sent(e, only_emoticons=only_emoticons), axis=0) for e in emojis_i]) labels_i = np.array([np.mean(emoji2sent(e, only_emoticons=only_emoticons), axis=0).tolist() for e in emojis_i])
# and filter out all samples we have no label for: # and filter out all samples we have no label for:
wrong_labels = np.isnan(np.linalg.norm(labels_i, axis=1)) wrong_labels = np.isnan(np.linalg.norm(labels_i, axis=1))