rfPermute
Description
rfPermute estimates the significance of importance metrics for a Random Forest model by permuting the response variable. It will produce null distributions of importance metrics for each predictor variable and p-value of observed. The package also includes several summary and visualization functions for randomForest and rfPermute results.
Installation
To install the stable version from CRAN:
install.packages('rfPermute')To install the latest version from GitHub:
# make sure you have devtools installed
if (!require('devtools')) install.packages('devtools')
# install from GitHub
devtools::install_github('EricArcher/rfPermute')Contact
- submit suggestions and bug-reports: https://github.com/ericarcher/rfPermute/issues
- send a pull request: https://github.com/ericarcher/rfPermute/
- e-mail: eric.archer@noaa.gov
Current Functions
casePredictions Return predictions and votes for training cases
classConfInt Classification Confidence Intervals
cleanRFdata Clean Random Forest Input Data
confusionMatrix Confusion Matrix
exptdErrRate Expected Error Rate
impHeatmap Importance Heatmap
pctCorrect Percent Correctly Classified
plotConfMat Heatmap representation of Confusion Matrix
plotImpVarDist Distribution of Important Variables
plotInbag Distribution of sample inbag rates
plotNull Plot Random Forest Importance Null Distributions
plotOOBtimes Distribution of sample OOB rates
plotPredictedProbs Distribution of prediction assignment probabilities
plotRFtrace Trace of cumulative error rates in forest
plotVotes Vote Distribution
plot.rp.importance Plot Random Forest Importance Distributions
proximityPlot Plot Random Forest Proximity Scores
rfPermute Estimate Permutation p-values for Random Forest Importance Metrics
rp.combine Combine rfPermute Objects
rp.importance Extract rfPermute Importance Scores and p-values
version 2.1.9 (devel)
- moved value of OOB expected error rate to end of output vector in
exptdErrRate - changed default of
thresholdargument inclassConfIntandconfusionMatrixtoNULL. - added new grouping and labelling options to proximityPlot()
version 2.1.81 (on CRAN)
- Fixed bug in
pctCorrect - Added
casePredictions - Updated parallel code
version 2.1.7
- Fixed bug in parallel processing code.
version 2.1.6
- Added
plotConfMat,plotOOBtimes,plotRFtrace, andplotInbag, andplotImpVarDistvisualizations. - Changed
confusionMatrixso it will work whenrandomForestmodel doesn't have a$confusionelement, like when model is result ofcombine-ing multiple models. - Improved efficiency and stability of parallel processing code. Changed default value of
num.corestoNULL.
version 2.1.5
- Added
typeargument toplotVotesto choose between area and bar charts. - Changed
plot.rfPermutetoplotNullto avoid clashes and maintain functionality ofrandomForest::plot.randomForest. - Changed name of
proximity.plottoproximityPlot,exptd.err.ratetoexptdErrRate, andclean.rf.datatocleanRFdatato make camelCase naming scheme more consistent in package. - Changed
plotNullfrom base graphics to ggplot2. - Added
symb.metabdata set.
version 2.1.1
- Added
nargument toimpHeatmap. - Added functions:
classConfInt,confusionMatrix,plotVotes,pctCorrect.
version 2.0.1
- Fixed bug in
plot.rfPermutethat was reporting the p-value incorrectly at the top of the figure. - Fixed multi-threading in
rfPermuteso it works on Windows too. - Added
impHeatmapfunction. - Switched
proximity.plotto useggplot2graphics.
version 2.0
- Fixed bug with calculation of p-values not respecting importance measure scaling (division by standard deviations). New format of output of
rfPemutehas separate$null.distand$pvalelements, each with results for unscaled and scaled importance mesures. See?rfPermutefor more information. rp.importanceandplot.rfPermutenow take ascaleargument to specify whether or not importance values should be scaled by standard deviations.- If
nrep = 0forrfPermute, arandomForestobject is returned.
version 1.9.3
- Fixed import declarations to avoid
gridname clashes. - Fixed logic error in
clean.rf.datawhere fixed predictors were not removed. - Fixed error in use of
mainargument inplot.rp.importance.
version 1.9.2
- Added this NEWS.md
- Added README.md
- Added
num.coresargument torfPermuteto take advantage of multi-threading
version 1.9.1
- Added internal keyword to
calc.imp.pvalto keep it from indexing - Updated imports to match new CRAN policies