Data inspection establishes the interpretation of each column, the unit of observation, and the outcome. A data dictionary supplies units, category meanings, missing-value codes, and the relationship between repeated cases.
6.1 Inspect a dataset
check_data(iris)
iris: A data.frame with 150 rows and 5 columns.
Data types
* 4 numeric features
* 0 integer features
* 1 factor, which is not ordered
* 0 character features
* 0 date features
Issues
* 0 constant features
* 1 duplicate case
* 0 missing values
Recommendations * Consider removing the duplicate case.
check_data() summarizes types, missingness, distinct values, and duplicate rows. An identical row can represent a duplicate record or a distinct case with identical measurements; its treatment depends on the study design.
name dtype n_distinct n_missing
1 Sepal.Length number 35 0
2 Sepal.Width number 23 0
3 Petal.Length number 43 0
4 Petal.Width number 22 0
5 Species categorical 3 0
profile@level_counts
column level n
1 Species setosa 50
2 Species versicolor 50
3 Species virginica 50
data_profile() returns a typed description of dataset dimensions, column types, missingness, distinct values, and factor levels. Optional fingerprints identify the data represented by the profile.
6.3 Check a configuration against data
config <-setup_SuperConfig(outcome ="Species",hyperparameters =setup_CART(),execution_config =setup_SerialExecution(seed =2026L))findings <-validate_config(config, data = iris)findings
<Diagnostics> No problems found.
validate_config() returns structured diagnostics, with severity and corrective information where available. Configuration validity and data compatibility are separate checks. A recipe without bound data can be valid while data-dependent checks remain pending.
train(preflight = TRUE) runs the configuration and data checks before fitting. Error findings stop training; warning findings are reported.
mod <-train( iris,hyperparameters =setup_CART(),execution_config =setup_SerialExecution(seed =2026L),preflight =TRUE)
2026-10-08 02:53:08 Checking data is ready for training... ✔ [check_supervised]
2026-10-08 02:53:08 ▶ [train]2026-10-08 02:53:08 Training set: 150 cases x 4 features. [summarize_supervised]2026-10-08 02:53:08 //CPU | serial | 1 worker: algorithm 1 thread, tuning 1, outer resampling 1 [msg_resources]2026-10-08 02:53:08 Shared memory (auto): not sharing training data (7.3 kB) -- this run transfers nothing to workers. [report_shared_memory]2026-10-08 02:53:08 Training CART Classification... [train]2026-10-08 02:53:09 Checking data is ready for training... ✔ [check_supervised]