# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import numpy as np
import matplotlib.pyplot as plt

# +
representations = np.load('/u/scr/ethanchi/embeddings/larger/representations.npy')
projection_vector = np.load('/u/scr/ethanchi/embeddings/larger/representations-vector.npy')

verbs = representations[:, 2]
# -

dim = representations.shape[-1]
print(projection_vector.shape, verbs.shape)

# +
plt.figure(figsize=(5, 5))

plt.scatter(verbs[::2] @ projection_vector, np.zeros(verbs[::2].shape[0]), label="present")
plt.scatter(verbs[1::2] @ projection_vector, np.zeros(verbs[1::2].shape[0]), label="past")

plt.legend()

plt.show()

# +
plt.figure(figsize=(5, 5))

plt.scatter(verbs[::2] @ projection_vector, np.zeros(verbs[::2].shape[0]), label="present", s=0.01)
plt.scatter(verbs[1::2] @ projection_vector, np.zeros(verbs[1::2].shape[0]), label="past", s=0.01)

plt.show()
# -

print(np.max(verbs[1::2] @ projection_vector))



StarcoderdataJupyterScriptsDedupFiltered