matlab - Strange behavior of LibSVM -


i test classifiers classifying 2 identical normals (or more precise: 2 datasamples drawn same underlying distribution) or 2 normals separable. seems when using simple libsvm code , rbf kernel, result high classification accuracy when trying classify 2 identical normals:

clear all; close all; clc   gamma = 100;  % dummy data      = 15; b = 50;  x = zeros(200,2);  x(1:100,1) = a.*randn(100,1) + b; x(101:200,1) = a.*randn(100,1) + b;  % labels      y(1:100,1) = 1; y(101:200) = 2;   % libsvm options % -s 0 : classification % -t 2 : rbf kernel % -g : gamma in rbf kernel  model = svmtrain(y, x, sprintf('-s 0 -t 2 -g %g', gamma));  % display training accuracy [predicted_label, accuracy, decision_values] = svmpredict(y, x, model); 

why that? matlab's svmtrain chance level accuracy (around 50%), no matter kernel use. furthermore libsvm gives me extremly different results own dataset, , high accuracies when swap labels of dataset randomly..

thanks


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -