## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
options(gp3ml.reproducible_examples = TRUE)
library(gp3ml)

## ----clean--------------------------------------------------------------------
data <- simulate_gazepoint_governed_data(12L, 4L, 1L, seed = 2701L)
predictors <- c("tracking_ratio", "blink_rate")
clean <- create_gazepoint_synthetic_manifest("quality_status", predictors)
validate_gazepoint_feature_manifest(clean)

## ----contaminated-------------------------------------------------------------
contaminated <- create_gazepoint_feature_manifest(
  features = c("tracking_ratio", "outcome_summary"),
  scientific_source = c("Synthetic export", "Derived from observed outcome"),
  source_table = c("trial_features", "outcome_table"),
  transformation = c("Predeclared", "Post-outcome aggregation"),
  availability_stage = c("during_exposure", "post_outcome"),
  prediction_time_available = c(TRUE, FALSE),
  outcome_derived = c(FALSE, TRUE),
  post_outcome = c(FALSE, TRUE),
  identifier = FALSE,
  preprocessing_scope = c("resampling_fold", "none"),
  fold_local_required = c(TRUE, FALSE),
  reviewer_notes = c("Permitted synthetic feature", "Deliberate contaminated case")
)
validation <- validate_gazepoint_feature_manifest(contaminated)
validation

