Package: hardhat 1.4.0.9002

Hannah Frick

hardhat: Construct Modeling Packages

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.

Authors:Hannah Frick [aut, cre], Davis Vaughan [aut], Max Kuhn [aut], Posit Software, PBC [cph, fnd]

hardhat_1.4.0.9002.tar.gz
hardhat_1.4.0.9002.zip(r-4.5)hardhat_1.4.0.9002.zip(r-4.4)hardhat_1.4.0.9002.zip(r-4.3)
hardhat_1.4.0.9002.tgz(r-4.4-any)hardhat_1.4.0.9002.tgz(r-4.3-any)
hardhat_1.4.0.9002.tar.gz(r-4.5-noble)hardhat_1.4.0.9002.tar.gz(r-4.4-noble)
hardhat_1.4.0.9002.tgz(r-4.4-emscripten)hardhat_1.4.0.9002.tgz(r-4.3-emscripten)
hardhat.pdf |hardhat.html
hardhat/json (API)
NEWS

# Install 'hardhat' in R:
install.packages('hardhat', repos = c('https://tidymodels.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/tidymodels/hardhat/issues

Pkgdown site:https://hardhat.tidymodels.org

Datasets:

On CRAN:

14.76 score 103 stars 419 packages 180 scripts 158k downloads 80 exports 12 dependencies

Last updated 15 days agofrom:b1fe7502e3. Checks:OK: 5 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKDec 10 2024
R-4.5-winNOTEDec 10 2024
R-4.5-linuxNOTEDec 10 2024
R-4.4-winOKDec 10 2024
R-4.4-macOKDec 10 2024
R-4.3-winOKDec 10 2024
R-4.3-macOKDec 10 2024

Exports:add_intercept_columncheck_column_namescheck_no_formula_duplicationcheck_outcomes_are_binarycheck_outcomes_are_factorscheck_outcomes_are_numericcheck_outcomes_are_univariatecheck_prediction_sizecheck_predictors_are_numericcheck_quantile_levelscreate_modeling_packagedefault_formula_blueprintdefault_recipe_blueprintdefault_xy_blueprintdelete_responseextract_fit_engineextract_fit_parsnipextract_fit_timeextract_moldextract_parameter_dialsextract_parameter_set_dialsextract_postprocessorextract_preprocessorextract_quantile_levelsextract_recipeextract_spec_parsnipextract_workflowfct_encode_one_hotforgefrequency_weightsget_data_classesget_levelsget_outcome_levelsimportance_weightsis_blueprintis_case_weightsis_frequency_weightsis_importance_weightsmodel_framemodel_matrixmodel_offsetmoldnew_blueprintnew_case_weightsnew_default_formula_blueprintnew_default_recipe_blueprintnew_default_xy_blueprintnew_formula_blueprintnew_frequency_weightsnew_importance_weightsnew_modelnew_recipe_blueprintnew_xy_blueprintquantile_predrecomposerefresh_blueprintrun_forgerun_moldscreamshrinkspruce_classspruce_class_multiplespruce_numericspruce_numeric_multiplespruce_probspruce_prob_multiplestandardizetuneupdate_blueprintuse_modeling_depsuse_modeling_filesvalidate_column_namesvalidate_no_formula_duplicationvalidate_outcomes_are_binaryvalidate_outcomes_are_factorsvalidate_outcomes_are_numericvalidate_outcomes_are_univariatevalidate_prediction_sizevalidate_predictors_are_numericweighted_table

Dependencies:clifansigluelifecyclemagrittrpillarpkgconfigrlangsparsevctrstibbleutf8vctrs

Creating Modeling Packages With hardhat

Rendered frompackage.Rmdusingknitr::rmarkdownon Dec 10 2024.

Last update: 2024-10-22
Started: 2019-03-08

Forging data for predictions

Rendered fromforge.Rmdusingknitr::rmarkdownon Dec 10 2024.

Last update: 2024-10-22
Started: 2019-02-20

Molding data for modeling

Rendered frommold.Rmdusingknitr::rmarkdownon Dec 10 2024.

Last update: 2024-10-22
Started: 2019-02-20

Readme and manuals

Help Manual

Help pageTopics
Add an intercept column to 'data'add_intercept_column
Default formula blueprintdefault_formula_blueprint mold.formula
Default recipe blueprintdefault_recipe_blueprint mold.recipe
Default XY blueprintdefault_xy_blueprint mold.data.frame mold.matrix
Delete the response from a terms objectdelete_response
Encode a factor as a one-hot indicator matrixfct_encode_one_hot
Forge prediction-ready dataforge
Frequency weightsfrequency_weights
Extract data classes from a data frame or matrixget_data_classes
Extract factor levels from a data frameget_levels get_outcome_levels
Example data for hardhatexample_test example_train hardhat-example-data
Generics for object extractionextract_fit_engine extract_fit_parsnip extract_fit_time extract_mold extract_parameter_dials extract_parameter_set_dials extract_postprocessor extract_preprocessor extract_recipe extract_spec_parsnip extract_workflow hardhat-extract
Importance weightsimportance_weights
Is 'x' a preprocessing blueprint?is_blueprint
Is 'x' a case weights vector?is_case_weights
Is 'x' a frequency weights vector?is_frequency_weights
Is 'x' an importance weights vector?is_importance_weights
Construct a model framemodel_frame
Construct a design matrixmodel_matrix
Extract a model offsetmodel_offset
Create a modeling packagecreate_modeling_package modeling-usethis use_modeling_deps use_modeling_files
Mold data for modelingmold
Extend case weightsnew_case_weights
Create a new default blueprintnew-default-blueprint new_default_formula_blueprint new_default_recipe_blueprint new_default_xy_blueprint
Create a new preprocessing blueprintnew-blueprint new_blueprint new_formula_blueprint new_recipe_blueprint new_xy_blueprint
Construct a frequency weights vectornew_frequency_weights
Construct an importance weights vectornew_importance_weights
Constructor for a base modelnew_model
Create a vector containing sets of quantilesas.matrix.quantile_pred as_tibble.quantile_pred extract_quantile_levels quantile_pred
Refresh a preprocessing blueprintrefresh_blueprint
'forge()' according to a blueprintrun-forge run_forge run_forge.default_formula_blueprint run_forge.default_recipe_blueprint run_forge.default_xy_blueprint
'mold()' according to a blueprintrun-mold run_mold run_mold.default_formula_blueprint run_mold.default_recipe_blueprint run_mold.default_xy_blueprint
Screamscream
Subset only required columnsshrink
Spruce up predictionsspruce spruce_class spruce_numeric spruce_prob
Spruce up multi-outcome predictionsspruce-multiple spruce_class_multiple spruce_numeric_multiple spruce_prob_multiple
Standardize the outcomestandardize
Mark arguments for tuningtune
Update a preprocessing blueprintupdate_blueprint
Ensure that 'data' contains required column namescheck_column_names validate_column_names
Ensure no duplicate terms appear in 'formula'check_no_formula_duplication validate_no_formula_duplication
Ensure that the outcome has binary factorscheck_outcomes_are_binary validate_outcomes_are_binary
Ensure that the outcome has only factor columnscheck_outcomes_are_factors validate_outcomes_are_factors
Ensure outcomes are all numericcheck_outcomes_are_numeric validate_outcomes_are_numeric
Ensure that the outcome is univariatecheck_outcomes_are_univariate validate_outcomes_are_univariate
Ensure that predictions have the correct number of rowscheck_prediction_size validate_prediction_size
Ensure predictors are all numericcheck_predictors_are_numeric validate_predictors_are_numeric
Weighted tableweighted_table