View source: R/getFreqPattern.R
getFreqPattern | R Documentation |
calculate frequent variable interactions
getFreqPattern(ruleMetric, minsup = 0.01, minconf = 0.5, minlen = 1, maxlen = 4)
ruleMetric |
a matrix including conditions, predictions, and the metrics |
minsup |
minimum support of conditions in a tree ensemble |
minconf |
minimum confidence of the rules |
minlen |
minimum length of the conditions |
maxlen |
max length of the conditions |
a matrix including frequent variable interations (in a form of conditions), predictions, length, support, and confidence.
library(RRF) library(arules) data(iris) X <- iris[,1:(ncol(iris)-1)] target <- iris[,"Species"] rf <- RRF(X,as.factor(target),ntree=100) # build an ordinary RF treeList <- RF2List(rf) ruleExec <- extractRules(treeList,X) # transform to R-executable rules ruleMetric <- getRuleMetric(ruleExec,X,target) freqPattern <- getFreqPattern(ruleMetric) freqPatternMetric <- getRuleMetric(freqPattern,X,target)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.