Selector Functions for Character Vectors
A Select
function subsets a character vector. They are used by the callback CallbackSetUnfreeze
to select parameters to freeze or unfreeze during training.
select_all() select_none() select_grep(pattern, ignore.case = FALSE, perl = FALSE, fixed = FALSE) select_name(param_names, assert_present = TRUE) select_invert(select)
pattern
: See grep()
ignore.case
: See grep()
perl
: See grep()
fixed
: See grep()
param_names
: The names of the parameters that you want to selectassert_present
: Whether to check that param_names
is a subset of the full vector of namesselect
: A Select
select_all()
: select_all
selects all elementsselect_none()
: select_none
selects no elementsselect_grep()
: select_grep
selects elements with names matching a regular expressionselect_name()
: select_name
selects elements with names matching the given namesselect_invert()
: select_invert
selects the elements NOT selected by the given selectorselect_all()(c("a", "b")) select_none()(c("a", "b")) select_grep("b$")(c("ab", "ac")) select_name("a")(c("a", "b")) select_invert(select_all())(c("a", "b"))
Useful links