This example will show us how is process the Iris data base on the algorithm of Support Vectore Machine.
% --- Executes on button press in Entrenar.
function Entrenar_Callback(hObject, eventdata, handles)
Iris=load ('irisdataset'); % Load the Iris data
global maquina1;global maquina2;global maquina3; %We define three machine for the SVM
Condicion=0;
kernel = get(handles.Kernel,'Value'); %We get the value of the picker and map it with the kernel that we want to use.
switch kernel
case 1
set(handles.Efectividad, 'String', 'Elige una opci?n valida');
Condicion=1;
case 2
opcKernel = 'linear';
case 3
opcKernel = 'quadratic';
case 4
opcKernel = 'polynomial';
case 5
opcKernel = 'rbf';
case 6
opcKernel = 'mlp';
end
if Condicion==0 %We define in each machine each type of Flower (Setosa, Versicolor, Virginia)