A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix example
Akshay Agrawalacfad012c38e
diff --git a/examples/embeddings/rotational_invariance.py b/examples/embeddings/rotational_invariance.pyindex 890837e158..ecd504acdc 100644--- a/examples/embeddings/rotational_invariance.py+++ b/examples/embeddings/rotational_invariance.py@@ -57,22 +57,22 @@ def __(E_X, degrees, mde, mo, rotated_embedding):Embeddings try to be faithful to the original data by minimizingthe distortion between pairwise relationships of items, on average.For this embedding $X$, the average distortion is $E(X) = {E_X:0.4f}$.-+## Rotational InvarianceEmbeddings are _rotationally invariant_: the distortion doesn't changewith rotation.-+**Try it!** Rotate the embedding {degrees} degrees toproduce a new embedding $\hat X$:\[- \hat X = \begin{{bmatrix}}+ \hat X = X \begin{{bmatrix}}\cos({degrees.value} \degree) & -\sin({degrees.value} \degree) \\\sin({degrees.value} \degree) & \cos({degrees.value} \degree)- \end{{bmatrix}} X+ \end{{bmatrix}}\]--++The average distortion of the rotated embedding is $E(\hat X) = {_E_X_hat:0.4f}$,which should match $E(X)$!"""