generate_rules_matrix: Generate rules matrix

View source: R/generate_rules_matrix.R

generate_rules_matrixR 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.


CRE documentation built on Oct. 19, 2024, 5:07 p.m.