Changeset 616 for trunk/test/svm_test.cc
 Timestamp:
 Aug 31, 2006, 10:52:02 AM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/svm_test.cc
r527 r616 1 1 // $Id$ 2 2 3 #include <c++_tools/gslapi/matrix.h>4 #include <c++_tools/gslapi/vector.h>5 3 #include <c++_tools/classifier/SVM.h> 6 4 #include <c++_tools/classifier/Kernel.h> … … 9 7 #include <c++_tools/classifier/Kernel_MEV.h> 10 8 #include <c++_tools/classifier/PolynomialKernelFunction.h> 9 #include <c++_tools/utility/matrix.h> 10 #include <c++_tools/utility/vector.h> 11 11 12 12 #include <cassert> … … 32 32 bool ok = true; 33 33 34 gslapi::matrix data2_core(2,3);34 utility::matrix data2_core(2,3); 35 35 data2_core(0,0)=0; 36 36 data2_core(1,0)=0; … … 88 88 89 89 std::ifstream is("data/nm_data_centralized.txt"); 90 gslapi::matrix data_core(is);90 utility::matrix data_core(is); 91 91 is.close(); 92 92 … … 102 102 103 103 is.open("data/nm_alpha_linear_matlab.txt"); 104 theplu:: gslapi::vector alpha_matlab(is);104 theplu::utility::vector alpha_matlab(is); 105 105 is.close(); 106 106 … … 112 112 } 113 113 114 theplu:: gslapi::vector alpha = svm.alpha();114 theplu::utility::vector alpha = svm.alpha(); 115 115 116 116 // Comparing alpha to alpha_matlab 117 theplu:: gslapi::vector diff_alpha(alpha);117 theplu::utility::vector diff_alpha(alpha); 118 118 diff_alpha=alpha_matlab; 119 119 if (diff_alpha*diff_alpha> 1e10 ){ … … 123 123 124 124 // Comparing output to target 125 theplu:: gslapi::vector output(svm.output());125 theplu::utility::vector output(svm.output()); 126 126 double slack = 0; 127 127 for (unsigned int i=0; i<target.size(); i++){
Note: See TracChangeset
for help on using the changeset viewer.