# NOT RUN {
# -- Load the data
x <- cbind(intercept=100,data.matrix(iris[1:4]))
y <- iris$Species
dag <- matrix(c(1,0,0,0,
0,1,1,0,
0,1,0,1),3,4,byrow=TRUE)
w <- nrbm(ontologyLoss(x,y,dag=dag))
w <- matrix(w,ncol(x))
f <- x %*% tcrossprod(w,dag)
table(y,max.col(f))
# }
Run the code above in your browser using DataLab