yat
0.14.5pre
|
Support Vector Machine for more than two classes. More...
#include <yat/classifier/SvmMultiClass.h>
Public Member Functions | |
SvmMultiClass (void) | |
Constructor. | |
double | C (void) const |
C-parameter. More... | |
SvmMultiClass * | make_classifier (void) const |
Create an untrained copy of SvmMultiClass. More... | |
unsigned long int | max_epochs (void) const |
void | max_epochs (unsigned long int) |
set maximal number of epochs in training | |
void | predict (const KernelLookup &input, utility::Matrix &predict) const |
Generate prediction predict from input. More... | |
void | set_C (double) |
set the C-Parameter | |
void | train (const KernelLookup &kernel, const Target &target) |
Fit paramaters based on training data. More... | |
Support Vector Machine for more than two classes.
double theplu::yat::classifier::SvmMultiClass::C | ( | void | ) | const |
C-parameter.
SvmMultiClass* theplu::yat::classifier::SvmMultiClass::make_classifier | ( | void | ) | const |
Create an untrained copy of SvmMultiClass.
unsigned long int theplu::yat::classifier::SvmMultiClass::max_epochs | ( | void | ) | const |
Default is max_epochs set to 100,000.
void theplu::yat::classifier::SvmMultiClass::predict | ( | const KernelLookup & | input, |
utility::Matrix & | predict | ||
) | const |
Generate prediction predict from input.
Each row in predict is calculated using a binary SVM.
input | kernel to base prediction on. Just like in SVM each column corresponds to a sample to predict, and each row corresponds to a training sample. |
predict | resulting predictions. Each column corresponds to a test sample (same as corresponding column in input). Row i corresponds to class i, in other words, a large value in row i suggests that test sample belongs to class i. If there were no training samples in class i, row i is filled with NaNs. |
void theplu::yat::classifier::SvmMultiClass::train | ( | const KernelLookup & | kernel, |
const Target & | target | ||
) |
Fit paramaters based on training data.
For each class samples belonging to that class are trained against the other samples using a binary SVM.
kernel | contains the training data |
target | infomration on class labels |