ML model

Good morning Please how can i create my own machine learning model with RASA?

Hi @Fares

This depends on what you want your model to do. Is it an entity extractor, intent classifier, a policy or something else?

It is an intent classifier

Here is an example of a custom intent classifier. Our nlu-examples repo also contains some usage guidelines and you can even open a PR and contribute your classifier code there if you like.

1 Like

Thank you very much this is very helpful. It still just one thing where i have to pute this python code in my rasa project and how declare it?

You can implement your CustomIntentClassifier inside your bot’s project directory: create a new file my_component.py, say, in the project directory and implement your component in there. Then, in the conig.yml file you can integrate this component like this:

pipeline:
- name: WhitespaceTokenizer
# ...
- name: ContVectorsFeaturizer
- name: my_components.CustomIntentClassifier

If you implement it in the rasa nlu examples repo instead, I think you can specify it as - name: rasa_nlu_examples.classifiers.CustomIntentClassifier.

1 Like

thank u