Splitting Data Into Train and Test Sets in H2O Driverless AI
- Predictive AI
- H2O Driverless AI
This lesson walks through the Data Prep Split action in H2O Driverless AI, used to divide a dataset into training and test sets before modeling. Using a credit score dataset as the example, it covers setting an 80/20 train and test ratio, naming the output files, and choosing a random seed so the split can be reproduced. It also covers optional settings, including a fold column to keep related rows together, a time-based split for forecasting problems, and stratified sampling on the target column so both sets keep the same ratio of good and bad credit scores.
Key takeaways
- How to split a dataset into training and test sets using the Data Prep Split action in Driverless AI
- Why an 80/20 train and test ratio is a common starting point for building a large enough training set
- What stratified sampling does when applied to a target column with an uneven class balance
- The role of a random seed in making a dataset split reproducible across experiments
- When to use a time based split instead of a random split, for forecasting problems trained on past data
Start owning your AI