Documentaton - BLOCKS - BLOCK_CLASSIFY_SVM

This block learns an SVM using an input kernel and uses it to classify segment histograms.

BK = BLOCK_CLASSIFY_SVM() Initializes the block with the default options.

BK = BLOCK_CLASSIFY_SVM(BK) Executes the block with options and inputs BK.

Required Inputs:

kernel

A pre-computed kernel block

hist

Segment histograms

Options:

bk.seg_neighbors

The number of neighbors to include in the histogram. Default 0.

bk.svm_type

The type of SVM to learn with libSVM. Default 'C'.

bk.svm_C

The value of C to use. Default 1.

bk.svm_nu

The value of nu to use. Default 0.5.

bk.svm_balance

Balance the svm? Default 0.

bk.svm_cross

Perform N-fold cross validation. Default 10.

bk.svm_rbf

Use an rbf kernel? Default 1.

bk.svm_gamma

Gamma for the rbf kernel. Default [] means automatically determine a good gamma.

bk.debug

Run the SVM in debug mode? Default 0.

bk.verb

Be verbose? Default 1.

bk.probability

Compute probability output? Default 0.

bk.bg_cat

Category to assign the segment to if it has an empty histogram. Default 0.

Fetchable attributes:

type

The type of classifier used 'svm'

cl

A structure representing the classifier.

Block Functions:

function [class confidence] = classify(cl, h)

Classify histogram h with cl using the SVM.