Support vector Machines (SVM) and Online SVM

Machine Learning Programming using SVM

The purpose of this research project is to understand Machine Learning areas to get knowledge for classifying multi classes data and system intelligence to learn the behavior (Pattern) of data. This further helps in future data prediction. The support vector machines and neural network are the two techniques understood in this project from algorithmic and programming point of view. The algorithmic understanding includes mathematical modeling and knowledge of popular selected research papers in this area. The experiments have been conducted for classification of images data using Matlab and Java. The outcome of this project is to understand the complexity of support vector machine and neural networks, and further steps taken to improve complexities. An online SVM also designed during this project.

Technologies used: Matlab and Java

This project work was started as a research assignment.

to using

The below source code in Matlab demonstrate the use of Online SVM function (Ask for full source code and SVM).

function model=MEDSV(testvec,v, target, model)
% testvec is test vector
% v is test vetor class
% target is target class
% model is the SVM model
  nSV=model(1).nSV;
  SV=model(1).SV;
  labels=model(1).label;
  coef=model(1).sv_coef;
  id=find(labels==target);
  lb=sum(nSV(1:id-1))+1;
  ub=lb+nSV(id)-1;
  reqdSV=SV(lb:ub,:);
  [m n]=size(reqdSV);
  md=Inf; flag=0;
  for i=1:m
      x=[testvec;reqdSV(i,:)];
      d=pdist(x,'euclidean',2);
      if d<=md
          if d~=0
              minid=i; flag=1;
          end
          md=d;
      end
  end
  if flag
      minid=lb+minid-1;
      minid_coef=model(1).sv_coef(minid,:);

model(1).sv_coef=[model(1).sv_coef(1:ub,:);

      minid_coef;
      model(1).sv_coef(ub+1:end,:)];
      model(1).SV=[model(1).SV(1:ub,:); testvec;
      model(1).SV(ub+1:end,:)];
      model(1).nSV(id)=model(1).nSV(id)+1;
      model(1).l=model(1).l+1;
  end
end