dials/ 0000755 0001762 0000144 00000000000 14565635766 011375 5 ustar ligges users dials/NAMESPACE 0000644 0001762 0000144 00000014464 14565615206 012610 0 ustar ligges users # Generated by roxygen2: do not edit by hand
S3method("[",parameters)
S3method("names<-",parameters)
S3method(encode_unit,default)
S3method(encode_unit,qual_param)
S3method(encode_unit,quant_param)
S3method(extract_parameter_dials,parameters)
S3method(finalize,default)
S3method(finalize,list)
S3method(finalize,logical)
S3method(finalize,param)
S3method(finalize,parameters)
S3method(grid_latin_hypercube,list)
S3method(grid_latin_hypercube,param)
S3method(grid_latin_hypercube,parameters)
S3method(grid_latin_hypercube,workflow)
S3method(grid_max_entropy,list)
S3method(grid_max_entropy,param)
S3method(grid_max_entropy,parameters)
S3method(grid_max_entropy,workflow)
S3method(grid_random,list)
S3method(grid_random,param)
S3method(grid_random,parameters)
S3method(grid_random,workflow)
S3method(grid_regular,list)
S3method(grid_regular,param)
S3method(grid_regular,parameters)
S3method(grid_regular,workflow)
S3method(parameters,default)
S3method(parameters,list)
S3method(parameters,param)
S3method(print,parameters)
S3method(print,qual_param)
S3method(print,quant_param)
S3method(type_sum,param)
S3method(update,parameters)
S3method(vec_cast,data.frame.parameters)
S3method(vec_cast,parameters.data.frame)
S3method(vec_cast,parameters.parameters)
S3method(vec_cast,parameters.tbl_df)
S3method(vec_cast,tbl_df.parameters)
S3method(vec_proxy,parameters)
S3method(vec_ptype2,data.frame.parameters)
S3method(vec_ptype2,parameters.data.frame)
S3method(vec_ptype2,parameters.parameters)
S3method(vec_ptype2,parameters.tbl_df)
S3method(vec_ptype2,tbl_df.parameters)
S3method(vec_restore,parameters)
export(Laplace)
export(activation)
export(adjust_deg_free)
export(all_neighbors)
export(batch_size)
export(class_weights)
export(conditional_min_criterion)
export(conditional_test_statistic)
export(conditional_test_type)
export(confidence_factor)
export(cost)
export(cost_complexity)
export(deg_free)
export(degree)
export(degree_int)
export(diagonal_covariance)
export(dist_power)
export(dropout)
export(encode_unit)
export(epochs)
export(extract_parameter_dials)
export(extrapolation)
export(finalize)
export(freq_cut)
export(fuzzy_thresholding)
export(get_batch_sizes)
export(get_log_p)
export(get_n)
export(get_n_frac)
export(get_n_frac_range)
export(get_p)
export(get_rbf_range)
export(grid_latin_hypercube)
export(grid_max_entropy)
export(grid_random)
export(grid_regular)
export(harmonic_frequency)
export(has_unknowns)
export(hidden_units)
export(initial_umap)
export(is_unknown)
export(kernel_offset)
export(learn_rate)
export(loss_reduction)
export(lower_quantile)
export(max_nodes)
export(max_num_terms)
export(max_rules)
export(max_times)
export(max_tokens)
export(min_dist)
export(min_n)
export(min_times)
export(min_unique)
export(mixture)
export(momentum)
export(mtry)
export(mtry_long)
export(mtry_prop)
export(neighbors)
export(new_qual_param)
export(new_quant_param)
export(no_global_pruning)
export(num_breaks)
export(num_clusters)
export(num_comp)
export(num_hash)
export(num_knots)
export(num_leaves)
export(num_random_splits)
export(num_runs)
export(num_terms)
export(num_tokens)
export(over_ratio)
export(parameters)
export(parameters_constr)
export(penalty)
export(penalty_L1)
export(penalty_L2)
export(predictor_prop)
export(predictor_winnowing)
export(prior_mixture_threshold)
export(prior_outcome_range)
export(prior_slab_dispersion)
export(prior_terminal_node_coef)
export(prior_terminal_node_expo)
export(prod_degree)
export(prune)
export(prune_method)
export(pull_dials_object)
export(range_get)
export(range_set)
export(range_validate)
export(ranger_class_rules)
export(ranger_reg_rules)
export(ranger_split_rules)
export(rate_decay)
export(rate_initial)
export(rate_largest)
export(rate_reduction)
export(rate_schedule)
export(rate_step_size)
export(rate_steps)
export(rbf_sigma)
export(regularization_factor)
export(regularization_method)
export(regularize_depth)
export(rule_bands)
export(sample_prop)
export(sample_size)
export(scale_factor)
export(scale_pos_weight)
export(select_features)
export(shrinkage_correlation)
export(shrinkage_frequencies)
export(shrinkage_variance)
export(signed_hash)
export(significance_threshold)
export(smoothness)
export(spline_degree)
export(splitting_rule)
export(stop_iter)
export(summary_stat)
export(surv_dist)
export(survival_link)
export(svm_margin)
export(target_weight)
export(threshold)
export(token)
export(tree_depth)
export(trees)
export(trim_amount)
export(unbiased_rules)
export(under_ratio)
export(unique_cut)
export(unknown)
export(validation_set_prop)
export(value_inverse)
export(value_sample)
export(value_seq)
export(value_set)
export(value_transform)
export(value_validate)
export(values_activation)
export(values_initial_umap)
export(values_prune_method)
export(values_regularization_method)
export(values_scheduler)
export(values_summary_stat)
export(values_surv_dist)
export(values_survival_link)
export(values_test_statistic)
export(values_test_type)
export(values_token)
export(values_weight_func)
export(values_weight_scheme)
export(vocabulary_size)
export(weight)
export(weight_func)
export(weight_scheme)
export(window_size)
import(rlang)
importFrom(DiceDesign,dmaxDesign)
importFrom(DiceDesign,lhsDesign)
importFrom(dplyr,"%>%")
importFrom(dplyr,filter)
importFrom(dplyr,mutate)
importFrom(dplyr,pull)
importFrom(dplyr,select)
importFrom(glue,glue)
importFrom(glue,glue_collapse)
importFrom(hardhat,extract_parameter_dials)
importFrom(lifecycle,deprecated)
importFrom(pillar,type_sum)
importFrom(purrr,map)
importFrom(purrr,map2)
importFrom(purrr,map2_dfc)
importFrom(purrr,map_chr)
importFrom(purrr,map_dbl)
importFrom(purrr,map_dfc)
importFrom(purrr,map_int)
importFrom(purrr,map_lgl)
importFrom(scales,is.trans)
importFrom(scales,transform_log10)
importFrom(scales,transform_log2)
importFrom(stats,runif)
importFrom(tibble,as_tibble)
importFrom(tibble,is_tibble)
importFrom(tibble,new_tibble)
importFrom(tibble,tibble)
importFrom(utils,globalVariables)
importFrom(utils,installed.packages)
importFrom(vctrs,df_cast)
importFrom(vctrs,new_data_frame)
importFrom(vctrs,stop_incompatible_cast)
importFrom(vctrs,tib_cast)
importFrom(vctrs,tib_ptype2)
importFrom(vctrs,vec_c)
importFrom(vctrs,vec_cast)
importFrom(vctrs,vec_cbind)
importFrom(vctrs,vec_init)
importFrom(vctrs,vec_proxy)
importFrom(vctrs,vec_ptype)
importFrom(vctrs,vec_ptype2)
importFrom(vctrs,vec_rbind)
importFrom(vctrs,vec_restore)
importFrom(vctrs,vec_slice)
importFrom(withr,with_seed)
dials/LICENSE 0000644 0001762 0000144 00000000053 14153712300 012345 0 ustar ligges users YEAR: 2021
COPYRIGHT HOLDER: dials authors
dials/README.md 0000644 0001762 0000144 00000005311 14565617500 012636 0 ustar ligges users
# dials
[](https://github.com/tidymodels/dials/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/tidymodels/dials?branch=main)
[](https://CRAN.R-project.org/package=dials)
[](https://CRAN.R-project.org/package=dials)
[](https://lifecycle.r-lib.org/articles/stages.html)
## Overview
This package contains *infrastructure* to create and manage values of
tuning parameters for the tidymodels packages. If you are looking for
*how to* tune parameters in tidymodels, please look at the
[tune](https://tune.tidymodels.org/) package and
[tidymodels.org](https://www.tidymodels.org/).
The name reflects the idea that tuning predictive models can be like
turning a set of dials on a complex machine under duress.
## Installation
You can install the released version of dials from
[CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("dials")
```
You can install the development version from Github with:
``` r
# install.packages("pak")
pak::pak("tidymodels/dials")
```
## Contributing
Please note that the dials project is released with a [Contributor Code
of Conduct](https://dials.tidymodels.org/CODE_OF_CONDUCT.html). By
contributing to this project, you agree to abide by its terms.
- For questions and discussions about tidymodels packages, modeling, and
machine learning, please [post on RStudio
Community](https://community.rstudio.com/new-topic?category_id=15&tags=tidymodels,question).
- If you think you have encountered a bug, please [submit an
issue](https://github.com/tidymodels/dials/issues).
- Either way, learn how to create and share a
[reprex](https://reprex.tidyverse.org/articles/articles/learn-reprex.html)
(a minimal, reproducible example), to clearly communicate about your
code.
- Check out further details on [contributing guidelines for tidymodels
packages](https://www.tidymodels.org/contribute/) and [how to get
help](https://www.tidymodels.org/help/).
dials/man/ 0000755 0001762 0000144 00000000000 14565615206 012133 5 ustar ligges users dials/man/prune_method.Rd 0000644 0001762 0000144 00000001167 14153712300 015102 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_prune_method.R
\docType{data}
\name{prune_method}
\alias{prune_method}
\alias{values_prune_method}
\title{MARS pruning methods}
\format{
An object of class \code{character} of length 6.
}
\usage{
prune_method(values = values_prune_method)
values_prune_method
}
\arguments{
\item{values}{A character string of possible values. See \code{values_prune_method}
in examples below.}
}
\description{
MARS pruning methods
}
\details{
This parameter is used in \code{parsnip:::mars()}.
}
\examples{
values_prune_method
prune_method()
}
\keyword{datasets}
dials/man/rbf_sigma.Rd 0000644 0001762 0000144 00000002057 14565421125 014352 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_kernel.R
\name{rbf_sigma}
\alias{rbf_sigma}
\alias{scale_factor}
\alias{kernel_offset}
\title{Kernel parameters}
\usage{
rbf_sigma(range = c(-10, 0), trans = transform_log10())
scale_factor(range = c(-10, -1), trans = transform_log10())
kernel_offset(range = c(0, 2), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
Parameters related to the radial basis or other kernel functions.
}
\details{
\code{degree()} can also be used in kernel functions.
}
\examples{
rbf_sigma()
scale_factor()
kernel_offset()
}
dials/man/num_clusters.Rd 0000644 0001762 0000144 00000001443 14565421125 015142 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_num_clusters.R
\name{num_clusters}
\alias{num_clusters}
\title{Number of Clusters}
\usage{
num_clusters(range = c(1L, 10L), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
Used in most \code{tidyclust} models.
}
\examples{
num_clusters()
}
dials/man/Laplace.Rd 0000644 0001762 0000144 00000001717 14565421125 013764 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_Laplace.R
\name{Laplace}
\alias{Laplace}
\title{Laplace correction parameter}
\usage{
Laplace(range = c(0, 3), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\value{
A function with classes \code{"quant_param"} and \code{"param"}.
}
\description{
Laplace correction for smoothing low-frequency counts.
}
\details{
This parameter is often used to correct for zero-count data in tables or
proportions.
}
\examples{
Laplace()
}
dials/man/prior_slab_dispersion.Rd 0000644 0001762 0000144 00000002577 14565421125 017023 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_sparse_bayes_pca.R
\name{prior_slab_dispersion}
\alias{prior_slab_dispersion}
\alias{prior_mixture_threshold}
\title{Bayesian PCA parameters}
\usage{
prior_slab_dispersion(range = c(-1/2, log10(3)), trans = transform_log10())
prior_mixture_threshold(range = c(0, 1), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
A numeric parameter function representing parameters for the spike-and-slab
prior used by \code{embed::step_pca_sparse_bayes()}.
}
\details{
\code{prior_slab_dispersion()} is related to the prior for the case where a PCA
loading is selected (i.e. non-zero). Smaller values result in an increase in
zero coefficients.
\code{prior_mixture_threshold()} is used to threshold the prior to determine which
parameters are non-zero or zero. Increasing this parameter increases the
number of zero coefficients.
}
\examples{
mixture()
}
dials/man/trim_amount.Rd 0000644 0001762 0000144 00000001443 14565421125 014755 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_trim_amount.R
\name{trim_amount}
\alias{trim_amount}
\title{Amount of Trimming}
\usage{
trim_amount(range = c(0, 0.5), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
Used in \code{recipes::step_impute_mean()}.
}
\examples{
trim_amount()
}
dials/man/window_size.Rd 0000644 0001762 0000144 00000001461 14565421125 014760 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_window_size.R
\name{window_size}
\alias{window_size}
\title{Parameter for the moving window size}
\usage{
window_size(range = c(3L, 11L), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
Used in \code{recipes::step_window()}.
}
\examples{
window_size()
}
dials/man/max_times.Rd 0000644 0001762 0000144 00000001602 14565421125 014402 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_max_times.R
\name{max_times}
\alias{max_times}
\alias{min_times}
\title{Word frequencies for removal}
\usage{
max_times(range = c(1L, as.integer(10^5)), trans = NULL)
min_times(range = c(0L, 1000L), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
Used in \code{textrecipes::step_tokenfilter()}.
}
\examples{
max_times()
min_times()
}
dials/man/all_neighbors.Rd 0000644 0001762 0000144 00000000623 14153712300 015215 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_all_neighbors.R
\name{all_neighbors}
\alias{all_neighbors}
\title{Parameter to determine which neighbors to use}
\usage{
all_neighbors(values = c(TRUE, FALSE))
}
\arguments{
\item{values}{A vector of possible values (TRUE or FALSE).}
}
\description{
Used in \code{themis::step_bsmote()}.
}
\examples{
all_neighbors()
}
dials/man/momentum.Rd 0000644 0001762 0000144 00000001473 14565421125 014263 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_momentum.R
\name{momentum}
\alias{momentum}
\title{Gradient descent momentum parameter}
\usage{
momentum(range = c(0, 1), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
A useful parameter for neural network models using gradient descent
}
\examples{
momentum()
}
dials/man/class_weights.Rd 0000644 0001762 0000144 00000001736 14565421125 015263 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_class_weights.R
\name{class_weights}
\alias{class_weights}
\title{Parameters for class weights for imbalanced problems}
\usage{
class_weights(range = c(1, 10), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
This parameter can be used to moderate how much influence certain classes
receive during training.
}
\details{
Used in \code{brulee::brulee_logistic_reg()} and \code{brulee::brulee_mlp()}
}
\examples{
class_weights()
}
dials/man/type_sum.param.Rd 0000644 0001762 0000144 00000001451 14153712300 015351 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/type_sum.R
\name{type_sum.param}
\alias{type_sum.param}
\title{Succinct summary of parameter objects}
\usage{
\method{type_sum}{param}(x)
}
\arguments{
\item{x}{A \code{param} object to summarise.}
}
\value{
A character value.
}
\description{
\code{type_sum()} controls how objects are shown when inside tibble
columns.
}
\details{
For \code{param} objects, the summary prefix is either
"\code{dparam}" (if a qualitative parameter) or "\code{nparam}" (if
quantitative). Additionally, brackets are used to indicate if
there are unknown values. For example, "\verb{nparam[?]}" would
indicate that part of the numeric range is has not been
finalized and "\verb{nparam[+]}" indicates a parameter that is
complete.
}
\keyword{internal}
dials/man/pull_dials_object.Rd 0000644 0001762 0000144 00000002167 14337647441 016111 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pull_dials_object.R
\name{pull_dials_object}
\alias{pull_dials_object}
\title{Return a dials parameter object associated with parameters}
\usage{
pull_dials_object(x, id, ...)
}
\arguments{
\item{x}{The results of a call to \code{\link[=parameters]{parameters()}}, a recipe, model
specification, or workflow.}
\item{id}{A single string for the \code{id} of the parameter.}
\item{...}{Not currently used.}
}
\value{
A \code{dials} parameter object.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}}
This function has been deprecated; please use
\code{hardhat::extract_parameter_dials()} instead.
\code{pull_dials_object()} can extract a single \code{dials} parameter object from
different types of objects (e.g. parameter sets, recipes, etc.).
}
\examples{
glmn_param <- parameters(lambda = penalty(), mixture())
# pull_dials_object(glmn_param, "lambda")
# ->
extract_parameter_dials(glmn_param, "lambda")
}
\keyword{internal}
dials/man/mixture.Rd 0000644 0001762 0000144 00000002332 14565421125 014112 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_mixture.R
\name{mixture}
\alias{mixture}
\title{Mixture of penalization terms}
\usage{
mixture(range = c(0, 1), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
A numeric parameter function representing the relative amount of penalties
(e.g. L1, L2, etc) in regularized models.
}
\details{
This parameter is used for regularized or penalized models such as
\code{parsnip::linear_reg()}, \code{parsnip::logistic_reg()}, and others. It is
formulated as the proportion of L1 regularization (i.e. lasso) in the model.
In the \code{glmnet} model, \code{mixture = 1} is a pure lasso model while \code{mixture = 0}
indicates that ridge regression is being used.
}
\examples{
mixture()
}
dials/man/smoothness.Rd 0000644 0001762 0000144 00000001432 14565421125 014617 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_smoothness.R
\name{smoothness}
\alias{smoothness}
\title{Kernel Smoothness}
\usage{
smoothness(range = c(0.5, 1.5), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
Used in \code{discrim::naive_Bayes()}.
}
\examples{
smoothness()
}
dials/man/max_tokens.Rd 0000644 0001762 0000144 00000001477 14565421125 014576 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_max_tokens.R
\name{max_tokens}
\alias{max_tokens}
\title{Maximum number of retained tokens}
\usage{
max_tokens(range = c(0L, as.integer(10^3)), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
Used in \code{textrecipes::step_tokenfilter()}.
}
\examples{
max_tokens()
}
dials/man/xgboost_parameters.Rd 0000644 0001762 0000144 00000002435 14565421125 016331 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_engine_xgboost.R
\name{scale_pos_weight}
\alias{scale_pos_weight}
\alias{penalty_L2}
\alias{penalty_L1}
\title{Parameters for possible engine parameters for xgboost}
\usage{
scale_pos_weight(range = c(0.8, 1.2), trans = NULL)
penalty_L2(range = c(-10, 1), trans = transform_log10())
penalty_L1(range = c(-10, 1), trans = transform_log10())
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
These parameters are auxiliary to tree-based models that use the "xgboost"
engine. They correspond to tuning parameters that would be specified using
\code{set_engine("xgboost", ...)}.
}
\details{
For more information, see the \href{https://xgboost.readthedocs.io/en/latest/parameter.html}{xgboost webpage}.
}
\examples{
scale_pos_weight()
penalty_L2()
penalty_L1()
}
dials/man/texthash.Rd 0000644 0001762 0000144 00000001654 14565421125 014253 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_num_hash.R
\name{num_hash}
\alias{num_hash}
\alias{signed_hash}
\title{Text hashing parameters}
\usage{
num_hash(range = c(8L, 12L), trans = transform_log2())
signed_hash(values = c(TRUE, FALSE))
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
\item{values}{A vector of possible values (TRUE or FALSE).}
}
\description{
Used in \code{textrecipes::step_texthash()}.
}
\examples{
num_hash()
signed_hash()
}
dials/man/summary_stat.Rd 0000644 0001762 0000144 00000001164 14223270317 015143 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_summary_stat.R
\docType{data}
\name{summary_stat}
\alias{summary_stat}
\alias{values_summary_stat}
\title{Rolling summary statistic for moving windows}
\format{
An object of class \code{character} of length 8.
}
\usage{
summary_stat(values = values_summary_stat)
values_summary_stat
}
\arguments{
\item{values}{A character string of possible values. See \code{values_summary_stat}
in examples below.}
}
\description{
This parameter is used in \code{recipes::step_window()}.
}
\examples{
values_summary_stat
summary_stat()
}
\keyword{datasets}
dials/man/vocabulary_size.Rd 0000644 0001762 0000144 00000001605 14565421125 015620 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/param_vocabulary_size.R
\name{vocabulary_size}
\alias{vocabulary_size}
\title{Number of tokens in vocabulary}
\usage{
vocabulary_size(range = c(1000L, 32000L), trans = NULL)
}
\arguments{
\item{range}{A two-element vector holding the \emph{defaults} for the smallest and
largest possible values, respectively. If a transformation is specified,
these values should be in the \emph{transformed units}.}
\item{trans}{A \code{trans} object from the \code{scales} package, such as
\code{scales::transform_log10()} or \code{scales::transform_reciprocal()}. If not provided,
the default is used which matches the units used in \code{range}. If no
transformation, \code{NULL}.}
}
\description{
Used in \code{textrecipes::step_tokenize_sentencepiece()} and
\code{textrecipes::step_tokenize_bpe()}.
}
\examples{
vocabulary_size()
}
dials/man/grid_regular.Rd 0000644 0001762 0000144 00000010735 14412541005 015060 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grids.R
\name{grid_regular}
\alias{grid_regular}
\alias{grid_regular.parameters}
\alias{grid_regular.list}
\alias{grid_regular.param}
\alias{grid_regular.workflow}
\alias{grid_random}
\alias{grid_random.parameters}
\alias{grid_random.list}
\alias{grid_random.param}
\alias{grid_random.workflow}
\title{Create grids of tuning parameters}
\usage{
grid_regular(x, ..., levels = 3, original = TRUE, filter = NULL)
\method{grid_regular}{parameters}(x, ..., levels = 3, original = TRUE, filter = NULL)
\method{grid_regular}{list}(x, ..., levels = 3, original = TRUE, filter = NULL)
\method{grid_regular}{param}(x, ..., levels = 3, original = TRUE, filter = NULL)
\method{grid_regular}{workflow}(x, ..., levels = 3, original = TRUE, filter = NULL)
grid_random(x, ..., size = 5, original = TRUE, filter = NULL)
\method{grid_random}{parameters}(x, ..., size = 5, original = TRUE, filter = NULL)
\method{grid_random}{list}(x, ..., size = 5, original = TRUE, filter = NULL)
\method{grid_random}{param}(x, ..., size = 5, original = TRUE, filter = NULL)
\method{grid_random}{workflow}(x, ..., size = 5, original = TRUE, filter = NULL)
}
\arguments{
\item{x}{A \code{param} object, list, or \code{parameters}.}
\item{...}{One or more \code{param} objects (such as \code{\link[=mtry]{mtry()}} or
\code{\link[=penalty]{penalty()}}). None of the objects can have \code{unknown()} values in
the parameter ranges or values.}
\item{levels}{An integer for the number of values of each parameter to use
to make the regular grid. \code{levels} can be a single integer or a vector of
integers that is the same length as the number of parameters in \code{...}.
\code{levels} can be a named integer vector, with names that match the id values
of parameters.}
\item{original}{A logical: should the parameters be in the original units or
in the transformed space (if any)?}
\item{filter}{A logical: should the parameters be filtered prior to
generating the grid. Must be a single expression referencing parameter
names that evaluates to a logical vector.}
\item{size}{A single integer for the total number of parameter value
combinations returned for the random grid. If duplicate combinations are
generated from this size, the smaller, unique set is returned.}
}
\value{
A tibble. There are columns for each parameter and a row for every
parameter combination.
}
\description{
Random and regular grids can be created for any number of parameter objects.
}
\details{
Note that there may a difference in grids depending on how the function
is called. If the call uses the parameter objects directly the possible
ranges come from the objects in \code{dials}. For example:
\if{html}{\out{