safepredict
safepredict copied to clipboard
Optionally validate new_data based on prototype of training data with hardhart infrastructure
Something along the lines of
validator <- vctrs_scan_data_and_get_prototype(training_data)
safe_predict(object, new_data = test_data, validator = validator)
where validator
gets the stuff we need for hardhat::scream()
to sanity check the input data. So the extent possible, i.e. factor repair and so, match the hardhat
behaviors that Hadley suggested.