R/correctPreds1.R

Defines functions `correctPreds1`

`correctPreds1` <-
function(tree,newdata,newcl,n.var,iter=NULL){
	treePreds<-eval.logreg(tree,newdata)
	if(any(treePreds>1))
		stop("Some treePreds > 1. Please inform the author about this error.")
	cortree<-sum(treePreds==newcl)
	knot<-tree$trees$knot
	knot<-knot[knot!=0]
	knot<-unique(knot)
	if(is.null(iter))
		return(correctPredsRemove1(tree,newdata,newcl,n.var,knot,cortree))
	correctPredsPermute1(tree,newdata,newcl,n.var,iter,knot,cortree)
}

Try the logicFS package in your browser

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

logicFS documentation built on Nov. 8, 2020, 5:23 p.m.