Skip to content

Instantly share code, notes, and snippets.

@vahbuna
Last active September 1, 2020 11:05
Show Gist options
  • Save vahbuna/bc7d22e33da5fc0f9d54c2e9d3754055 to your computer and use it in GitHub Desktop.
Save vahbuna/bc7d22e33da5fc0f9d54c2e9d3754055 to your computer and use it in GitHub Desktop.
Notes on fastai nlp course

A Code-First Introduction to Natural Language Processing

Introduction

Course Playlist

Course Github

2

Singular Value Decomposition (SVD)

We would clearly expect that the words that appear most frequently in one topic would appear less frequently in the other - otherwise that word wouldn't make a good choice to separate out the two topics. Therefore, we expect the topics to be orthogonal.

The SVD algorithm factorizes a matrix into one matrix with orthogonal columns and one with orthogonal rows (along with a diagonal matrix, which contains the relative importance of each factor).

Non-negative Matrix Factorization (NMF)

Rather than constraining our factors to be orthogonal, another idea would to constrain them to be non-negative. Often positive factors will be more easily interpretable.

Truncated SVD

Tools

fbpca

4

Sparse Matrix Representation

Visualizing sparse matrix structure

Sparse matrix storage formats

coordinate-wise and compressed sparse row (CSR) examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment