Applies the Corels rules returned by tidy_corels to a new dataframe. For example, test data not used to create the Corels rules.

predict_corels(model, new_df)

Arguments

model

R object created by tidy_corels() function.

new_df

A new dataframe to apply corels rules to and generate a classification.

Details

The function returns your dataframe with the corels rules applied by adding the column "corels_label".

Returns a dataframe of only the true label, the columns used in the rules, and the corels classification applied to the new dataframe (alluvial). This dataframe is intended to be used in an easyalluvial plot https://github.com/erblast/easyalluvial/blob/master/README.md.

Examples: https://billster45.github.io/tidycorels/