Typedefs |
typedef void(* | VlSvmDatasetFeatureMap )(const void *map, double *destination, const vl_size stride, const double x) |
| Pointer to a function that maps the value in to using the feature map .
|
typedef double(* | VlSvmDatasetInnerProduct )(const void *data, const vl_uindex element, const double *model) |
| Pointer to a function that defines the inner product between the data point at position and the SVM model.
|
typedef void(* | VlSvmDatasetAccumulator )(const void *data, const vl_uindex element, double *model, const double multiplier) |
| Pointer to a function that adds to the data point at position multiplied by the constant .
|
Functions |
vl_size | vl_svmdataset_get_map_order (VlSvmDataset const *self) |
| Get Feature Map Order.
|
|
VlSvmDataset * | vl_svmdataset_new (void *data, vl_size dimension) |
| Create a new SVM dataset structure.
|
void | vl_svmdataset_delete (VlSvmDataset *dataset) |
| Delete a SVM dataset structure.
|
|
void | vl_svmdataset_set_map (VlSvmDataset *data, void *map, VlSvmDatasetFeatureMap mapFunc, vl_size order) |
| Set feature map.
|
|
double | vl_svmdataset_innerproduct_d (const void *data, const vl_uindex element, const double *model) |
void | vl_svmdataset_accumulator_d (const void *data, const vl_uindex element, double *model, const double multiplier) |
double | vl_svmdataset_innerproduct_f (const void *data, const vl_uindex element, const double *model) |
void | vl_svmdataset_accumulator_f (const void *data, const vl_uindex element, double *model, const double multiplier) |
|
void * | vl_svmdataset_get_data (VlSvmDataset const *self) |
| Get Data.
|
vl_size | vl_svmdataset_get_dimension (VlSvmDataset const *self) |
| Get Data Dimension.
|
void * | vl_svmdataset_get_map (VlSvmDataset const *self) |
| Get Feature Map Object.
|
VlSvmDatasetFeatureMap | vl_svmdataset_get_map_func (VlSvmDataset const *self) |
| Get Feature Map Function.
|
vl_size | vl_svmdataset_get_order (VlSvmDataset const *self) |
Any SVM solver requires a set of training data in order to learn a correspondent classifier.
Regardless the kind of SVM solver, the training data is used and accessed in a similar manner.
In svmdataset.h we define an abstraction that separates the particular SVM algorithm from the representation of the data. Such abstraction is defined via two type of functions:
The above type of functions define the two typical operations performed by SVM solvers on the training data. Any particular application can define its own data representation and implement the above functions.
For double and float arrays we provide the implementation of the aforementioned functions.
We define also an utility struct VlSvmDataset that implements the online expansions of data points. This allows the use of techniques such homogeneous kernel maps [17] inside the SVM solver.
- Author:
- Daniele Perrone