classifly {classifly}R Documentation

Classifly provides a convenient method to fit a classification function and then explore the results in the original high dimensional space.


This is a convenient function to fit a classification function and then explore the results using GGobi. You can also do this in two separate steps using the classification function and then explore.


classifly(data, model, classifier, ..., n = 10000, method = "nonaligned",
  type = "range")



Data set use for classification


Classification formula, usually of the form response ~ predictors


Function to use for the classification, eg. lda


Other arguments passed to classification function. For example. if you use svm you need to use probabiltiy = TRUE so that posterior probabilities can be retrieved.


Number of points to simulate. To maintain the illusion of a filled solid this needs to increase with dimension. 10,000 points seems adequate for up to four of five dimensions, but if you have more predictors than that, you will need to increase this number.


method to simulate points: grid, random or nonaligned (default). See simvar for more details on the methods used.


type of scaling to apply to data. Defaults to commmon range. See rescaler for more details.


By default in GGobi, points that are not on the boundary (ie. that have an advantage greater than the 5 to brush mode and choose include shadowed points from the brush menu on the plot window. You can then brush them yourself to explore how the certainty of classification varies throughout the space

Special notes:

See Also



data(kyphosis, package = "rpart")
classifly(kyphosis, Kyphosis ~ . , lda)
classifly(kyphosis, Kyphosis ~ . , qda)
classifly(kyphosis, Kyphosis ~ . , glm, family="binomial")
classifly(kyphosis, Kyphosis ~ . , knnf, k=3)

classifly(kyphosis, Kyphosis ~ . , rpart)

if (require("e1071")) {
classifly(kyphosis, Kyphosis ~ . , svm, probability=TRUE)
classifly(kyphosis, Kyphosis ~ . , svm, probability=TRUE, kernel="linear")
classifly(kyphosis, Kyphosis ~ . , best.svm, probability=TRUE,

# Also can use explore directorly
bsvm <- best.svm(Species~., data = iris, gamma = 2^(-1:1),
  cost = 2^(2:+ 4), probability=TRUE)
explore(bsvm, iris)

[Package classifly version 0.4 Index]