LIBIRWLS
|
Defition of the kernel functions used in the non linear SVM. More...
#include "IOStructures.h"
Go to the source code of this file.
Functions | |
double | kernelFunction (svm_dataset dataset, int index1, int index2, properties props) |
Radial Basis Function of two elements of the dataset. More... | |
double | kernelTest (svm_dataset dataset, int index1, model mymodel, int index2) |
Radial Basis Function of one element of the dataset and Support Vectro of a trained model. More... | |
Defition of the kernel functions used in the non linear SVM.
double kernelFunction | ( | svm_dataset | dataset, |
int | index1, | ||
int | index2, | ||
properties | props | ||
) |
Radial Basis Function of two elements of the dataset.
This function returns the kernel function among two elements of the same dataset.
It returns exp(-gamma||x1-x2||^2)
x1 and x2 are two elements of the dataset and gamma is a parameter whose value can be found in the struct props.
dataset | The strut that contains the dataset information. |
index1 | The index of the first element of the dataset. |
index2 | The index of the second element of the dataset. |
props | The list of properties to extract the kernel parameters. |
double kernelTest | ( | svm_dataset | dataset, |
int | index1, | ||
model | mymodel, | ||
int | index2 | ||
) |
Radial Basis Function of one element of the dataset and Support Vectro of a trained model.
This method returns the RBF Kernel function of one element of the dataset and Support Vectro of a trained model.
It returns exp(-gamma||x1-x2||^2)
x1 is an element of the dataset and x2 is a support vector of a trained model, gamma is a parameter whose value can be found in the struct props.
dataset | The strut that contains the dataset information. |
index1 | The index of the sample of the dataset. |
mymodel | The trained SVM model. |
index2 | The index of one of the Support Vectors of the trained model. |