get_data_feature_mat: GET BINARY MATRIX REPRESENTATION OF THE DATA-FEATURE...

Description Usage Arguments Value Author(s) Examples

Description

Given some features in the form "feature1=x1", "feature2=x2"..., this function will generate a matrix representation of which data are captured by which features.

Usage

1
get_data_feature_mat(data, featurenames)

Arguments

data

a data.frame representing the observations.

featurenames

a character vector representing the features in the form: "feature1=x1", "feature2=x2"...

Value

a binary matrix of size #observations-by-#featurenames

Author(s)

Hongyu Yang, Morris Chen, Cynthia Rudin, Margo Seltzer

Examples

1
2
3
4
data(tictactoe)
featurenames <- c("c1=b", "c1=o", "c1=x")
get_data_feature_mat(tictactoe, featurenames)
#it will generate a binary matrix representing which observations are captured by which features.


Search within the sbrl package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.