svm_plot_2d: SVM scatter plot

Description Usage Arguments Details Value References Examples

View source: R/svm_classifier_class.R

Description

A scatter plot of the input data by group and the calculated boundary of a SVM model.

Usage

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

Arguments

factor_name

(character) The name of a sample-meta column to use.

npoints

(numeric) The number of grid points used to plot the boundary. The default is 100.

...

Additional slots and values passed to struct_class.

Details

This object makes use of functionality from the following packages:

Value

A svm_plot_2d object.

References

Meyer D, Dimitriadou E, Hornik K, Weingessel A, Leisch F (2019). e1071: Misc Functions of the Department of Statistics, Probability Theory Group (Formerly: E1071), TU Wien. R package version 1.7-3, https://CRAN.R-project.org/package=e1071.

Examples

1
2
3
4
5
6
7
8
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]))

structToolbox documentation built on Nov. 8, 2020, 6:54 p.m.