demo/condvis-classification.R

library(condvis)
## demo requires 'e1071' package
library(e1071)
data(wine)
wine$Class <- as.factor(wine$Class)
## fit a model
model <- svm(Class ~ Alcohol + Malic + Ash + Magnesium +
    Phenols + Flavanoids, data = wine)
## visualise sections along 'Alcohol' and 'Phenols'
ceplot(data = wine, model = model, sectionvars = c("Alcohol", "Phenols"),
  threshold = 1.5)

Try the condvis package in your browser

Any scripts or data that you put into this service are public.

condvis documentation built on May 2, 2019, 5:57 a.m.