R/step_forward.r

Defines functions step.forward

step.forward <- function(z, p, net) {
a <- t(apply(z, 1, function(x) {BoolNet::stateTransition(net,x)}))
a[a>0] = 1
a[a<0] = 0
b <- xor(a, matrix(Rlab::rbern(length(net$genes)*nrow(z), p), ncol=length(net$genes)))
return (b)
}

Try the BoolFilter package in your browser

Any scripts or data that you put into this service are public.

BoolFilter documentation built on May 2, 2019, 1:27 p.m.