Construct Modeling Packages
Add an intercept column to data
Check levels of quantiles
Contrast function for one-hot encodings
Default formula blueprint
Default recipe blueprint
Default XY blueprint
Delete the response from a terms object
Extract a prototype
Encode a factor as a one-hot indicator matrix
Forge prediction-ready data
Frequency weights
Extract data classes from a data frame or matrix
Extract factor levels from a data frame
Generics for object extraction
hardhat: Construct Modeling Packages
Importance weights
Is x a preprocessing blueprint?
Is x a case weights vector?
Is x a frequency weights vector?
Is x an importance weights vector?
Construct a model frame
Construct a design matrix
Extract a model offset
Create a modeling package
Mold data for modeling
Extend case weights
Construct a frequency weights vector
Construct an importance weights vector
Constructor for a base model
Create a new preprocessing blueprint
Create a new default blueprint
Create a vector containing sets of quantiles
Recompose a data frame into another form
Refresh a preprocessing blueprint
forge() according to a blueprint
mold() according to a blueprint
Scream
Subset only required columns
Spruce up multi-outcome predictions
Spruce up predictions
Standardize the outcome
Mark arguments for tuning
Update a preprocessing blueprint
Ensure that data contains required column names
Ensure no duplicate terms appear in formula
Ensure that the outcome has binary factors
Ensure that the outcome has only factor columns
Ensure outcomes are all numeric
Ensure that the outcome is univariate
Ensure that predictions have the correct number of rows
Ensure predictors are all numeric
Weighted table
Building modeling packages is hard. A large amount of effort generally goes into providing an implementation for a new method that is efficient, fast, and correct, but often less emphasis is put on the user interface. A good interface requires specialized knowledge about S3 methods and formulas, which the average package developer might not have. The goal of 'hardhat' is to reduce the burden around building new modeling packages by providing functionality for preprocessing, predicting, and validating input.
Useful links