Task 6 (Optional): Upload a Custom Recipe
H2O has built and open-sourced several recipes, which can be used as templates. For this experiment, we could use the text_sentiment_transformer.py recipe which extracts sentiment from text using pre-trained models from TextBlob.
In this step, we will show you how to add the Sentiment Transformer. We don't recommend that you run this on Aquarium, as Aquarium provides a small environment; the experiment might not finish on time or might not give you the expected results. If you are trying to observe how recipes can help improve an NLP experiment, we recommend you to use a bigger machine with more resources to see the improvements.
In the Experiments section, click on the three dots next to the experiment
Sentiment Analysis
. Click NEW/CONTINUE and select WITH SAME SETTINGS. The following dashboard will appear:- Click on the Expert Settings option.
A new window with Expert Experiment Settings will appear. Here you can either upload a custom recipe or load a custom recipe from a URL:
a. The first way to upload a custom recipe is by clicking on the ADD CUSTOM RECIPES drop-down menu and selecting FROM COMPUTER (a) option: this option allows you to upload custom recipes located on your computer. We will not use this option.
b. The second way to upload a custom recipe is by clicking on the ADD CUSTOM RECIPES drop-down menu and selecting FROM URL (b): this option allows you to upload a recipe located on Github. We will use this option. Click this (b) option and paste the following custom recipe:
https://raw.githubusercontent.com/h2oai/driverlessai-recipes/rel-1.9.1/transformers/nlp/text_sentiment_transformer.py
While the recipe is uploading, the following will appear (Driverless AI automatically performs basic acceptance tests for all custom recipes (this can de enable/disable):
Driverless AI offers several available recipes that can be accessed when clicking on the OFFICIAL RECIPES button(c):
Whenever you use a recipe, you have access to the following recipe settings (e.g., transformers, models, scorers):
a. Include specific transformers - Select the transformer(s) that you want to use in the experiment. Use the Check All/Uncheck All button to quickly add or remove all transfomers at once. If you uncheck all transformers, Driverless AI will ignore this setting and will use the default list of transformers for that experiment. This list of transformers will vary for each experiment.
b. Include specific models - Specify the types of models that you want Driverless AI to build in the experiment. This list includes natively supported algorithms and models added with custom recipes.
c. Include specific scorers - Specify the scorer(s) that you want Driverless AI to include when running the experiment.
d. Include specific preprocessing transformers - Specify which transformers to use for preprocessing before other transformers are activated. Preprocessing transformers can take any original features and output arbitrary features that are used by the normal layer of transformers.
e. Include specific data recipes during experiment -
f. Scorer to optimize threshold to be used in other confusion-matrix based scorers (for binary classification) - Specify the scorer used to optimize the binary probability threshold that is being used in related Confusion Matrix based scorers such as Precision, Recall, FalsePositiveRate, FalseDiscoveryRate, FalseOmissionRate, TrueNegativeRate, FalseNegativeRate, and NegativePredictiveValue.
- We will not change anything in the Recipes tab.
Click Save. The selected transformer should now appear on the main Experiment screen as follows:
Now, you are ready to launch the Experiment with the Custom Recipe.
- Submit and view feedback for this page
- Send feedback about H2O Driverless AI | Tutorials to cloud-feedback@h2o.ai