R/Num2Level.R

Defines functions Num2Level

Documented in Num2Level

Num2Level <-
function(rfList,splitV){
  for(i in 1:rfList$ntree){ 
    rfList$list[[i]] <- data.frame(rfList$list[[i]])
    rfList$list[[i]][,"prediction"] <- data.frame(dicretizeVector(rfList$list[[i]][,"prediction"],splitV))
    colnames(rfList$list[[i]]) <- c("left daughter","right daughter","split var","split point","status","prediction")
  }
  return(rfList)
}

Try the inTrees package in your browser

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

inTrees documentation built on May 29, 2024, 2:39 a.m.