Task 5: Set up experiment
This task guides you through configuring an experiment in H2O Driverless AI (DAI). Experiment setup involves specifying the datasets, target variable, task type, and tuning parameters for model building. Previewing the configuration ensures that the experiment settings meet your requirements before execution.
Run the following code to set up and preview the experiment:
experiment_config = dict(name="My Credit Card Default Model",
task="classification",
train_dataset=train,
test_dataset=test,
accuracy=6,
time=3,
interpretability=7,
scorer="AUC",
target_column="default payment next month",
drop_columns=["ID"])
dai.experiments.preview(**experiment_config)
The following parameters are required for configuring the experiment:
- name: A descriptive name for the experiment.
- task: Specifies the type of task (e.g.,
classification
for this tutorial). - train_dataset and test_dataset: Datasets used for training and testing the model, respectively.
- accuracy: A tuning knob controlling model performance (higher values improve accuracy but increase runtime).
- time: A tuning knob to control the duration of model training (higher values extend training time).
- interpretability: A tuning knob controlling how easily the model can be interpreted (higher values favor simpler models).
- scorer: The evaluation metric to assess model performance (e.g.,
AUC
for this task). - target_column: The target variable to predict (in this case,
default payment next month
). - drop_columns: Columns to exclude from training (e.g., ["ID"]).
The dai.experiments.preview
method generates a detailed preview of the experiment setup. This allows you to verify the configuration before launching the experiment.
Feedback
- Submit and view feedback for this page
- Send feedback about H2O Driverless AI | Tutorials to cloud-feedback@h2o.ai