as_rulelist.data.frame | R Documentation |
Convert a set of rules in a dataframe to a rulelist
## S3 method for class 'data.frame'
as_rulelist(x, keys = NULL, model_type = NULL, estimation_type, ...)
x |
dataframe to be coerced to a rulelist |
keys |
(character vector, default: NULL) column names which form the key |
model_type |
(string, default: NULL) Name of the model which generated the rules |
estimation_type |
(string) One among: 'regression', 'classification' |
... |
currently unused |
Input dataframe should contain these columns: rule_nbr
, LHS
,
RHS
. Providing other inputs helps augment better.
rulelist object
rulelist, tidy, augment, predict, calculate, prune, reorder
rules_df = tidytable::tidytable(rule_nbr = 1:2,
LHS = c("var_1 > 50", "var_2 < 30"),
RHS = c(2, 1)
)
as_rulelist(rules_df, estimation_type = "regression")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.