Tymec commited on
Commit
419453c
1 Parent(s): af84d9b

Add new model trained on sentiment140

Browse files
README.md CHANGED
@@ -212,8 +212,8 @@ The following pre-trained models are available for use:
212
  | Dataset | Vectorizer | Classifier | Features | Accuracy on test | Accuracy on self | Model |
213
  | --- | --- | --- | --- | --- | --- | --- |
214
  | `imdb50k` | `tfidf` | `LinearRegression` | 20 000 | 59.59% ± 0.73% | 74.08% ± 0.14% | [Here](models/imdb50k_tfidf_ft20000.pkl) |
215
- | `sentiment140` | `tfidf` | `LinearRegression` | 20 000 | | ❌ | [Here](models/sentiment140_tfidf_ft20000.pkl) |
216
- | `amazonreviews` | `hashing` | `LinearRegression` | 1 048 576 | ❌ | ❌ | [Here](models/amazonreviews_hashing_ft1048576.pkl) |
217
 
218
 
219
  ## License
 
212
  | Dataset | Vectorizer | Classifier | Features | Accuracy on test | Accuracy on self | Model |
213
  | --- | --- | --- | --- | --- | --- | --- |
214
  | `imdb50k` | `tfidf` | `LinearRegression` | 20 000 | 59.59% ± 0.73% | 74.08% ± 0.14% | [Here](models/imdb50k_tfidf_ft20000.pkl) |
215
+ | `sentiment140` | `tfidf` | `LinearRegression` | 20 000 | 52.81% ± 0.03% | ❌ | [Here](models/sentiment140_tfidf_ft20000.pkl) |
216
+ | `amazonreviews` | `tfidf` | `LinearRegression` | 20 000 | ❌ | ❌ | [Here](models/amazonreviews_tfidf_ft1048576.pkl) |
217
 
218
 
219
  ## License
app/model.py CHANGED
@@ -36,7 +36,7 @@ def _identity(x: list[str]) -> list[str]:
36
  def _get_vectorizer(
37
  name: Literal["tfidf", "count", "hashing"],
38
  n_features: int,
39
- df: tuple[float, float] = (0.1, 0.9),
40
  ngram: tuple[int, int] = (1, 2),
41
  ) -> TransformerMixin:
42
  """Get the appropriate vectorizer.
 
36
  def _get_vectorizer(
37
  name: Literal["tfidf", "count", "hashing"],
38
  n_features: int,
39
+ df: tuple[float, float] = (0.1, 1.0),
40
  ngram: tuple[int, int] = (1, 2),
41
  ) -> TransformerMixin:
42
  """Get the appropriate vectorizer.
models/sentiment140_tfidf_ft20000.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef80fcab97f510984f6f75f4579b817b9d2d361f68fc8dd24a3e3e9957fccfcf
3
+ size 1230