Skip to content

Commit b8e01a4

Browse files
authored
Merge pull request #17 from rxavier/main
Final touches
2 parents 89fffb2 + c770bf5 commit b8e01a4

File tree

5 files changed

+313
-167
lines changed

5 files changed

+313
-167
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Embedding Encoder
1+
![](https://raw.github.com/cpa-analytics/embedding-encoder/main/logo.png)
22

33
## Overview
44

@@ -110,16 +110,16 @@ Like scikit transformers, Embedding Encoder also has a `inverse_transform` metho
110110

111111
## Plotting embeddings
112112

113-
The idea behind embeddings is that categories that are conceptually similar should have similar vector representations. For example, "December" and "January" should be close to each other when the target variable is ice cream sales.
113+
The idea behind embeddings is that categories that are conceptually similar should have similar vector representations. For example, "December" and "January" should be close to each other when the target variable is ice cream sales (here in the Southern Hemisphere at least!).
114114

115-
This can be analyzed with the `plot_embeddings` function.
115+
This can be analyzed with the `plot_embeddings` function, which depends on Seaborn (`pip install embedding-encoder[sns]` or `pip install embedding-encoder[full]` which includes Tensorflow).
116116

117117
```python
118118
from embedding_encoder import EmbeddingEncoder
119119

120120
ee = EmbeddingEncoder(task="classification")
121121
ee.fit(X=X, y=y)
122-
ee.plot_embeddings(variable="", model="pca")
122+
ee.plot_embeddings(variable="...", model="pca")
123123
```
124124

125125
## Advanced usage
@@ -143,4 +143,4 @@ Installing EE without Tensorflow is as easy as removing "[tf]" from the install
143143

144144
```bash
145145
pip install embedding-encoder
146-
```
146+
```

embedding_encoder/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.3"
1+
__version__ = "0.0.4"

embedding_encoder/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def get_feature_names(self, input_features=None):
467467
return self._columns_out
468468

469469
def plot_embeddings(self, variable: str, model: str = "pca"):
470-
"""Plot embeddings for a variable by passing a fitted EmbeddingEncoder and reducing to 2D.
470+
"""Create a 2D scatterplot of a variable's embeddings. Each dot represents a category.
471471
472472
Parameters
473473
----------

0 commit comments

Comments
 (0)