Package: hardhat 1.4.0.9002
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:
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')) |
Bug tracker:https://github.com/tidymodels/hardhat/issues
Pkgdown site:https://hardhat.tidymodels.org
- example_test - Example data for hardhat
- example_train - Example data for hardhat
Last updated 15 days agofrom:b1fe7502e3. Checks:OK: 5 NOTE: 2. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Dec 10 2024 |
R-4.5-win | NOTE | Dec 10 2024 |
R-4.5-linux | NOTE | Dec 10 2024 |
R-4.4-win | OK | Dec 10 2024 |
R-4.4-mac | OK | Dec 10 2024 |
R-4.3-win | OK | Dec 10 2024 |
R-4.3-mac | OK | Dec 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.Rmd
usingknitr::rmarkdown
on Dec 10 2024.Last update: 2024-10-22
Started: 2019-03-08
Forging data for predictions
Rendered fromforge.Rmd
usingknitr::rmarkdown
on Dec 10 2024.Last update: 2024-10-22
Started: 2019-02-20
Molding data for modeling
Rendered frommold.Rmd
usingknitr::rmarkdown
on Dec 10 2024.Last update: 2024-10-22
Started: 2019-02-20
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Add an intercept column to 'data' | add_intercept_column |
Default formula blueprint | default_formula_blueprint mold.formula |
Default recipe blueprint | default_recipe_blueprint mold.recipe |
Default XY blueprint | default_xy_blueprint mold.data.frame mold.matrix |
Delete the response from a terms object | delete_response |
Encode a factor as a one-hot indicator matrix | fct_encode_one_hot |
Forge prediction-ready data | forge |
Frequency weights | frequency_weights |
Extract data classes from a data frame or matrix | get_data_classes |
Extract factor levels from a data frame | get_levels get_outcome_levels |
Example data for hardhat | example_test example_train hardhat-example-data |
Generics for object extraction | extract_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 weights | importance_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 frame | model_frame |
Construct a design matrix | model_matrix |
Extract a model offset | model_offset |
Create a modeling package | create_modeling_package modeling-usethis use_modeling_deps use_modeling_files |
Mold data for modeling | mold |
Extend case weights | new_case_weights |
Create a new default blueprint | new-default-blueprint new_default_formula_blueprint new_default_recipe_blueprint new_default_xy_blueprint |
Create a new preprocessing blueprint | new-blueprint new_blueprint new_formula_blueprint new_recipe_blueprint new_xy_blueprint |
Construct a frequency weights vector | new_frequency_weights |
Construct an importance weights vector | new_importance_weights |
Constructor for a base model | new_model |
Create a vector containing sets of quantiles | as.matrix.quantile_pred as_tibble.quantile_pred extract_quantile_levels quantile_pred |
Refresh a preprocessing blueprint | refresh_blueprint |
'forge()' according to a blueprint | run-forge run_forge run_forge.default_formula_blueprint run_forge.default_recipe_blueprint run_forge.default_xy_blueprint |
'mold()' according to a blueprint | run-mold run_mold run_mold.default_formula_blueprint run_mold.default_recipe_blueprint run_mold.default_xy_blueprint |
Scream | scream |
Subset only required columns | shrink |
Spruce up predictions | spruce spruce_class spruce_numeric spruce_prob |
Spruce up multi-outcome predictions | spruce-multiple spruce_class_multiple spruce_numeric_multiple spruce_prob_multiple |
Standardize the outcome | standardize |
Mark arguments for tuning | tune |
Update a preprocessing blueprint | update_blueprint |
Ensure that 'data' contains required column names | check_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 factors | check_outcomes_are_binary validate_outcomes_are_binary |
Ensure that the outcome has only factor columns | check_outcomes_are_factors validate_outcomes_are_factors |
Ensure outcomes are all numeric | check_outcomes_are_numeric validate_outcomes_are_numeric |
Ensure that the outcome is univariate | check_outcomes_are_univariate validate_outcomes_are_univariate |
Ensure that predictions have the correct number of rows | check_prediction_size validate_prediction_size |
Ensure predictors are all numeric | check_predictors_are_numeric validate_predictors_are_numeric |
Weighted table | weighted_table |