plot.svm: Plot SVM object

Description Usage Arguments Examples

Description

Plots trained svm data and models disciriminative

Usage

1
2
3
## S3 method for class 'Rcpp_SVMClient'
plot(x, X = NULL, mode = "normal", cols = c(1,
  2), radius = 3, radius.max = 10, ...)

Arguments

x

Trained SVM object

X

Optional new data points to be predicted and plotted in one of the following formats: data.frame, data.matrix; default: NULL

mode

Which plotting mode to use as string, available are:

  • 'normal' - default mode, plots data in cols argument and a linear decision boundry in available

  • 'pca' - preforms PCA decomposition and draws data in a subspace of first 2 dimensions from the PCA

  • 'contour' - countour plot for non-linear kernels

cols

Data dimensions to be plotted as vector of length 2, default: c(1,2)

radius

Radius of the plotted data points as float, default: 3

radius.max

Maximum radius of data points can be plotted, when model is trained with example weights as float, default: 10

...

other arguments not used by this method.

Examples

1
2
3
4
5
6
7
## Not run: 
# here we ause svm is a trained SVM model
plot(svm)
plot(svm, X=x, cols=c(1,3))
plot(svm, mode="pca", radius=5)

## End(Not run)

gmum.r documentation built on May 29, 2017, 3:52 p.m.

Related to plot.svm in gmum.r...