D = VL_MAKETRAININGSET(X, Y) creates a training set struct D, given the training vectors X and their labels Y. The training set D has the fields DATA and LABELS.
If the HOMKERMAP option is used, a third field MAP is present in D. MAP is another struct with the following fields:
Order of the homogeneous kernel map.
Type of kernel.
Type of window.
Value of the parameter GAMMA.
Value of the parameter PERIOD.
VL_MAKETRAININGSET() accepts the following options:
Specify the use of an Homogeneus Kernel map for the training data (See [2],[3]). The passed value N is such that a 2*N+1 dimensional approximated kernel map is computed. Each training data point is expanded online into a vector of dimension 2*N+1.
Compute the map for the Chi2 kernel.
Compute the map for the intersection kernel.
Same as KINTERS, but deprecated as the name is not fully accurate.
Compute the map for the JS (Jensen-Shannon) kernel.
Set the period of the kernel specturm. The approximation is based on periodicizing the kernel specturm. If not specified, the period is automatically set based on the heuristic described in [2].
Set the window used to truncate the spectrum before The window can be either RECTANGULAR or UNIFORM window. See [2] and the API documentation for details.
Set the homogeneity degree of the kernel. The standard kernels are 1-homogeneous, but sometimes smaller values perform better in applications. See [2] for details.
VL_MAKETRAININGSET must be used together with VL_SVMPEGASOS,
vl_twister('state',0) ; dataset = vl_maketrainingset(x,y) ; w = vl_svmpegasos(dataset,lambda,'NumIterations',1000) ;
See also: VL_SVMPEGASOS(), VL_HOMKERMAP(), VL_HELP().