# # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # # EPage 464 # #----- library(caret) library(AppliedPredictiveModeling) data(oil) # fattyAcids + oilType # Try one method at assessing importance: filterVarImp( fattyAcids, oilType ) # Try a second method of assessing importance: library(CORElearn) DF = cbind( fattyAcids, oilType ) reliefvalues = attrEval( oilType ~ ., data=DF, estimator="ReliefFequalK", ReliefIterations=50 ) print( sort( reliefvalues, decreasing=TRUE ) )