Learn R Programming

hybridEnsemble (version 1.7.9)

importance.hybridEnsemble: Importance method for hybridEnsemble objects

Description

Assess the importance of new data using a hybridEnsemble model. The importance is computed as follows. For each variable, compute the AUC of the model before permuting that variable and after. Next, subtract the latter from the former. This is called the decrease in AUC. If CV is greater than one, the mean is taken from all runs.

Usage

# S3 method for hybridEnsemble
importance(
  x = NULL,
  xdata = NULL,
  ydata = NULL,
  method = "MEAN",
  CV = 1,
  sort = TRUE,
  ...
)

Value

A data frame with two colums: the variable name and the importance of the variable.

Arguments

x

An object of class hybridEnsemble created by the function hybridEnsemble

xdata

A test data frame with the same predictors as in the training data

ydata

A test factor of observed class labels (responses) with the only allowed values {0,1}.

method

One of 'RBGA' (Genetic Algorithm), 'DEOPT' (Differential Evolution), 'GENSA' (Generalized Simulated Annealing), 'MALSCHAINS' (Memetic Algorithm), 'PSOPTIM' (Particle Swarm), 'SOMA' (Self Organizing Migrating Algorithm), 'TABU' (Tabu Search), 'LHNNLS' (Lawson-Hanson Non-negative least squares), 'GINNLS' (Goldfarb-Idnani Non-negative least squares), 'NNloglik' (Non-negative binomial likelihood), 'MEAN' (Simple Mean), 'SB' (Single Best), 'AUTHORITY' (Authority Based method)

CV

An integer indicating the number of cross-validation runs

sort

TRUE or FALSE. Should the predictors be sorted with the most important ones on top?

...

Not currently used

Author

Michel Ballings, Dauwe Vercamer, Matthias Bogaert, and Dirk Van den Poel, Maintainer: Michel.Ballings@GMail.com

References

Ballings, M., Vercamer, D., Bogaert, M., Van den Poel, D.

See Also

hybridEnsemble, predict.hybridEnsemble, CVhybridEnsemble, plot.CVhybridEnsemble

Examples

Run this code

data(Credit)

if (FALSE) {
hE <-hybridEnsemble(x=Credit[1:100,names(Credit) != 'Response'],
                    y=Credit$Response[1:100],
                    RF.ntree=50,
                    AB.iter=50,
                    NN.size=5,
                    NN.decay=0,
                    SV.gamma = 2^-15,
                    SV.cost = 2^-5,
                    SV.degree=2,
                    SV.kernel='radial')
                    
 importance(hE,
          xdata=Credit[1:100,names(Credit) != 'Response'],
          ydata=Credit$Response[1:100])                   
}
                     

Run the code above in your browser using DataLab