Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change defaults in EmbeddingIntentClassifier and DIETClassifier #5717

Merged
merged 9 commits into from
Apr 27, 2020
3 changes: 3 additions & 0 deletions changelog/5717.improvement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Change default values for hyper-parameters in ``EmbeddingIntentClassifier`` and ``DIETClassifier``

Use ``scale_loss=False`` in ``DIETClassifier``. Reduce the number of dense dimensions for sparse features of text from 512 to 256 in ``EmbeddingIntentClassifier``.
4 changes: 2 additions & 2 deletions docs/nlu/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ EmbeddingIntentClassifier
+---------------------------------+------------------+--------------------------------------------------------------+
| embedding_dimension | 20 | Dimension size of embedding vectors. |
+---------------------------------+------------------+--------------------------------------------------------------+
| dense_dimension | text: 512 | Dense dimension for sparse features to use if no dense |
| dense_dimension | text: 256 | Dense dimension for sparse features to use if no dense |
| | label: 20 | features are present. |
+---------------------------------+------------------+--------------------------------------------------------------+
| number_of_negative_examples | 20 | The number of incorrect labels. The algorithm will minimize |
Expand Down Expand Up @@ -1702,7 +1702,7 @@ DIETClassifier
| | | over incorrect intent labels, used only if 'loss_type' is |
| | | set to 'margin'. |
+---------------------------------+------------------+--------------------------------------------------------------+
| scale_loss | True | Scale loss inverse proportionally to confidence of correct |
| scale_loss | False | Scale loss inverse proportionally to confidence of correct |
| | | prediction. |
+---------------------------------+------------------+--------------------------------------------------------------+
| regularization_constant | 0.002 | The scale of regularization. |
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exclude = "((.eggs | .git | .pytype | .pytest_cache | build | dist))"

[tool.poetry]
name = "rasa"
version = "1.9.7"
version = "1.10.0a3"
description = "Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants"
authors = [ "Rasa Technologies GmbH <hi@rasa.com>",]
maintainers = [ "Tom Bocklisch <tom@rasa.com>",]
Expand Down
2 changes: 1 addition & 1 deletion rasa/nlu/classifiers/diet_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def required_components(cls) -> List[Type[Component]]:
USE_MAX_NEG_SIM: True,
# If 'True' scale loss inverse proportionally to the confidence
# of the correct prediction
SCALE_LOSS: True,
SCALE_LOSS: False,
dakshvar22 marked this conversation as resolved.
Show resolved Hide resolved
# ## Regularization parameters
# The scale of regularization
REGULARIZATION_CONSTANT: 0.002,
Expand Down
2 changes: 1 addition & 1 deletion rasa/nlu/classifiers/embedding_intent_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def required_components(cls) -> List[Type[Component]]:
# Dimension size of embedding vectors
EMBEDDING_DIMENSION: 20,
# Default dense dimension to use if no dense features are present.
DENSE_DIMENSION: {TEXT: 512, LABEL: 20},
DENSE_DIMENSION: {TEXT: 256, LABEL: 20},
dakshvar22 marked this conversation as resolved.
Show resolved Hide resolved
# The number of incorrect labels. The algorithm will minimize
# their similarity to the user input during training.
NUM_NEG: 20,
Expand Down
2 changes: 1 addition & 1 deletion rasa/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# this file will automatically be changed,
# do not add anything but the version number here!
__version__ = "1.9.7"
__version__ = "1.10.0a3"