5.4 Le package VSURF
library(VSURF)
data("toys")
set.seed(3101318)
vsurfToys <- VSURF(toys$x, toys$y, mtry = 100)
set.seed(3101318)
vsurfThresToys <- VSURF_thres(toys$x, toys$y, mtry = 100)
vsurfThresToys$varselect.thres
plot(vsurfToys, step = "thres", imp.mean = FALSE, ylim = c(0, 2e-04))
vsurfInterpToys <- VSURF_interp(toys$x, toys$y, vars = vsurfThresToys$varselect.thres)
vsurfInterpToys$varselect.interp
vsurfPredToys <- VSURF_pred(toys$x, toys$y, err.interp = vsurfInterpToys$err.interp,
varselect.interp = vsurfInterpToys$varselect.interp)
vsurfPredToys$varselect.pred
set.seed(923321, kind = "L'Ecuyer-CMRG")
vsurfSpam <- VSURF(type ~ ., spamApp, parallel = TRUE, ncores = 3, clusterType = "FORK")
summary(vsurfSpam)
plot(vsurfSpam)
colnames(spamApp[vsurfSpam$varselect.interp])
colnames(spamApp[vsurfSpam$varselect.pred])
set.seed(945834)
vsurfSpamPred <- VSURF_pred(type ~ ., spamApp, nmj = 15, err.interp = vsurfSpam$err.interp,
varselect.interp = vsurfSpam$varselect.interp)
colnames(spamApp[vsurfSpamPred$varselect.pred])
5.5 Réglage des paramètres pour la sélection
vsurfToysStump <- VSURF(toys$x, toys$y, mtry = 100, maxnodes = 2)
summary(vsurfToysStump)
vsurfToysStump$varselect.interp
vsurfToysStump$varselect.pred
vsurfThresToysTuned <- tune(vsurfThresToys, nmin = 3)
vsurfThresToysTuned$varselect.thres
vsurfInterpToysTuned <- tune(vsurfInterpToys, nsd = 5)
vsurfInterpToysTuned$varselect.interp
vsurfPredToysTuned <- VSURF_pred(toys$x, toys$y, err.interp = vsurfInterpToys$err.interp,
varselect.interp = vsurfInterpToys$varselect.interp, nmj = 3)
vsurfPredToysTuned$varselect.pred