Skip to content

Commit

Permalink
Diagram for distributed representations as classifier features
Browse files Browse the repository at this point in the history
  • Loading branch information
cgpotts committed Mar 25, 2019
1 parent a478861 commit 53f3055
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file added fig/distreps-as-features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion sst_03_neural_networks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@
"\n",
"As a first step in the direction of neural networks for sentiment, we can connect with our previous unit on distributed representations. Arguably, more than any specific model architecture, this is the major innovation of deep learning: __rather than designing feature functions by hand, we use dense, distributed representations, often derived from unsupervised models__.\n",
"\n",
"<img src=\"fig/distreps-as-features.png\" width=500 alt=\"distreps-as-features.png\" />\n",
"\n",
"Our model will just be `LogisticRegression`, and we'll continue with the experiment framework from the previous notebook. Here is `fit_maxent_classifier` again:"
]
},
Expand Down Expand Up @@ -471,7 +473,7 @@
"\n",
"* At the same time, we might want to collapse infrequent tokens into `$UNK` to make optimization easier.\n",
"\n",
"In `sst`, the function `get_vocab` implements these strategies. Now we can extract the training vocab and use it for the model embedding, secure in the knowledge that we will be able to process tokens outside of this set (by mapping them to `$UNK`)."
"In `utils`, the function `get_vocab` implements these strategies. Now we can extract the training vocab and use it for the model embedding, secure in the knowledge that we will be able to process tokens outside of this set (by mapping them to `$UNK`)."
]
},
{
Expand Down

0 comments on commit 53f3055

Please sign in to comment.