displaySVM: displaySVM

Description Usage Arguments Value Author(s) See Also Examples

View source: R/displayScatter.R

Description

displays the colored decision regions of a SVM model. Data symbols are also optionally displayed. Data and model should be 2D.

Usage

1
2
displaySVM(svm.model, dataframe, displayPoints = TRUE, 
subset = NULL, steps = 100, alpha = 0.4, lwd = 1)

Arguments

svm.model

a SVM model, as returned by svm (e1071 library)

dataframe

data.frame object, containing row-elements, and associated labels in the last variable.

displayPoints

if FALSE, only decision regions are displayed.

subset

vector of indexes of a data subset to be displayed. If NULL, all points are displayed.

steps

influences the resolution of the decision regions. Low values will provoke aliasing, high values are slower to be displayed.

alpha

alpha blending parameter between decision regions and data symbols.

lwd

magnification factor for the stroke width used to plot symbols.

Value

a new plotting window displaying SVM decision regions.

Author(s)

Pierrick Bruneau

See Also

svm

Examples

1
2
3
4
# extract 2 first variables and build data.frame
temp <- buildFrame(irisdata, irislabels)
iris.model <- e1071::svm(labels ~ ., data=temp, cost=100, gamma=1)
displaySVM(iris.model, temp)

VBmix documentation built on May 30, 2017, 2:34 a.m.

Related to displaySVM in VBmix...