Skip to content

Commit

Permalink
Merge pull request #492 from superlinked/update-recsys-basic-article
Browse files Browse the repository at this point in the history
Update recSys-basic.md
  • Loading branch information
robertdhayanturner authored Sep 12, 2024
2 parents aa53df3 + a852955 commit ab1c192
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions docs/articles/recSys-basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ news_articles.shape




```markdown
(200853, 6)

```



Expand All @@ -92,9 +92,9 @@ news_articles.shape




```markdown
(8583, 6)

```


By filtering out articles published on or before 2018-01-01, we've refined our article set down from around 200K to roughly 8.5K.
Expand All @@ -109,9 +109,9 @@ news_articles.shape[0]




```markdown
8429

```



Expand All @@ -121,8 +121,9 @@ news_articles = news_articles.sort_values('headline', ascending=False).drop_dupl
print(f"Total number of articles after removing duplicates: {news_articles.shape[0]}")
```

```markdown
Total number of articles after removing duplicates: 8384

```


```python
Expand All @@ -131,10 +132,11 @@ print("Total number of authors : ", news_articles["authors"].nunique())
print("Total number of categories : ", news_articles["category"].nunique())
```

```markdown
Total number of articles : 8384
Total number of authors : 876
Total number of categories : 26

```

## 1. Content-based recommender

Expand Down Expand Up @@ -236,17 +238,19 @@ print("Loading the model...")
model_bert = SentenceTransformer(BERT_SENT)
```

```markdown
Loading the model...

```


```python
vectors = compute_vectors(corpus, model_bert)
```

```markdown
Calculating Embeddings of articles...
Embeddings calculated!

```


```python
Expand Down

0 comments on commit ab1c192

Please sign in to comment.