R/importanceplot.R

Defines functions importanceplot

Documented in importanceplot

importanceplot <-
function(object,...){
  #if(!((class(object)=="bagging")|(class(object)=="boosting")))
  if(!(inherits(object,"bagging")|inherits(object,"boosting")))
         stop("object class should be bagging or boosting")

  barplot(object$imp[order(object$imp,decreasing=TRUE)], main="Variable relative importance", col="lightblue",las=1,xaxs="r",...)
}

Try the adabag package in your browser

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

adabag documentation built on May 31, 2023, 9:09 p.m.