Preprocessing

mold()

Mold data for modeling

forge()

Forge prediction-ready data

Prediction

spruce_numeric_multiple() spruce_class_multiple() spruce_prob_multiple()

Spruce up multi-outcome predictions

spruce_numeric() spruce_class() spruce_prob()

Spruce up predictions

quantile_pred() extract_quantile_levels() as_tibble(<quantile_pred>) as.matrix(<quantile_pred>)

Create a vector containing sets of quantiles

Utility

model_frame()

Construct a model frame

model_matrix()

Construct a design matrix

model_offset()

Extract a model offset

delete_response()

Delete the response from a terms object

standardize()

Standardize the outcome

new_model()

Constructor for a base model

add_intercept_column()

Add an intercept column to data

weighted_table()

Weighted table

fct_encode_one_hot()

Encode a factor as a one-hot indicator matrix

Validation

scream()

Scream

shrink()

Subset only required columns

validate_column_names() check_column_names()

Ensure that data contains required column names

validate_no_formula_duplication() check_no_formula_duplication()

Ensure no duplicate terms appear in formula

validate_outcomes_are_binary() check_outcomes_are_binary()

Ensure that the outcome has binary factors

validate_outcomes_are_factors() check_outcomes_are_factors()

Ensure that the outcome has only factor columns

validate_outcomes_are_numeric() check_outcomes_are_numeric()

Ensure outcomes are all numeric

validate_outcomes_are_univariate() check_outcomes_are_univariate()

Ensure that the outcome is univariate

validate_prediction_size() check_prediction_size()

Ensure that predictions have the correct number of rows

validate_predictors_are_numeric() check_predictors_are_numeric()

Ensure predictors are all numeric

Blueprint

default_formula_blueprint() mold(<formula>)

Default formula blueprint

default_recipe_blueprint() mold(<recipe>)

Default recipe blueprint

default_xy_blueprint() mold(<data.frame>) mold(<matrix>)

Default XY blueprint

is_blueprint()

Is x a preprocessing blueprint?

new_formula_blueprint() new_recipe_blueprint() new_xy_blueprint() new_blueprint()

Create a new preprocessing blueprint

new_default_formula_blueprint() new_default_recipe_blueprint() new_default_xy_blueprint()

Create a new default blueprint

refresh_blueprint()

Refresh a preprocessing blueprint

run_forge()

forge() according to a blueprint

run_mold()

mold() according to a blueprint

update_blueprint()

Update a preprocessing blueprint

Case Weights

new_case_weights()

Extend case weights

is_case_weights()

Is x a case weights vector?

Importance Weights

importance_weights()

Importance weights

new_importance_weights()

Construct an importance weights vector

is_importance_weights()

Is x an importance weights vector?

Frequency Weights

frequency_weights()

Frequency weights

new_frequency_weights()

Construct a frequency weights vector

is_frequency_weights()

Is x a frequency weights vector?

Setup

create_modeling_package() use_modeling_deps() use_modeling_files()

Create a modeling package

Information

get_data_classes()

Extract data classes from a data frame or matrix

get_levels() get_outcome_levels()

Extract factor levels from a data frame

Development

tune()

Mark arguments for tuning

extract_workflow() extract_recipe() extract_spec_parsnip() extract_fit_parsnip() extract_fit_engine() extract_mold() extract_preprocessor() extract_postprocessor() extract_tailor() extract_parameter_dials() extract_parameter_set_dials() extract_fit_time()

Generics for object extraction

Data

hardhat-example-data example_train example_test

Example data for hardhat