R/getCoefficientLine.R

Defines functions getCoefficientLine

Documented in getCoefficientLine

#' Internal - Get individual tree output from stump.frame object
#' @keywords internal
#' @export
 
getCoefficientLine <-
function(var,condition,value,probT,probF,alpha=NULL,newdata,default,type){
  
  meets.condition <- do.call(condition, list(newdata[[var]],value))
  meets.condition[is.na(newdata[[var]])] <- default
  tree.value <- ifelse(meets.condition, probT,probF)
  
  if(is.null(alpha)) return(tree.value)
  
  ret <- getAlphaProbability(tree.value, alpha, type)
  
  return(ret)
  
}
nivangio/adaStump documentation built on May 23, 2019, 7:06 p.m.