generate_rules_matrix {CRE} | R Documentation |
Generate rules matrix
Description
Generates the rules matrix from the feature covariate matrix and a vector of
rules. The number of rows in rules_matrix is equal to the number of samples
in X
, and the number of columns is equal to the number of rules in
rules_list
. Each element of rules_matrix corresponds to a specific data
sample and rule. If the data sample satisfies a rule, the corresponding
element in rules_matrix is set to 1. Otherwise, the element is set to 0.
Usage
generate_rules_matrix(X, rules_list)
Arguments
X |
Features matrix. |
rules_list |
A vector of rules. |
Value
A causal rules matrix.
[Package CRE version 0.2.7 Index]