independent-dot-contributions-dot-formula-dot-mul: Generate class labels by independent contributions of two...

Description Usage Arguments Value Examples

Description

Version of independent.contributions.formula that works with any number of variables. See the help page for independent.contributions.formula for description of functionality.

Usage

1
independent.contributions.formula.mul(data, target.vars, prob1, prob0, logical.formula)

Arguments

data

a matrix or data.frame containing binary observations (columns are variables)

target.vars

indexes of target variables

prob1

vector of P(class labels = 1|varX=1) for different X

prob0

vector of P(class labels = 1|varX=0) for different X

logical.formula

a character string for the formula

Value

a vector of binary class labels

Examples

1
2
3
# noisy OR function with three variables and with noise level of 0.1 for a, b, and 0.2 for c
data <- cbind("a"=c(0,0,0,0,1,1,1,1), "b"=c(0,0,1,1,0,0,1,1), "c"=c(0,1,0,1,0,1,0,1))
independent.contributions.formula.mul(data, c("a", "b", "c"), c(0.9, 0.9, 0.8), c(0.1, 0.1, 0.2), "a | b | c")

ddgraph documentation built on Nov. 17, 2017, 10:50 a.m.