A list,

Support Vector Machine (SVM) was first proposed by Cortes and Vapnik in 1995. It shows many unique advantages in solving small sample size, nonlinear and high-dimensional pattern recognition, and can be generalized to other Machine learning problems such as function fitting.

1. Mathematics

1.1 Two-dimensional Space



















2 algorithm Part







Ii. Source code

 
load ./CID2013.mat; %% You can also load the files of 'CSIQ.mat' or 'TID13.mat' if you want to use CSIQ or TID2013 database for training.
train_data = Data(:,[1:5]);
train_label = Data(:, 6);
model = svmtrain(train_label, train_data, '-s 3');  % train
 
%img = imread('.\input\TV_VR\Fig.7_RTV.jpg');
img=imread('img004.png');
disim = img;
 
if numel(size(disim))>2     %% Is a rgb image ?
    dis_file_gray = rgb2gray(disim);
else
    dis_file_gray = disim;
end
 
i = 1;
    %% mean value
   mean_tmp = round(mean2(dis_file_gray));        
   Value(i, 1) = 1/ (sqrt(2*pi)*26.0625) *exp(-(mean_tmp118.5585) ^2/ (2*26.0625^2)); % %std value
   std_tmp = round(std2(dis_file_gray));
   Value(i, 2) = 1/ (sqrt(2*pi)*12.8584) *exp(-(std_tmp57.2743) ^2/ (2*12.8584^2));
        
  %% entropy value
   entropy_tmp = entropy(dis_file_gray);
   Value(i, 3) = 1/0.2578*exp((entropy_tmp7.5404) /0.2578) *exp(-exp((entropy_tmp7.5404) /0.2578));
        
  %% kurtosis value
   kurtosis_tmp = kurtosis(double(dis_file_gray(:)));       
   Value(i, 4) = sqrt(19.3174/ (2*pi*kurtosis_tmp^3)) *exp(19.3174*(kurtosis_tmp2.7292) ^2/ (2* (2.7292^2)*kurtosis_tmp));
        
  %% skewness value
   skewness_tmp = skewness(double(dis_file_gray(:)));
   Value(i, 5) = 1/ (sqrt(2*pi)*0.6319) *exp(-(skewness_tmp0.1799) ^2/ (2*0.6319^2));
   
test_label = 0;
[predicted_label, accuracy, decision_values] = svmpredict(test_label, Value, model);
Score = predicted_label;
disp('Score:');
disp(Score );
 
Copy the code

Third, note

Version: 2014 a