Description Usage Arguments Details Value Author(s) See Also Examples
This function is the core of the Rdrools package. Rules are applied on an input data frame and the results are returned as the output of the function. The columns on which the rules need to be applied have to be provided explicitly. Additionally, the new columns that would be created based on the rules have to be provided explicitly as well. The rules engine picks up a row from the data frame, applies the transformation to it based on rules provided and saves the result in an output data frame.
1 | runRulesDrl(rules.session, input.df)
|
rules.session |
a session of the rules engine created using the |
input.df |
a data frame consisting of a set of rows you wish to transform, and columns you wish to use in the transformation |
If you are not familiar with the Drools file format, please have a look at the references
provided in the Rdrools
. More details on how conflicting rules are resolved
using either salience or the Reete algorithm are also present in the references.
Transformation policy Transformations are applied row by row, iteratively. That is to say, all inputs required for a rule transformation should be present in columns as a part of that row itself. Each row should be considered independent of another; all input values required for a transformation should be available in that row itself. The expectation from rules engines are often misplaced.
Column Mismatch Please make sure that the list of output columns provided through the
output.columns
parameter is exhaustive. Any additional column which is created through the
rules transformation but is not present in the list would inhibit proper functioning. In most cases,
an error should be thrown.
output.df a data frame which is the result of transformations applied to the input data
frame(input.df
), the columns being the list provided through the output.columns
parameter in rulesSessionDrl
Ashwin Raaghav <ashwin.raaghav@mu-sigma.com>
SMS Chauhan <sms.chauhan@mu-sigma.com>
Other Interface Functions to Drools: executeRulesOnDataset
,
rulesSessionDrl
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.