Using a Custom Transformer¶
Driverless AI supports a number of feature transformers as described in Driverless AI Transformations. This example shows how you can include a custom transformer in your experiment. Specifically, this example will show how to add the ExpandingMean transformer.
Start an experiment in Driverless AI by selecting your training dataset along with (optionally) validation and testing datasets and then specifying a Target Column. Notice the list of transformers that will be used in the Feature engineering search space (where applicable) section of the experiment summary. Driverless AI determines this list based on the dataset and experiment.
Click on Expert Settings.
Specify the custom recipe using one of the following methods:
On your local machine, clone the https://github.com/h2oai/driverlessai-recipes for this release branch. Then use the Upload Custom Recipe button to upload the driverlessai-recipes/transformers/targetencoding/ExpandingMean.py file.
Click the Load Custom Recipe from URL button, then enter the URL for the raw h2o-3-models.py file (for example, https://raw.githubusercontent.com/h2oai/driverlessai-recipes/rel-1.8.10/transformers/targetencoding/ExpandingMean.py).
Note: Click the Official Recipes (External) button to browse the driverlessai-recipes repository.
Driverless AI will begin uploading and verifying the new custom recipe.
Navigate to the Expert Settings > Recipes tab and click the Include Specific Transformers button. Notice that all transformers are selected by default, including the new ExpandingMean transformer (bottom of page).
Select the transformers that you want to include in the experiment. Use the Check All/Uncheck All button to quickly add or remove all transfomers at once. This example removes all transformers except for OriginalTransformer and ExpandingMean.
Note: If you uncheck all transformers so that none is selected, Driverless AI will ignore this and will use the default list of transformers for that experiment. (See the image in Step 1.) This list of transformers will vary for each experiment.
Edit any additional experiment settings, and then click Launch Experiment. The experiment will run using the custom ExpandingMean transformer.