<< libsvm_scale utilities libsvmread >>

libsvm >> utilities > libsvm_toy

libsvm_toy

shows the two-class classification boundary of the 2-D data

Calling Sequence

libsvm_toy(label_vector, instance_matrix, options, contour_level)

Parameters

label_vector:

N by 1, has to be two-class

instance_matrix:

N by 2

options:

default '', see svmtrain, has to be a classification formulation (e.g."-c 1000 -g 0.5") .

contour_level:

default [0 0], change to [-1 0 1] for showing the +/- 1 margin.

Description

libsvm_toy shows the two-class classification boundary of the 2-D data

Examples

instance_matrix = [rand(20,2); -1*rand(20,2)];
label_vector=[zeros(20,1);ones(20,1)];
libsvm_toy(label_vector, instance_matrix)

libsvm_toy(label_vector, instance_matrix,"-c 1000 -g 0.5",[-1 0 1])

Authors


Report an issue
<< libsvm_scale utilities libsvmread >>