create_feature_target: Create feature according to given contingency matrix

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Creates a matrix of features and target based on the values from contingency matrix.

Usage

1
create_feature_target(n11, n01, n10, n00)

Arguments

n11

number of elements for which both target and feature equal 1.

n01

number of elements for which target and feature equal 1,0 respectively.

n10

number of elements for which target and feature equal 0,1 respectively.

n00

number of elements for which both target and feature equal 0.

Value

a matrix of 2 columns and n11+n10+n01+n00 rows. Columns represent target and feature vectors, respectively.

Examples

1
2
3
4
5
# equivalent of 
#         target
# feature 10 375
#        15 600
target_feature <- create_feature_target(10, 375, 15, 600)

biogram documentation built on March 31, 2020, 5:14 p.m.