svm_plot_2d {structToolbox}R Documentation

SVM boundary plot (2d)

Description

Plots the training data and the SVM boundary. 2d data only (ncol(D$data)==2).

Usage

svm_plot_2d(factor_name, npoints = 100, ...)

Arguments

factor_name

The column of sample_meta to use

npoints

Used to control the resolution of the grid used to plot the boundary. Default 100.

...

additional slots and values passed to struct_class

Value

struct object

Examples

D = iris_DatasetExperiment()
M = filter_smeta(mode='exclude',levels='setosa',factor_name='Species') +
    mean_centre()+PCA(number_components=2)+
    SVM(factor_name='Species',kernel='linear')
M = model_apply(M,D)

C = svm_plot_2d(factor_name='Species')
chart_plot(C,M[4],predicted(M[3]))


[Package structToolbox version 1.0.1 Index]