https://github.com/cran/FSelector
Revision 970c4e652c26673a06af15db21f6640a9d8d1653 authored by Lars Kotthoff on 30 June 2016, 17:56:47 UTC, committed by cran-robot on 30 June 2016, 17:56:47 UTC
1 parent a6a4107
Raw File
Tip revision: 970c4e652c26673a06af15db21f6640a9d8d1653 authored by Lars Kotthoff on 30 June 2016, 17:56:47 UTC
version 0.21
Tip revision: 970c4e6
random.forest.importance.Rd
\name{random.forest.importance}
\alias{random.forest.importance}
\title{ RandomForest filter }
\description{
  The algorithm finds weights of attributes using RandomForest algorithm.
}
\usage{
random.forest.importance(formula, data, importance.type = 1)
}
\arguments{
  \item{formula}{ a symbolic description of a model }
  \item{data}{ data to process }
  \item{importance.type}{ either 1 or 2, specifying the type of importance measure (1=mean decrease in accuracy, 2=mean decrease in node impurity) }
}
\details{
  This is a wrapper for \code{\link[randomForest]{importance}.}
}
\value{
a data.frame containing the worth of attributes in the first column and their names as row names
}
\author{ Piotr Romanski }
\examples{
  library(mlbench)
  data(HouseVotes84)
  
  weights <- random.forest.importance(Class~., HouseVotes84, importance.type = 1)
  print(weights)
  subset <- cutoff.k(weights, 5)
  f <- as.simple.formula(subset, "Class")
  print(f)
}
back to top