'\" -*- coding: UTF-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH pkoptsvm 1 "06 December 2020" "" "" .SH NAME pkoptsvm \- program to optimize parameters for SVM classification .SH SYNOPSIS 'nh .fi .ad l \fBpkoptsvm\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu \fB-t\fR \fItraining\fR [\fIoptions\fR] [\fIadvanced options\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBpkoptsvm\fR The support vector machine depends on several parameters. Ideally, these parameters should be optimized for each classification problem. In case of a radial basis kernel function, two important parameters are {cost} and {gamma}. The utility \fBpkoptsvm\fR can optimize these two parameters, based on an accuracy assessment (the Kappa value). If an input test set (\*(T<\fB\-i\fR\*(T>) is provided, it is used for the accuracy assessment. If not, the accuracy assessment is based on a cross validation (\*(T<\fB\-cv\fR\*(T>) of the training sample. .PP The optimization routine uses a grid search. The initial and final values of the parameters can be set with \*(T<\fB\-cc\fR\*(T> startvalue \*(T<\fB\-cc\fR\*(T> endvalue and \*(T<\fB\-g\fR\*(T> startvalue \*(T<\fB\-g\fR\*(T> endvalue for cost and gamma respectively. The search uses a multiplicative step for iterating the parameters (set with the options \*(T<\fB\-stepcc\fR\*(T> and \*(T<\fB\-stepg\fR\*(T>). An often used approach is to define a relatively large multiplicative step first (e.g 10) to obtain an initial estimate for both parameters. The estimate can then be optimized by defining a smaller step (>1) with constrained start and end values for the parameters cost and gamma. .SH OPTIONS .TP \*(T<\fB\-t\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-training\fR\*(T> \fIfilename\fR training vector file. A single vector file contains all training features (must be set as: b0, b1, b2,...) for all classes (class numbers identified by label option). .TP \*(T<\fB\-i\fR\*(T> \fIfilename\fR, \*(T<\fB\-\-input\fR\*(T> \fIfilename\fR input test vector file .TP \*(T<\fB\-cc\fR\*(T> \fIstartvalue\fR \*(T<\fB\-cc\fR\*(T> \fIendvalue\fR, \*(T<\fB\-\-ccost\fR\*(T> \fIstartvalue\fR \*(T<\fB\-\-ccost\fR\*(T> \fIendvalue\fR min and max boundaries the parameter C of C-SVC, epsilon-SVR, and nu-SVR (optional: initial value) .TP \*(T<\fB\-g\fR\*(T> \fIstartvalue\fR \*(T<\fB\-g\fR\*(T> \fIendvalue\fR, \*(T<\fB\-\-gamma\fR\*(T> \fIstartvalue\fR \*(T<\fB\-\-gamma\fR\*(T> \fIendvalue\fR min max boundaries for gamma in kernel function (optional: initial value) .TP \*(T<\fB\-step\fR\*(T> \fIstepsize\fR, \*(T<\fB\-\-step\fR\*(T> \fIstepsize\fR multiplicative step for ccost and gamma in GRID search .TP \*(T<\fB\-v\fR\*(T> \fIlevel\fR, \*(T<\fB\-\-verbose\fR\*(T> \fIlevel\fR use 1 to output intermediate results for plotting .PP Advanced options .TP \*(T<\fB\-tln\fR\*(T> \fIlayer\fR, \*(T<\fB\-\-tln\fR\*(T> \fIlayer\fR training layer name(s) .TP \*(T<\fB\-label\fR\*(T> \fIattribute\fR, \*(T<\fB\-\-label\fR\*(T> \fIattribute\fR identifier for class label in training vector file. (default: label) .TP \*(T<\fB\-bal\fR\*(T> \fIsize\fR, \*(T<\fB\-\-balance\fR\*(T> \fIsize\fR balance the input data to this number of samples for each class (default: 0) .TP \*(T<\fB\-random\fR\*(T>, \*(T<\fB\-\-random\fR\*(T> in case of balance, randomize input data .TP \*(T<\fB\-min\fR\*(T> \fInumber\fR, \*(T<\fB\-\-min\fR\*(T> \fInumber\fR if number of training pixels is less then min, do not take this class into account .TP \*(T<\fB\-b\fR\*(T> \fIband\fR, \*(T<\fB\-\-band\fR\*(T> \fIband\fR band index (starting from 0, either use band option or use start to end) .TP \*(T<\fB\-sband\fR\*(T> \fIband\fR, \*(T<\fB\-\-startband\fR\*(T> \fIband\fR start band sequence number .TP \*(T<\fB\-eband\fR\*(T> \fIband\fR, \*(T<\fB\-\-endband\fR\*(T> \fIband\fR end band sequence number .TP \*(T<\fB\-offset\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-offset\fR\*(T> \fIvalue\fR offset value for each spectral band input features: \*(T .TP \*(T<\fB\-scale\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-scale\fR\*(T> \fIvalue\fR scale value for each spectral band input features: \*(T (use \*(T<0\*(T> if scale min and max in each band to \*(T<\-1.0\*(T> and \*(T<1.0\*(T>) .TP \*(T<\fB\-svmt\fR\*(T> \fItype\fR, \*(T<\fB\-\-svmtype\fR\*(T> \fItype\fR type of SVM (C_SVC, nu_SVC,one_class, epsilon_SVR, nu_SVR) .TP \*(T<\fB\-kt\fR\*(T> \fItype\fR, \*(T<\fB\-\-kerneltype\fR\*(T> \fItype\fR type of kernel function (linear,polynomial,radial,sigmoid) .TP \*(T<\fB\-kd\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-kd\fR\*(T> \fIvalue\fR degree in kernel function .TP \*(T<\fB\-c0\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-coef0\fR\*(T> \fIvalue\fR coef0 in kernel function .TP \*(T<\fB\-nu\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-nu\fR\*(T> \fIvalue\fR the parameter nu of nu-SVC, one-class SVM, and nu-SVR .TP \*(T<\fB\-eloss\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-eloss\fR\*(T> \fIvalue\fR the epsilon in loss function of epsilon-SVR .TP \*(T<\fB\-cache\fR\*(T> \fInumber\fR, \*(T<\fB\-\-cache\fR\*(T> \fInumber\fR cache memory size in MB (default: 100) .TP \*(T<\fB\-etol\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-etol\fR\*(T> \fIvalue\fR the tolerance of termination criterion (default: 0.001) .TP \*(T<\fB\-shrink\fR\*(T>, \*(T<\fB\-\-shrink\fR\*(T> whether to use the shrinking heuristics .TP \*(T<\fB\-cv\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-cv\fR\*(T> \fIvalue\fR n-fold cross validation mode (default: 0) .TP \*(T<\fB\-cf\fR\*(T>, \*(T<\fB\-\-cf\fR\*(T> use Overall Accuracy instead of kappa .TP \*(T<\fB\-maxit\fR\*(T> \fInumber\fR, \*(T<\fB\-\-maxit\fR\*(T> \fInumber\fR maximum number of iterations .TP \*(T<\fB\-tol\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-tolerance\fR\*(T> \fIvalue\fR relative tolerance for stopping criterion (default: 0.0001) .TP \*(T<\fB\-a\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-algorithm\fR\*(T> \fIvalue\fR GRID, or any optimization algorithm from http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms .TP \*(T<\fB\-c\fR\*(T> \fIname\fR, \*(T<\fB\-\-class\fR\*(T> \fIname\fR list of class names. .TP \*(T<\fB\-r\fR\*(T> \fIvalue\fR, \*(T<\fB\-\-reclass\fR\*(T> \fIvalue\fR list of class values (use same order as in \*(T<\fB\-\-class\fR\*(T> option).