Skip to main content
100%

Tut3

✓ Published0🌍 Public
BBenHeubl
Last edited Feb 13, 2020
Created on Feb 13, 2020

This visualization demonstrates a machine-learning workflow for splitting a Brexit-related dataset into training and testing subsets. It shows how 70 percent of the data is randomly sampled for model training, with the remaining 30 percent held out for validation. The code uses base R’s `sample()` function and `nrow()` to compute indices, then applies bracket indexing to partition the data frame. The example highlights a common data-preparation step, with the split proportion clearly visible in the sampling logic. No plotting or rendering libraries are used; the focus is purely on the data-splitting mechanism.

AI-generated description

Similar vizzes