Skip to content

Commit

Permalink
[ADD] visualization code for figure 2(b)
Browse files Browse the repository at this point in the history
  • Loading branch information
yehjin-shin committed Nov 12, 2024
1 parent cf3985c commit 6faa8ff
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Beyond Self-Attention for Sequential Recommendation (BSARec) leverages Fourier t
![BSARec](fig/model_architecture.png)

## Updates
- (Nov 12, 2024) add visulaization code for figure 2(b)
- (Oct 18, 2024) correct default argument for layer-specific values in FEARec
- (Oct 18, 2024) rename variables in model checkpoint
- (Oct 18, 2024) organize layer classes within each model file
Expand Down
205 changes: 205 additions & 0 deletions src/visualize/figure2.ipynb

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions src/visualize/figure.ipynb → src/visualize/figure3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"id": "f0b6fcdc-4bf5-495a-baba-e9696d8ef6b3",
"metadata": {},
"source": [
"# 0. Import Modules"
"# Visualization Code for Figure 3\n",
"## 0. Import Modules"
]
},
{
Expand Down Expand Up @@ -35,7 +36,7 @@
"id": "7eabd185-f594-46a0-913a-52350ebca7cb",
"metadata": {},
"source": [
"# 1. Sequence Output\n",
"## 1. Sequence Output\n",
"\n",
"### Function `get_seqout`\n",
"- **Goal:**\n",
Expand Down Expand Up @@ -99,7 +100,7 @@
"id": "38188392-2a8c-4698-9e87-be10f28369f3",
"metadata": {},
"source": [
"# 2. Cosine Similarity\n",
"## 2. Cosine Similarity\n",
"- Compute the cosine similarity for every pair of output sequences in the test dataset and then average these pairwise similarities. "
]
},
Expand Down Expand Up @@ -158,7 +159,7 @@
"id": "3f7878b0-2755-445d-995d-734a41a7c5c7",
"metadata": {},
"source": [
"# 2. Singular Value\n",
"## 3. Singular Value\n",
"- Compute the singular values of a matrix and divide each of them by the largest value to obtain the normalized singular values."
]
},
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 6faa8ff

Please sign in to comment.