Skip to content

Commit 62f1287

Browse files
Update 06-lsa.md
1 parent 6d06b9a commit 62f1287

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

episodes/06-lsa.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,15 +207,15 @@ Since we don't know what these topics correspond to yet, for now I'll call the f
207207

208208
```python
209209
data[["X", "Y", "Z", "W", "P", "Q"]] = lsa[:, [1, 2, 3, 4, 5, 6]]
210-
print(data)
210+
data.head()
211211
```
212212

213-
Let's also mean-center the data, so that the "average" of all our documents lies at the origin when we plot things in a moment. Otherwise, the origin would be (0,0), which is uninformative for our purposes here.
213+
Let's also mean-center the data, so that the "average" value per topic (across all our documents) lies at the origin when we plot things in a moment. By mean-centering, you are ensuring that the "average" value for each topic becomes the reference point (0,0) in the plot, which can provide more informative insights into the relative distribution and relationships between topics.
214214

215215
```python
216216
from numpy import mean
217217
data[["X", "Y", "Z", "W", "P", "Q"]] -= data[["X", "Y", "Z", "W", "P", "Q"]].mean()
218-
print(data)
218+
data.head()
219219
```
220220

221221
~~~

0 commit comments

Comments
 (0)