Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Strange XML file behaviour

I trained the svm classifier using the following code and it gave me wrong classification and when i looked at the saved xml file, i found strange contents. Only one vector is in the xml file and the classification is -1 for all the test data. I found that the classifier will be the same before and after classifier.train(...). Here is the code: Log.i(TAG,"Training..."); v_features.copyTo(trainingData); trainingData.convertTo(trainingData, CvType.CV_32F); trainingLabels.copyTo(classes); classes.convertTo(classes, CvType.CV_32S); classes.convertTo(classes, CvType.CV_32S); CvSVMParams params = new CvSVMParams(); //first method working fine params.set_svm_type(CvSVM.C_SVC); params.set_kernel_type(CvSVM.LINEAR); params.set_gamma(0.01); params.set_nu(0.5); params.set_C(1000); TermCriteria criteria = new TermCriteria(TermCriteria.MAX_ITER,100, 1e-6); params.set_term_crit(criteria); // initialize SVM object to avoid being Null object classifier = new CvSVM(trainingData, classes, new Mat(), new Mat(), params); classifier.save(XML1.toString()); classifier.train(trainingData, classes, new Mat(), new Mat(), params); classifier.save(XML.toString());

Here the xml file:

<opencv_storage> <my_svm type_id="opencv-ml-svm"> <svm_type>C_SVC</svm_type> <kernel> <type>LINEAR</type> </kernel> <c>1000.</c> <term_criteria> <epsilon>2.2204460492503131e-16</epsilon> <iterations>100</iterations> </term_criteria> <var_all>18</var_all> <var_count>18</var_count> <class_count>2</class_count> <class_labels type_id="opencv-matrix"> <rows>1</rows> <cols>2</cols>

i
<data> -1 1</data> </class_labels> <sv_total>1</sv_total> <support_vectors> <_> -9.17065036e-18 7.35845397e-18 -5.99237967e-18 4.50786054e-18 1.91758168e-18 1.38351872e-18 -3.33754597e-18 1.15368551e-17 -2.76280041e-18 3.05637369e-19 -6.48722237e-19 -2.11365533e-18 -1.00750228e-10 3.54062057e-10 1.56639299e-10 0. 3.43815959e-14 -2.05199830e-14 </support_vectors> -<decision_functions> -<_> <sv_count>1</sv_count> <rho>-4.7668412450595643e-01</rho> <alpha> 1.</alpha> <index> 0</index> </decision_functions> </my_svm> </opencv_storage>

while when I change the line classifier.train(trainingData, classes, new Mat(), new Mat(), params); to classifier.train(trainingData, classes);, the classifier will take the default values instead of the assigned parameter and the decision function will be 1. here is the xml file: -<opencv_storage> -<my_svm type_id="opencv-ml-svm"> <svm_type>C_SVC</svm_type> -<kernel> <type>RBF</type> <gamma>1.</gamma> </kernel> <c>1.</c> -<term_criteria> <epsilon>1.1920928955078125e-07</epsilon> <iterations>1000</iterations> </term_criteria> <var_all>18</var_all> <var_count>18</var_count> <class_count>2</class_count> -<class_labels type_id="opencv-matrix"> <rows>1</rows> <cols>2</cols>

i
<data> -1 1</data> </class_labels> <sv_total>78</sv_total> -<support_vectors> <_> 3.82838593e+01 7.11920929e+00 -4.67479944e+00 1.22517595e+01 3.15141797e+00 2.35791826e+00 4.94117661e+01 13. -1. -9.08270061e-01 -1.86607766e+00 -1.55849302e+00 1.53999995e+10 531000000. 229000000. 0. 4.85476406e+04 -2.60734746e+04

<_> 3.96895714e+01 9.19926834e+00 -3.27970743e+00 1.25011663e+01 3.11253858e+00 1.48126924e+00 4.98039207e+01 14. -1. -8.09072375e-01 -1.54238451e+00 -1.53902304e+00 471000000. 25300000. 3218436. 0. 1.16598379e+04 -2.38160229e+03

<_> 3.66479874e+01 9.63044548e+00 -8.07036877e+00 8.72248554e+00 2.52424383e+00 2.28012586e+00 4.86274529e+01 14. -4. -1.37340033e+00 -1.73103523e+00 -1.78515089e+00 5.85999974e+09 405000000. 284000000. 0. 4.66688945e+04 -3.62134961e+04

<_> 3.76396332e+01 1.05483875e+01 -5.50841522e+00 9.91868877e+00 3.93630576e+00 1.93882585e+00 4.98039207e+01 18. -2. -1.22640073e+00 -1.89304733e+00 -1.80955660e+00 2.88000000e+09 226000000. 61700000. 0. 3.69275000e+04 -1.41062031e+04

<_> 3.87454834e+01 1.03587227e+01 -1.75184274e+00 2.75676489e+00 7.21087337e-01 8.94888759e-01 4.78431358e+01 12. -1. -3.30011892e+00 -2.27611494e+00 -8.40152204e-01 249000000. 17800000. 508369. 0. 9.86666602e+03 -5.11263306e+02

<_> 3.68829956e+01 1.11690140e+01 -7.81690121e-01 3.65062666e+00 6.88318014e-01 8.31731558e-01 4.78431358e+01 13. 1. -3.00226212e+00 -2.66008735e+00 -2.14214563e+00 247000000. 22600000. 110889. 0. 1.14908496e+04 -1.36380096e+02

<_> 3.90172806e+01 1.10926361e+01 -3.72921616e-01 3.23376513e+00 8.48901987e-01 6.58313036e-01 4.98039207e+01 13. 2. -3.33562922e+00 -2.24685931e+00 -3.60454917e+00 270000000. 21800000. 24649. 0. 1.12513145e+04 4.15888309e+00

<_> 4.64208107e+01 1.12494478e+01 0. 1.76573491e+00 7.19964981e-01 4.20238554e-01 4.98039207e+01 13. 1. -1.91597795e+00 -2.43144035e+00 -2.37960076e+00 442000000. 26000000. 0. 0. 1.23444541e+04 0.

<_> 4.73936157e+01 1.23884888e+01 1.87769783e+00 2.73925281e+00 1.38080776e+00 3.34873855e-01 5.17647057e+01 15. 3. -1.59572387e+00 -1.89129210e+00 -3.35141754e+00 391000000. 26700000. 613089. 0. 1.30343232e+04 5.07906982e+02

<_> 4.09636955e+01 1.46930695e+01 1.53069305e+00 2.76963472e+00 8.07668388e-01 5.37272632e-01 5.09803925e+01 16. 3. -3.61661291e+00 -1.61815262e+00 -2.73475099e+00 428000000. 55100000. 597529. 0. 1.99518320e+04 3.78485474e+02

<_> 4.74453316e+01 5.40922213e+00 -8.53025913e-01 2.26101017e+00 7.88772941e-01 6.56390250e-01 5.17647057e+01 7. 1. -1.91037440e+00 -2.01677561e+00 -2.82305503e+00 271000000. 3523129. 87616. 0. 3.18888159e+03 -6.93147202e+01

<_> 4.52976990e+01 7.86757994e+00 -2.71917820e+00 2.55507064e+00 5.10885239e-01 5.24423778e-01 5.13725471e+01 9. -1. -2.37756562e+00 -2.21658397e+00 -3.27822280e+00 394000000. 11900000. 1418481. 0. 7.11555225e+03 -1.21524036e+03

<_> 4.50604362e+01 8.55479431e+00 -1.53424656e+00 2.27247548e+00 6.04747057e-01 6.63783073e-01 5.13725471e+01 10. 1. -2.77763700e+00 -2.38976836e+00 -3.81788349e+00 390000000. 14000000. 451584. 0. 8.05226562e+03 -3.76392456e+02

<_> 4.80858459e+01 5.19770765e+00 -6.96275055e-01 2.27837682e+00 9.01062965e-01 6.14544690e-01 5.29411774e+01 7. 1. -2.13104773e+00 -2.00018454e+00 -2.76021433e+00 282000000. 3290596. 59049. 0. 3.01768750e+03 -2.49532986e+01

<_> 4.56690903e+01 7.75730324e+00 -2.47865176e+00 2.48247361e+00 4.82942224e-01 6.85396969e-01 5.13725471e+01 9. -1. -2.29748940e+00 -2.57317877e+00 -2.15736556e+00 413000000. 11900000. 1216609. 0. 7.07867920e+03 -1.04542029e+03

<_> 4.53845482e+01 9.12557125e+00 -1.69863009e+00 2.22676373e+00 5.49166262e-01 7.58843124e-01 5.05882339e+01 10. -1. -2.33688354e+00 -1.59228504e+00 -9.20651615e-01 395000000. 16000000. 553536. 0. 8.84494531e+03 -5.01450836e+02

<_> 4.79763947e+01 5.39482212e+00 -1.47572815e+00 2.16585135e+00 9.31004465e-01 7.08405316e-01 5.25490189e+01 7. -1. -2.11123657e+00 -1.72413564e+00 -6.71548009e-01 220000000. 2778889. 207936. 0. 2.83545264e+03 -2.53535522e+02

<_> 4.46388626e+01 8.34873009e+00 -2.26789832e+00 2.13327718e+00 5.57008266e-01 6.74380720e-01 5.05882339e+01 10. -1. -2.78884125e+00 -2.96453452e+00 -1.88009286e+00 374000000. 13100000. 964324. 0. 7.67944824e+03 -8.50157043e+02

<_> 4.43145828e+01 7.72489071e+00 -2.91266370e+00 2.79113221e+00 6.63022459e-01 5.73251188e-01 5.05882339e+01 9. -1. -2.24770880e+00 -1.92317641e+00 -3.33651948e+00 412000000. 12500000. 1779556. 0. 7.24649463e+03 -1.45376428e+03

<_> 4.09326477e+01 7.89834499e+00 -2.55555558e+00 2.35305548e+00 7.75860429e-01 6.34777069e-01 4.66666679e+01 9. -1. -2.43684030e+00 -1.41991365e+00 -2.45055413e+00 300000000. 11200000. 1168561. 0. 6.92100879e+03 -1.05107385e+03

<_> 4.02345848e+01 6.94808149e+00 -2.88713312e+00 2.99484706e+00 5.93048275e-01 6.12799287e-01 4.58823547e+01 9. -1. -1.88582885e+00 -3.45995235e+00 -3.07952905e+00 318000000. 9474084. 1635841. 0. 5.97780078e+03 -1.38567322e+03

<_> 3.96713142e+01 9.28323746e+00 -1.93063581e+00 2.62076020e+00 1.00898099e+00 4.37858880e-01 4.54901962e+01 11. -1. -2.22030330e+00 -1.70148194e+00 -2.12542415e+00 188000000. 10300000. 446224. 0. 7.17635986e+03 -4.57898254e+02

<_> 4.03591347e+01 6.92631578e+00 -4.64736843e+00 2.05484462e+00 6.99505150e-01 6.58441901e-01 4.54901962e+01 8. -3. -2.49705648e+00 -1.53491962e+00 -2.50191927e+00 235000000. 6927424. 3118756. 0. 5.10725391e+03 -2.73174683e+03

<_> 3.60398941e+01 9.48843956e+00 -3.98554921e+00 3.47871566e+00 1.18328166e+00 6.33660197e-01 4.43137245e+01 12. -2. -2.37841487e+00 -2.12253833e+00 -3.13346028e+00 155000000. 10800000. 1901641. 0. 7.41364502e+03 -1.92434949e+03

<_> 4.19541931e+01 9.34173679e+00 -1.98319328e+00 2.73904181e+00 1.01295269e+00 4.78967011e-01 4.86274529e+01 11. -1. -2.43634796e+00 -1.63705897e+00 -2.05273700e+00 224000000. 11100000. 501264. 0. 7.47203271e+03 -5.06472748e+02

<_> 4.26421089e+01 7.01262617e+00 -4.45454550e+00 2.05087996e+00 7.01615870e-01 7.25059748e-01 4.78431358e+01 8. -3. -2.53599858e+00 -1.40728533e+00 -2.00610423e+00 285000000. 7711729. 3111696. 0. 5.42287207e+03 -2.65912305e+03

<_> 4.16104851e+01 9.44662952e+00 -2.22191000e+00 2.70227075e+00 9.51028347e-01 6.98049247e-01 4.82352943e+01 11. -1. -2.45157075e+00 -1.63335907e+00 -1.75046408e+00 219000000. 11300000. 625681. 0. 7.56938916e+03 -6.80397461e+02

<_> 4.26433182e+01 6.69211197e+00 -4.33842230e+00 2.14478898e+00 5.83369076e-01 8.00746799e-01 4.82352943e+01 8. -3. -2.60723877e+00 -2.24195647e+00 -1.67146766e+00 281000000. 6916900. 2907025. 0. 5.00968848e+03 -2.53156128e+03

<_> 3.83017998e+01 9.40935707e+00 -3.75730991e+00 3.35619926e+00 1.23389041e+00 6.32586658e-01 4.66666679e+01 11. -3. -2.49236321e+00 -1.28912842e+00 -1.19716394e+00 172000000. 10400000. 1651225. 0. 7.24244434e+03 -1.71910425e+03

<_> 4.01055794e+01 1.07500000e+01 -2.43589744e-01 3.48651266e+00 9.05526698e-01 8.87027562e-01 4.86274529e+01 12. 1. -2.44423938e+00 -1.38041210e+00 -1.40197420e+00 352000000. 25300000. 12996. 0. 1.19665176e+04 -5.12928925e+01

<_> 3.65429344e+01 1.24109011e+01 -1.56813419e+00 4.13602638e+00 1.31390190e+00 8.30543280e-01 4.94117661e+01 15. 1. -3.11139941e+00 -1.97054172e+00 -3.09211349e+00 304000000. 35000000. 559504. 0. 1.49440898e+04 -4.63864532e+02

<_> 3.69620781e+01 1.10616741e+01 -2.08370042e+00 3.60000968e+00 8.18660557e-01 7.60852993e-01 4.74509811e+01 13. -1. -2.91357589e+00 -2.36767960e+00 -1.42432296e+00 282000000. 25200000. 894916. 0. 1.20843213e+04 -7.58104980e+02

<_> 3.49055252e+01 7.07727289e+00 -4.31136370e+00 4.43706226e+00 6.62935495e-01 9.41883028e-01 4.43137245e+01 8. -1. -2.12036657e+00 -1.39188087e+00 -3.51568460e+00 236000000. 9696996. 3598609. 0. 6.10773682e+03 -2.82302979e+03

<_> 3.79232140e+01 9.09160328e+00 -5.32442760e+00 1.16604567e+01 3.03654671e+00 2.08358145e+00 4.58823547e+01 14. -3. -6.82575285e-01 -1.61644042e+00 -1.11559236e+00 395000000. 22700000. 7784100. 0. 1.09719951e+04 -4.98501318e+03

<_> 3.96474915e+01 2.93626380e+00 -2.93846154e+00 1.28750916e+01 1.09258401e+00 1.04015732e+00 4.66666679e+01 5. -2. -5.45175016e-01 -1.88885820e+00 -9.02230382e-01 325000000. 1784896. 1787569. 0. 1.59180176e+03 -1.58591333e+03

<_> 3.73965149e+01 4.78703690e+00 -3.68055558e+00 1.54049721e+01 2.04373908e+00 1.70097780e+00 4.62745094e+01 7. -3. -5.76307118e-01 -1.08280122e+00 -4.00096655e-01 65200000. 1069156. 632025. 0. 1.78604651e+03 -1.17513489e+03

<_> 3.80710106e+01 3.87941790e+00 -5.48648643e+00 1.28049583e+01 1.63320935e+00 2.08457470e+00 4.66666679e+01 8. -3. -6.71275616e-01 -2.52299690e+00 -1.19280279e+00 335000000. 3481956. 6964321. 0. 2.78010107e+03 -4.80673096e+03

<_> 4.41263580e+01 2.26110601e+00 -4.03354502e+00 1.15165987e+01 8.94630611e-01 1.45146906e+00 5.29411774e+01 4. -1. -7.65401304e-01 -1.94370043e+00 -2.08998251e+00 2.36999987e+09 6220036. 19800000. 0. 2.30407129e+03 -6.62449707e+03

<_> 4.10063286e+01 1.25925922e+00 -3.39153433e+00 1.67458897e+01 8.10957670e-01 1.51714444e+00 4.90196075e+01 2. -3. -4.78522152e-01 -9.13414776e-01 -2.58073241e-01 60100000. 56644. 410881. 0. 1.28925369e+02 -8.90911560e+02

<_> 3.96474991e+01 3.23595500e+00 -3.02247190e+00 1.67863388e+01 1.54717922e+00 1.38188541e+00 4.86274529e+01 6. -3. -5.34956038e-01 -1.78650606e+00 -1.62617750e-02 49800000. 331776. 289444. 0. 7.82927185e+02 -6.90381348e+02

<_> 4.16213608e+01 4.02382994e+00 -4.35148954e+00 1.08395329e+01 1.52798927e+00 1.45099664e+00 4.98039207e+01 8. -3. -7.54881322e-01 -2.60222387e+00 -9.31421399e-01 2.39000013e+09 22400000. 26100000. 0. 7.04785693e+03 -7.94857910e+03

<_> 4.23840790e+01 5.20483303e+00 -3.68124270e+00 1.24462976e+01 1.77618170e+00 1.48436594e+00 4.98039207e+01 8. -1. -5.96148491e-01 -1.57369423e+00 -1.80632210e+00 1360000000. 20500000. 10200000. 0. 7.89334766e+03 -4.54384717e+03

<_> 4.13502235e+01 3.58605480e+00 -3.09267426e+00 1.12250795e+01 1.32024086e+00 1.07333446e+00 4.90196075e+01 6. -1. -6.83236480e-01 -1.82841277e+00 -1.94969440e+00 2.19000013e+09 16500000. 12300000. 0. 5.59647412e+03 -4.27824707e+03

<_> 4.01283073e+01 3.62461543e+00 -1.47487175e+00 1.09960003e+01 1.60403633e+00 1.24246836e+00 4.78431358e+01 7. 3. -7.01603293e-01 -2.10430694e+00 -3.60159826e+00 1530000000. 12500000. 2067844. 0. 5.04139062e+03 -1.12786414e+03

<_> 4.16525383e+01 -2.01825047e+00 -1.44745121e-02 1.00243206e+01 1.36403286e+00 1.41836095e+00 5.49019623e+01 2. 4. -1.32172787e+00 -2.94586039e+00 -2.83036184e+00 4.38000026e+09 10300000. 529. 0. -3.08259717e+03 4.18225220e+02

<_> 4.35083160e+01 3.09920645e+00 3.29629636e+00 1.41788616e+01 1.35671926e+00 1.47179377e+00 5.56862755e+01 5. 6. -8.58881235e-01 -1.40102208e+00 -1.83701265e+00 9.74000026e+09 49400000. 55900000. 0. 8.93070020e+03 9.99491016e+03

<_> 4.46242523e+01 4.37553644e+00 1.81974244e+00 1.40660410e+01 1.42726445e+00 5.72732270e-01 5.09803925e+01 5. 2. -4.51878309e-01 -4.37524736e-01 -3.14732581e-01 432000000. 4157521. 719104. 0. 3.20934546e+03 5.87788818e+02

<_> 4.50096817e+01 2.44778490e+00 1.26392400e+00 8.87110424e+00 1.13340878e+00 5.56289494e-01 5.13725471e+01 4. 3. -7.17257619e-01 -1.36951053e+00 -3.12081385e+00 2.01999995e+10 59800000. 16000000. 0. 7.88781299e+03 1.36445972e+03

<_> 4.41817856e+01 2.24299073e+00 -3.36448610e-01 1.68177605e+00 4.89919335e-01 4.72494394e-01 4.86274529e+01 3. -1. -2.64343643e+00 -1.54517138e+00 1.40435827e+00 22300000. 57600. 1296. 0. 1.99551346e+02 0.

<_> 4.27392883e+01 1.94074070e+00 -8.59259248e-01 1.78339827e+00 4.51548159e-01 6.34361327e-01 4.86274529e+01 3. -1. -3.30165410e+00 -2.34583902e+00 2.21862122e-01 33300000. 68644. 13456. 0. 1.81291870e+02 -2.63395920e+01

<_> 3.28766441e+01 3.02531648e+00 -2.01265812e+00 7.66576052e+00 7.62651682e-01 1.31200564e+00 4.70588226e+01 5. -1. -1.85006797e+00 -2.58923388e+00 -7.71839857e-01 27000000. 228484. 101124. 0. 5.44796265e+02 -3.19900482e+02

<_> 4.84820328e+01 4.82370806e+00 -1.67173254e+00 2.22833538e+00 5.50697446e-01 6.10314369e-01 5.25490189e+01 6. -1. -1.82512379e+00 -2.13600349e+00 -1.10063362e+00 254000000. 2518569. 302500. 0. 2.50769531e+03 -3.30671844e+02

<_> 4.77697983e+01 2.36103892e+00 -1.72727275e+00 1.91643608e+00 5.96125126e-01 4.79078203e-01 5.45098038e+01 3. -1. -3.51694727e+00 -1.07185721e+00 -1.51806676e+00 338000000. 826281. 442225. 0. 8.11707703e+02 -3.91301910e+02

<_> 4.53427773e+01 3.03194094e+00 -2.06142497e+00 1.79671872e+00 2.91504472e-01 6.14054024e-01 5.09803925e+01 4. -1. -3.13772893e+00 -3.32090616e+00 -1.72855318e+00 341000000. 1522756. 703921. 0. 1.37438489e+03 -6.45971497e+02

<_> 4.43029938e+01 2.70895529e+00 -3.13432837e+00 2.66969323e+00 5.06052315e-01 6.81573868e-01 5.33333321e+01 4. -1. -3.38253736e+00 -2.55120802e+00 -3.13147020e+00 317000000. 1185921. 1587600. 0. 1.10490796e+03 -1.47002087e+03

<_> 4.34843788e+01 3.76076555e+00 -2.59808612e+00 2.31212759e+00 6.45330191e-01 6.34868920e-01 5.05882339e+01 5. -1. -3.07243204e+00 -1.92031062e+00 -2.51719069e+00 330000000. 2471184. 1179396. 0. 2.10533105e+03 -1.07336292e+03

<_> 4.45413666e+01 2.68780494e+00 -2.88780499e+00 2.77228069e+00 5.63176990e-01 6.34071290e-01 5.33333321e+01 4. -1. -3.17138314e+00 -2.32998705e+00 -2.97727537e+00 333000000. 1214404. 1401856. 0. 1.11419092e+03 -1.28453088e+03

<_> 4.42735291e+01 3.46000004e+00 -3.00250006e+00 2.27525353e+00 5.41664124e-01 5.07438421e-01 4.90196075e+01 5. -1. -2.08595586e+00 -2.84309030e+00 -3.94629169e+00 314000000. 1915456. 1442401. 0. 1.73509741e+03 -1.33883105e+03

<_> 4.37614288e+01 3.95591640e+00 -2.90255213e+00 2.35446692e+00 5.05566239e-01 4.86254662e-01 5.05882339e+01 5. -1. -2.89951110e+00 -2.06517649e+00 -3.91266608e+00 356000000. 2907025. 1565001. 0. 2.35894409e+03 -1.35191223e+03

<_> 4.29279785e+01 3.21875000e+00 -3.96153855e+00 2.86241508e+00 8.27841461e-01 9.74907041e-01 5.09803925e+01 5. -2. -2.81315351e+00 -2.15167999e+00 -2.01202607e+00 319000000. 1792921. 2715904. 0. 1.60995679e+03 -2.32220996e+03

<_> 4.39256630e+01 3.54046988e+00 -3.92167091e+00 2.07915449e+00 5.66982567e-01 8.54492247e-01 4.94117661e+01 5. -2. -2.63862133e+00 -2.57420611e+00 -2.24890399e+00 283000000. 1838736. 2256004. 0. 1.73197925e+03 -2.08773340e+03

<_> 4.26585655e+01 3.54694843e+00 -3.00234747e+00 2.28327155e+00 4.97790962e-01 4.02450383e-01 4.90196075e+01 4. -1. -2.78593302e+00 -9.10124242e-01 -4.97538948e+00 330000000. 2283121. 1635841. 0. 1.92812292e+03 -1.41801245e+03

<_> 4.04151649e+01 3.48000002e+00 -3.43466663e+00 1.92444324e+00 5.30659974e-01 6.89249516e-01 4.47058830e+01 5. -2. -2.22958994e+00 -2.86435771e+00 -2.08149099e+00 230000000. 1703025. 1658944. 0. 1.64242334e+03 -1.61405615e+03

<_> 3.92888641e+01 3.65789485e+00 -3.19856453e+00 2.39628029e+00 5.26973248e-01 5.87996244e-01 4.58823547e+01 5. -1. -2.75155258e+00 -2.54681849e+00 -3.73907948e+00 270000000. 2337841. 1787569. 0. 1.99900793e+03 -1.57604810e+03

<_> 3.87974510e+01 3.11330056e+00 -4.58620691e+00 3.02546453e+00 4.78060991e-01 6.92113817e-01 4.58823547e+01 4. -2. -2.34175754e+00 -1.85478318e+00 -3.73667836e+00 248000000. 1597696. 3467044. 0. 1.45041418e+03 -2.85896948e+03

<_> 4.59029922e+01 3.30526304e+00 -5.48947382e+00 1.60723209e+00 5.14498949e-01 6.62844539e-01 4.94117661e+01 4. -3. -2.18311548e+00 -1.35031736e+00 -3.75574303e+00 76100000. 394384. 1087849. 0. 7.58369751e+02 -1.78410620e+03

<_> 4.58492813e+01 4.06024075e+00 -7.92369461e+00 1.86724341e+00 6.01525486e-01 9.97084498e-01 5.01960793e+01 5. -6. -2.32792330e+00 -1.56229305e+00 -1.92931974e+00 130000000. 1022121. 3892729. 0. 1.42788086e+03 -4.09972754e+03

<_> 4.82742920e+01 3.11049724e+00 -5.17127085e+00 1.62717330e+00 4.91867870e-01 9.90815878e-01 5.21568642e+01 4. -3. -2.38608313e+00 -1.80841804e+00 -2.19139671e+00 76300000. 316969. 876096. 0. 6.45950684e+02 -1.55641846e+03

<_> 4.82978363e+01 3.87931037e+00 -8.12068939e+00 1.68812454e+00 7.50346720e-01 1.34648442e+00 5.17647057e+01 5. -5. -2.05368090e+00 -1.49356234e+00 -2.31765747e+00 126000000. 810000. 3549456. 0. 1.23715259e+03 -3.97224341e+03

<_> 4.97275963e+01 1.87248325e+00 -5.50335550e+00 1.25308919e+00 3.71620625e-01 8.71811807e-01 5.21568642e+01 2. -3. -1.93862343e+00 -3.43136966e-01 -2.87144041e+00 54900000. 77841. 672400. 0. 1.82990860e+02 -1.40914844e+03

<_> 4.81250000e+01 3.07291675e+00 -5.07291651e+00 1.79325402e+00 5.44762790e-01 9.65496302e-01 5.21568642e+01 4. -3. -2.24835062e+00 -1.70181108e+00 -2.14699602e+00 85400000. 348100. 948676. 0. 6.71767029e+02 -1.60020190e+03

<_> 4.82836876e+01 3.80851054e+00 -7.98723412e+00 1.66209245e+00 6.26992047e-01 1.24620569e+00 5.21568642e+01 5. -5. -2.33030105e+00 -1.90032601e+00 -2.39706349e+00 129000000. 801025. 3523129. 0. 1.20914551e+03 -3.92333032e+03

<_> 4.97216492e+01 1.41258740e+00 -5.72027969e+00 1.34882069e+00 5.46171308e-01 9.63716567e-01 5.21568642e+01 3. -3. -1.80543900e+00 -2.90643716e+00 -2.82269692e+00 50600000. 40804. 669124. 0. 8.64734955e+01 -1.43852991e+03

<_> 4.48535004e+01 3.66539931e+00 -1.49429655e+00 2.68247509e+00 5.99604249e-01 7.93848634e-01 5.21568642e+01 5. -1. -2.72262120e+00 -2.22580290e+00 -6.22658491e-01 139000000. 929296. 154449. 0. 1.26498779e+03 -2.27093781e+02

<_> 4.28908653e+01 3.11184216e+00 -2.91776323e+00 2.72577214e+00 4.66641724e-01 4.83082473e-01 4.94117661e+01 4. -1. -2.39231277e+00 -1.90329719e+00 -3.96984625e+00 170000000. 894916. 786769. 0. 1.08452832e+03 -9.62534485e+02

<_> 4.25146065e+01 4.87755108e+00 -2.98367357e+00 2.58254981e+00 6.33508325e-01 6.25755668e-01 4.86274529e+01 6. -1. -2.36698127e+00 -1.77179837e+00 -3.17004466e+00 108000000. 1428025. 534361. 0. 1.90380127e+03 -8.16389832e+02

<_> 3.68095894e+01 7.33248091e+00 -3.41687989e+00 4.80635166e+00 5.55782199e-01 7.91658223e-01 4.90196075e+01 9. -1. -2.54039240e+00 -3.00031066e+00 -3.05293345e+00 207000000. 8219689. 1784896. 0. 5.72019775e+03 -1.68104846e+03

<_> 3.60187340e+01 6.99737549e+00 -3.73228335e+00 4.65609169e+00 5.44592559e-01 8.85421336e-01 4.90196075e+01 8. -1. -2.79222894e+00 -1.84105468e+00 -3.08585691e+00 188000000. 7107556. 2022084. 0. 5.19492285e+03 -1.91476990e+03 </support_vectors> -<decision_functions> -<_> <sv_count>78</sv_count> <rho>2.6666666666666666e-01</rho> <alpha> 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01</alpha> <index> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77</index> </decision_functions> </my_svm> </opencv_storage>

Can anyone kindly give some insights about the reason of this. I use opencv 2.4.13 for Android.

click to hide/show revision 2
No.2 Revision

updated 2017-07-25 06:58:38 -0600

berak gravatar image

Strange XML file behaviour

I trained the svm classifier using the following code and it gave me wrong classification and when i looked at the saved xml file, i found strange contents. Only one vector is in the xml file and the classification is -1 for all the test data. I found that the classifier will be the same before and after classifier.train(...). Here is the code: code:

 Log.i(TAG,"Training...");
     v_features.copyTo(trainingData);
     trainingData.convertTo(trainingData, CvType.CV_32F);
     trainingLabels.copyTo(classes);
     classes.convertTo(classes, CvType.CV_32S);
     classes.convertTo(classes, CvType.CV_32S);
     CvSVMParams params = new CvSVMParams();
     //first method working fine
     params.set_svm_type(CvSVM.C_SVC);
     params.set_kernel_type(CvSVM.LINEAR);
     params.set_gamma(0.01);
     params.set_nu(0.5);
     params.set_C(1000);
     TermCriteria criteria = new TermCriteria(TermCriteria.MAX_ITER,100, 1e-6);
     params.set_term_crit(criteria);
     // initialize SVM object to avoid being Null object
     classifier = new CvSVM(trainingData, classes, new Mat(), new Mat(), params);
     classifier.save(XML1.toString());
     classifier.train(trainingData, classes, new Mat(), new Mat(), params);
        classifier.save(XML.toString());

classifier.save(XML.toString());

Here the xml file:

<?xml version="1.0"?>
<opencv_storage>
<my_svm type_id="opencv-ml-svm">
<svm_type>C_SVC</svm_type>
<kernel>
<type>LINEAR</type>
</kernel>
<c>1000.</c>
<C>1000.</C>
<term_criteria>
<epsilon>2.2204460492503131e-16</epsilon>
<iterations>100</iterations>
</term_criteria>
<var_all>18</var_all>
<var_count>18</var_count>
<class_count>2</class_count>
<class_labels type_id="opencv-matrix">
<rows>1</rows>
<cols>2</cols>

i
<dt>i</dt> <data> -1 1</data> </class_labels> <sv_total>1</sv_total> <support_vectors> <_> -9.17065036e-18 7.35845397e-18 -5.99237967e-18 4.50786054e-18 1.91758168e-18 1.38351872e-18 -3.33754597e-18 1.15368551e-17 -2.76280041e-18 3.05637369e-19 -6.48722237e-19 -2.11365533e-18 -1.00750228e-10 3.54062057e-10 1.56639299e-10 0. 3.43815959e-14 -2.05199830e-14 -2.05199830e-14</_> </support_vectors> -<decision_functions> -<_> <sv_count>1</sv_count> <rho>-4.7668412450595643e-01</rho> <alpha> 1.</alpha> <index> 0</index> </_> </decision_functions> </my_svm> </opencv_storage>

</opencv_storage> while when I change the line classifier.train(trainingData, classes, new Mat(), new Mat(), params); to classifier.train(trainingData, classes);, the classifier will take the default values instead of the assigned parameter and the decision function will be 1. here is the xml file: <?xml version="1.0"?> -<opencv_storage> -<my_svm type_id="opencv-ml-svm"> <svm_type>C_SVC</svm_type> -<kernel> <type>RBF</type> <gamma>1.</gamma> </kernel> <c>1.</c> <C>1.</C> -<term_criteria> <epsilon>1.1920928955078125e-07</epsilon> <iterations>1000</iterations> </term_criteria> <var_all>18</var_all> <var_count>18</var_count> <class_count>2</class_count> -<class_labels type_id="opencv-matrix"> <rows>1</rows> <cols>2</cols>

i
<dt>i</dt> <data> -1 1</data> </class_labels> <sv_total>78</sv_total> -<support_vectors> <_> 3.82838593e+01 7.11920929e+00 -4.67479944e+00 1.22517595e+01 3.15141797e+00 2.35791826e+00 4.94117661e+01 13. -1. -9.08270061e-01 -1.86607766e+00 -1.55849302e+00 1.53999995e+10 531000000. 229000000. 0. 4.85476406e+04 -2.60734746e+04

-2.60734746e+04</_> <_> 3.96895714e+01 9.19926834e+00 -3.27970743e+00 1.25011663e+01 3.11253858e+00 1.48126924e+00 4.98039207e+01 14. -1. -8.09072375e-01 -1.54238451e+00 -1.53902304e+00 471000000. 25300000. 3218436. 0. 1.16598379e+04 -2.38160229e+03

-2.38160229e+03</_> <_> 3.66479874e+01 9.63044548e+00 -8.07036877e+00 8.72248554e+00 2.52424383e+00 2.28012586e+00 4.86274529e+01 14. -4. -1.37340033e+00 -1.73103523e+00 -1.78515089e+00 5.85999974e+09 405000000. 284000000. 0. 4.66688945e+04 -3.62134961e+04

-3.62134961e+04</_> <_> 3.76396332e+01 1.05483875e+01 -5.50841522e+00 9.91868877e+00 3.93630576e+00 1.93882585e+00 4.98039207e+01 18. -2. -1.22640073e+00 -1.89304733e+00 -1.80955660e+00 2.88000000e+09 226000000. 61700000. 0. 3.69275000e+04 -1.41062031e+04

-1.41062031e+04</_> <_> 3.87454834e+01 1.03587227e+01 -1.75184274e+00 2.75676489e+00 7.21087337e-01 8.94888759e-01 4.78431358e+01 12. -1. -3.30011892e+00 -2.27611494e+00 -8.40152204e-01 249000000. 17800000. 508369. 0. 9.86666602e+03 -5.11263306e+02

-5.11263306e+02</_> <_> 3.68829956e+01 1.11690140e+01 -7.81690121e-01 3.65062666e+00 6.88318014e-01 8.31731558e-01 4.78431358e+01 13. 1. -3.00226212e+00 -2.66008735e+00 -2.14214563e+00 247000000. 22600000. 110889. 0. 1.14908496e+04 -1.36380096e+02

-1.36380096e+02</_> <_> 3.90172806e+01 1.10926361e+01 -3.72921616e-01 3.23376513e+00 8.48901987e-01 6.58313036e-01 4.98039207e+01 13. 2. -3.33562922e+00 -2.24685931e+00 -3.60454917e+00 270000000. 21800000. 24649. 0. 1.12513145e+04 4.15888309e+00

4.15888309e+00</_> <_> 4.64208107e+01 1.12494478e+01 0. 1.76573491e+00 7.19964981e-01 4.20238554e-01 4.98039207e+01 13. 1. -1.91597795e+00 -2.43144035e+00 -2.37960076e+00 442000000. 26000000. 0. 0. 1.23444541e+04 0.

0.</_> <_> 4.73936157e+01 1.23884888e+01 1.87769783e+00 2.73925281e+00 1.38080776e+00 3.34873855e-01 5.17647057e+01 15. 3. -1.59572387e+00 -1.89129210e+00 -3.35141754e+00 391000000. 26700000. 613089. 0. 1.30343232e+04 5.07906982e+02

5.07906982e+02</_> <_> 4.09636955e+01 1.46930695e+01 1.53069305e+00 2.76963472e+00 8.07668388e-01 5.37272632e-01 5.09803925e+01 16. 3. -3.61661291e+00 -1.61815262e+00 -2.73475099e+00 428000000. 55100000. 597529. 0. 1.99518320e+04 3.78485474e+02

3.78485474e+02</_> <_> 4.74453316e+01 5.40922213e+00 -8.53025913e-01 2.26101017e+00 7.88772941e-01 6.56390250e-01 5.17647057e+01 7. 1. -1.91037440e+00 -2.01677561e+00 -2.82305503e+00 271000000. 3523129. 87616. 0. 3.18888159e+03 -6.93147202e+01

-6.93147202e+01</_> <_> 4.52976990e+01 7.86757994e+00 -2.71917820e+00 2.55507064e+00 5.10885239e-01 5.24423778e-01 5.13725471e+01 9. -1. -2.37756562e+00 -2.21658397e+00 -3.27822280e+00 394000000. 11900000. 1418481. 0. 7.11555225e+03 -1.21524036e+03

-1.21524036e+03</_> <_> 4.50604362e+01 8.55479431e+00 -1.53424656e+00 2.27247548e+00 6.04747057e-01 6.63783073e-01 5.13725471e+01 10. 1. -2.77763700e+00 -2.38976836e+00 -3.81788349e+00 390000000. 14000000. 451584. 0. 8.05226562e+03 -3.76392456e+02

-3.76392456e+02</_> <_> 4.80858459e+01 5.19770765e+00 -6.96275055e-01 2.27837682e+00 9.01062965e-01 6.14544690e-01 5.29411774e+01 7. 1. -2.13104773e+00 -2.00018454e+00 -2.76021433e+00 282000000. 3290596. 59049. 0. 3.01768750e+03 -2.49532986e+01

-2.49532986e+01</_> <_> 4.56690903e+01 7.75730324e+00 -2.47865176e+00 2.48247361e+00 4.82942224e-01 6.85396969e-01 5.13725471e+01 9. -1. -2.29748940e+00 -2.57317877e+00 -2.15736556e+00 413000000. 11900000. 1216609. 0. 7.07867920e+03 -1.04542029e+03

-1.04542029e+03</_> <_> 4.53845482e+01 9.12557125e+00 -1.69863009e+00 2.22676373e+00 5.49166262e-01 7.58843124e-01 5.05882339e+01 10. -1. -2.33688354e+00 -1.59228504e+00 -9.20651615e-01 395000000. 16000000. 553536. 0. 8.84494531e+03 -5.01450836e+02

-5.01450836e+02</_> <_> 4.79763947e+01 5.39482212e+00 -1.47572815e+00 2.16585135e+00 9.31004465e-01 7.08405316e-01 5.25490189e+01 7. -1. -2.11123657e+00 -1.72413564e+00 -6.71548009e-01 220000000. 2778889. 207936. 0. 2.83545264e+03 -2.53535522e+02

-2.53535522e+02</_> <_> 4.46388626e+01 8.34873009e+00 -2.26789832e+00 2.13327718e+00 5.57008266e-01 6.74380720e-01 5.05882339e+01 10. -1. -2.78884125e+00 -2.96453452e+00 -1.88009286e+00 374000000. 13100000. 964324. 0. 7.67944824e+03 -8.50157043e+02

-8.50157043e+02</_> <_> 4.43145828e+01 7.72489071e+00 -2.91266370e+00 2.79113221e+00 6.63022459e-01 5.73251188e-01 5.05882339e+01 9. -1. -2.24770880e+00 -1.92317641e+00 -3.33651948e+00 412000000. 12500000. 1779556. 0. 7.24649463e+03 -1.45376428e+03

-1.45376428e+03</_> <_> 4.09326477e+01 7.89834499e+00 -2.55555558e+00 2.35305548e+00 7.75860429e-01 6.34777069e-01 4.66666679e+01 9. -1. -2.43684030e+00 -1.41991365e+00 -2.45055413e+00 300000000. 11200000. 1168561. 0. 6.92100879e+03 -1.05107385e+03

-1.05107385e+03</_> <_> 4.02345848e+01 6.94808149e+00 -2.88713312e+00 2.99484706e+00 5.93048275e-01 6.12799287e-01 4.58823547e+01 9. -1. -1.88582885e+00 -3.45995235e+00 -3.07952905e+00 318000000. 9474084. 1635841. 0. 5.97780078e+03 -1.38567322e+03

-1.38567322e+03</_> <_> 3.96713142e+01 9.28323746e+00 -1.93063581e+00 2.62076020e+00 1.00898099e+00 4.37858880e-01 4.54901962e+01 11. -1. -2.22030330e+00 -1.70148194e+00 -2.12542415e+00 188000000. 10300000. 446224. 0. 7.17635986e+03 -4.57898254e+02

-4.57898254e+02</_> <_> 4.03591347e+01 6.92631578e+00 -4.64736843e+00 2.05484462e+00 6.99505150e-01 6.58441901e-01 4.54901962e+01 8. -3. -2.49705648e+00 -1.53491962e+00 -2.50191927e+00 235000000. 6927424. 3118756. 0. 5.10725391e+03 -2.73174683e+03

-2.73174683e+03</_> <_> 3.60398941e+01 9.48843956e+00 -3.98554921e+00 3.47871566e+00 1.18328166e+00 6.33660197e-01 4.43137245e+01 12. -2. -2.37841487e+00 -2.12253833e+00 -3.13346028e+00 155000000. 10800000. 1901641. 0. 7.41364502e+03 -1.92434949e+03

-1.92434949e+03</_> <_> 4.19541931e+01 9.34173679e+00 -1.98319328e+00 2.73904181e+00 1.01295269e+00 4.78967011e-01 4.86274529e+01 11. -1. -2.43634796e+00 -1.63705897e+00 -2.05273700e+00 224000000. 11100000. 501264. 0. 7.47203271e+03 -5.06472748e+02

-5.06472748e+02</_> <_> 4.26421089e+01 7.01262617e+00 -4.45454550e+00 2.05087996e+00 7.01615870e-01 7.25059748e-01 4.78431358e+01 8. -3. -2.53599858e+00 -1.40728533e+00 -2.00610423e+00 285000000. 7711729. 3111696. 0. 5.42287207e+03 -2.65912305e+03

-2.65912305e+03</_> <_> 4.16104851e+01 9.44662952e+00 -2.22191000e+00 2.70227075e+00 9.51028347e-01 6.98049247e-01 4.82352943e+01 11. -1. -2.45157075e+00 -1.63335907e+00 -1.75046408e+00 219000000. 11300000. 625681. 0. 7.56938916e+03 -6.80397461e+02

-6.80397461e+02</_> <_> 4.26433182e+01 6.69211197e+00 -4.33842230e+00 2.14478898e+00 5.83369076e-01 8.00746799e-01 4.82352943e+01 8. -3. -2.60723877e+00 -2.24195647e+00 -1.67146766e+00 281000000. 6916900. 2907025. 0. 5.00968848e+03 -2.53156128e+03

-2.53156128e+03</_> <_> 3.83017998e+01 9.40935707e+00 -3.75730991e+00 3.35619926e+00 1.23389041e+00 6.32586658e-01 4.66666679e+01 11. -3. -2.49236321e+00 -1.28912842e+00 -1.19716394e+00 172000000. 10400000. 1651225. 0. 7.24244434e+03 -1.71910425e+03

-1.71910425e+03</_> <_> 4.01055794e+01 1.07500000e+01 -2.43589744e-01 3.48651266e+00 9.05526698e-01 8.87027562e-01 4.86274529e+01 12. 1. -2.44423938e+00 -1.38041210e+00 -1.40197420e+00 352000000. 25300000. 12996. 0. 1.19665176e+04 -5.12928925e+01

-5.12928925e+01</_> <_> 3.65429344e+01 1.24109011e+01 -1.56813419e+00 4.13602638e+00 1.31390190e+00 8.30543280e-01 4.94117661e+01 15. 1. -3.11139941e+00 -1.97054172e+00 -3.09211349e+00 304000000. 35000000. 559504. 0. 1.49440898e+04 -4.63864532e+02

-4.63864532e+02</_> <_> 3.69620781e+01 1.10616741e+01 -2.08370042e+00 3.60000968e+00 8.18660557e-01 7.60852993e-01 4.74509811e+01 13. -1. -2.91357589e+00 -2.36767960e+00 -1.42432296e+00 282000000. 25200000. 894916. 0. 1.20843213e+04 -7.58104980e+02

-7.58104980e+02</_> <_> 3.49055252e+01 7.07727289e+00 -4.31136370e+00 4.43706226e+00 6.62935495e-01 9.41883028e-01 4.43137245e+01 8. -1. -2.12036657e+00 -1.39188087e+00 -3.51568460e+00 236000000. 9696996. 3598609. 0. 6.10773682e+03 -2.82302979e+03

-2.82302979e+03</_> <_> 3.79232140e+01 9.09160328e+00 -5.32442760e+00 1.16604567e+01 3.03654671e+00 2.08358145e+00 4.58823547e+01 14. -3. -6.82575285e-01 -1.61644042e+00 -1.11559236e+00 395000000. 22700000. 7784100. 0. 1.09719951e+04 -4.98501318e+03

-4.98501318e+03</_> <_> 3.96474915e+01 2.93626380e+00 -2.93846154e+00 1.28750916e+01 1.09258401e+00 1.04015732e+00 4.66666679e+01 5. -2. -5.45175016e-01 -1.88885820e+00 -9.02230382e-01 325000000. 1784896. 1787569. 0. 1.59180176e+03 -1.58591333e+03

-1.58591333e+03</_> <_> 3.73965149e+01 4.78703690e+00 -3.68055558e+00 1.54049721e+01 2.04373908e+00 1.70097780e+00 4.62745094e+01 7. -3. -5.76307118e-01 -1.08280122e+00 -4.00096655e-01 65200000. 1069156. 632025. 0. 1.78604651e+03 -1.17513489e+03

-1.17513489e+03</_> <_> 3.80710106e+01 3.87941790e+00 -5.48648643e+00 1.28049583e+01 1.63320935e+00 2.08457470e+00 4.66666679e+01 8. -3. -6.71275616e-01 -2.52299690e+00 -1.19280279e+00 335000000. 3481956. 6964321. 0. 2.78010107e+03 -4.80673096e+03

-4.80673096e+03</_> <_> 4.41263580e+01 2.26110601e+00 -4.03354502e+00 1.15165987e+01 8.94630611e-01 1.45146906e+00 5.29411774e+01 4. -1. -7.65401304e-01 -1.94370043e+00 -2.08998251e+00 2.36999987e+09 6220036. 19800000. 0. 2.30407129e+03 -6.62449707e+03

-6.62449707e+03</_> <_> 4.10063286e+01 1.25925922e+00 -3.39153433e+00 1.67458897e+01 8.10957670e-01 1.51714444e+00 4.90196075e+01 2. -3. -4.78522152e-01 -9.13414776e-01 -2.58073241e-01 60100000. 56644. 410881. 0. 1.28925369e+02 -8.90911560e+02

-8.90911560e+02</_> <_> 3.96474991e+01 3.23595500e+00 -3.02247190e+00 1.67863388e+01 1.54717922e+00 1.38188541e+00 4.86274529e+01 6. -3. -5.34956038e-01 -1.78650606e+00 -1.62617750e-02 49800000. 331776. 289444. 0. 7.82927185e+02 -6.90381348e+02

-6.90381348e+02</_> <_> 4.16213608e+01 4.02382994e+00 -4.35148954e+00 1.08395329e+01 1.52798927e+00 1.45099664e+00 4.98039207e+01 8. -3. -7.54881322e-01 -2.60222387e+00 -9.31421399e-01 2.39000013e+09 22400000. 26100000. 0. 7.04785693e+03 -7.94857910e+03

-7.94857910e+03</_> <_> 4.23840790e+01 5.20483303e+00 -3.68124270e+00 1.24462976e+01 1.77618170e+00 1.48436594e+00 4.98039207e+01 8. -1. -5.96148491e-01 -1.57369423e+00 -1.80632210e+00 1360000000. 20500000. 10200000. 0. 7.89334766e+03 -4.54384717e+03

-4.54384717e+03</_> <_> 4.13502235e+01 3.58605480e+00 -3.09267426e+00 1.12250795e+01 1.32024086e+00 1.07333446e+00 4.90196075e+01 6. -1. -6.83236480e-01 -1.82841277e+00 -1.94969440e+00 2.19000013e+09 16500000. 12300000. 0. 5.59647412e+03 -4.27824707e+03

-4.27824707e+03</_> <_> 4.01283073e+01 3.62461543e+00 -1.47487175e+00 1.09960003e+01 1.60403633e+00 1.24246836e+00 4.78431358e+01 7. 3. -7.01603293e-01 -2.10430694e+00 -3.60159826e+00 1530000000. 12500000. 2067844. 0. 5.04139062e+03 -1.12786414e+03

-1.12786414e+03</_> <_> 4.16525383e+01 -2.01825047e+00 -1.44745121e-02 1.00243206e+01 1.36403286e+00 1.41836095e+00 5.49019623e+01 2. 4. -1.32172787e+00 -2.94586039e+00 -2.83036184e+00 4.38000026e+09 10300000. 529. 0. -3.08259717e+03 4.18225220e+02

4.18225220e+02</_> <_> 4.35083160e+01 3.09920645e+00 3.29629636e+00 1.41788616e+01 1.35671926e+00 1.47179377e+00 5.56862755e+01 5. 6. -8.58881235e-01 -1.40102208e+00 -1.83701265e+00 9.74000026e+09 49400000. 55900000. 0. 8.93070020e+03 9.99491016e+03

9.99491016e+03</_> <_> 4.46242523e+01 4.37553644e+00 1.81974244e+00 1.40660410e+01 1.42726445e+00 5.72732270e-01 5.09803925e+01 5. 2. -4.51878309e-01 -4.37524736e-01 -3.14732581e-01 432000000. 4157521. 719104. 0. 3.20934546e+03 5.87788818e+02

5.87788818e+02</_> <_> 4.50096817e+01 2.44778490e+00 1.26392400e+00 8.87110424e+00 1.13340878e+00 5.56289494e-01 5.13725471e+01 4. 3. -7.17257619e-01 -1.36951053e+00 -3.12081385e+00 2.01999995e+10 59800000. 16000000. 0. 7.88781299e+03 1.36445972e+03

1.36445972e+03</_> <_> 4.41817856e+01 2.24299073e+00 -3.36448610e-01 1.68177605e+00 4.89919335e-01 4.72494394e-01 4.86274529e+01 3. -1. -2.64343643e+00 -1.54517138e+00 1.40435827e+00 22300000. 57600. 1296. 0. 1.99551346e+02 0.

0.</_> <_> 4.27392883e+01 1.94074070e+00 -8.59259248e-01 1.78339827e+00 4.51548159e-01 6.34361327e-01 4.86274529e+01 3. -1. -3.30165410e+00 -2.34583902e+00 2.21862122e-01 33300000. 68644. 13456. 0. 1.81291870e+02 -2.63395920e+01

-2.63395920e+01</_> <_> 3.28766441e+01 3.02531648e+00 -2.01265812e+00 7.66576052e+00 7.62651682e-01 1.31200564e+00 4.70588226e+01 5. -1. -1.85006797e+00 -2.58923388e+00 -7.71839857e-01 27000000. 228484. 101124. 0. 5.44796265e+02 -3.19900482e+02

-3.19900482e+02</_> <_> 4.84820328e+01 4.82370806e+00 -1.67173254e+00 2.22833538e+00 5.50697446e-01 6.10314369e-01 5.25490189e+01 6. -1. -1.82512379e+00 -2.13600349e+00 -1.10063362e+00 254000000. 2518569. 302500. 0. 2.50769531e+03 -3.30671844e+02

-3.30671844e+02</_> <_> 4.77697983e+01 2.36103892e+00 -1.72727275e+00 1.91643608e+00 5.96125126e-01 4.79078203e-01 5.45098038e+01 3. -1. -3.51694727e+00 -1.07185721e+00 -1.51806676e+00 338000000. 826281. 442225. 0. 8.11707703e+02 -3.91301910e+02

-3.91301910e+02</_> <_> 4.53427773e+01 3.03194094e+00 -2.06142497e+00 1.79671872e+00 2.91504472e-01 6.14054024e-01 5.09803925e+01 4. -1. -3.13772893e+00 -3.32090616e+00 -1.72855318e+00 341000000. 1522756. 703921. 0. 1.37438489e+03 -6.45971497e+02

-6.45971497e+02</_> <_> 4.43029938e+01 2.70895529e+00 -3.13432837e+00 2.66969323e+00 5.06052315e-01 6.81573868e-01 5.33333321e+01 4. -1. -3.38253736e+00 -2.55120802e+00 -3.13147020e+00 317000000. 1185921. 1587600. 0. 1.10490796e+03 -1.47002087e+03

-1.47002087e+03</_> <_> 4.34843788e+01 3.76076555e+00 -2.59808612e+00 2.31212759e+00 6.45330191e-01 6.34868920e-01 5.05882339e+01 5. -1. -3.07243204e+00 -1.92031062e+00 -2.51719069e+00 330000000. 2471184. 1179396. 0. 2.10533105e+03 -1.07336292e+03

-1.07336292e+03</_> <_> 4.45413666e+01 2.68780494e+00 -2.88780499e+00 2.77228069e+00 5.63176990e-01 6.34071290e-01 5.33333321e+01 4. -1. -3.17138314e+00 -2.32998705e+00 -2.97727537e+00 333000000. 1214404. 1401856. 0. 1.11419092e+03 -1.28453088e+03

-1.28453088e+03</_> <_> 4.42735291e+01 3.46000004e+00 -3.00250006e+00 2.27525353e+00 5.41664124e-01 5.07438421e-01 4.90196075e+01 5. -1. -2.08595586e+00 -2.84309030e+00 -3.94629169e+00 314000000. 1915456. 1442401. 0. 1.73509741e+03 -1.33883105e+03

-1.33883105e+03</_> <_> 4.37614288e+01 3.95591640e+00 -2.90255213e+00 2.35446692e+00 5.05566239e-01 4.86254662e-01 5.05882339e+01 5. -1. -2.89951110e+00 -2.06517649e+00 -3.91266608e+00 356000000. 2907025. 1565001. 0. 2.35894409e+03 -1.35191223e+03

-1.35191223e+03</_> <_> 4.29279785e+01 3.21875000e+00 -3.96153855e+00 2.86241508e+00 8.27841461e-01 9.74907041e-01 5.09803925e+01 5. -2. -2.81315351e+00 -2.15167999e+00 -2.01202607e+00 319000000. 1792921. 2715904. 0. 1.60995679e+03 -2.32220996e+03

-2.32220996e+03</_> <_> 4.39256630e+01 3.54046988e+00 -3.92167091e+00 2.07915449e+00 5.66982567e-01 8.54492247e-01 4.94117661e+01 5. -2. -2.63862133e+00 -2.57420611e+00 -2.24890399e+00 283000000. 1838736. 2256004. 0. 1.73197925e+03 -2.08773340e+03

-2.08773340e+03</_> <_> 4.26585655e+01 3.54694843e+00 -3.00234747e+00 2.28327155e+00 4.97790962e-01 4.02450383e-01 4.90196075e+01 4. -1. -2.78593302e+00 -9.10124242e-01 -4.97538948e+00 330000000. 2283121. 1635841. 0. 1.92812292e+03 -1.41801245e+03

-1.41801245e+03</_> <_> 4.04151649e+01 3.48000002e+00 -3.43466663e+00 1.92444324e+00 5.30659974e-01 6.89249516e-01 4.47058830e+01 5. -2. -2.22958994e+00 -2.86435771e+00 -2.08149099e+00 230000000. 1703025. 1658944. 0. 1.64242334e+03 -1.61405615e+03

-1.61405615e+03</_> <_> 3.92888641e+01 3.65789485e+00 -3.19856453e+00 2.39628029e+00 5.26973248e-01 5.87996244e-01 4.58823547e+01 5. -1. -2.75155258e+00 -2.54681849e+00 -3.73907948e+00 270000000. 2337841. 1787569. 0. 1.99900793e+03 -1.57604810e+03

-1.57604810e+03</_> <_> 3.87974510e+01 3.11330056e+00 -4.58620691e+00 3.02546453e+00 4.78060991e-01 6.92113817e-01 4.58823547e+01 4. -2. -2.34175754e+00 -1.85478318e+00 -3.73667836e+00 248000000. 1597696. 3467044. 0. 1.45041418e+03 -2.85896948e+03

-2.85896948e+03</_> <_> 4.59029922e+01 3.30526304e+00 -5.48947382e+00 1.60723209e+00 5.14498949e-01 6.62844539e-01 4.94117661e+01 4. -3. -2.18311548e+00 -1.35031736e+00 -3.75574303e+00 76100000. 394384. 1087849. 0. 7.58369751e+02 -1.78410620e+03

-1.78410620e+03</_> <_> 4.58492813e+01 4.06024075e+00 -7.92369461e+00 1.86724341e+00 6.01525486e-01 9.97084498e-01 5.01960793e+01 5. -6. -2.32792330e+00 -1.56229305e+00 -1.92931974e+00 130000000. 1022121. 3892729. 0. 1.42788086e+03 -4.09972754e+03

-4.09972754e+03</_> <_> 4.82742920e+01 3.11049724e+00 -5.17127085e+00 1.62717330e+00 4.91867870e-01 9.90815878e-01 5.21568642e+01 4. -3. -2.38608313e+00 -1.80841804e+00 -2.19139671e+00 76300000. 316969. 876096. 0. 6.45950684e+02 -1.55641846e+03

-1.55641846e+03</_> <_> 4.82978363e+01 3.87931037e+00 -8.12068939e+00 1.68812454e+00 7.50346720e-01 1.34648442e+00 5.17647057e+01 5. -5. -2.05368090e+00 -1.49356234e+00 -2.31765747e+00 126000000. 810000. 3549456. 0. 1.23715259e+03 -3.97224341e+03

-3.97224341e+03</_> <_> 4.97275963e+01 1.87248325e+00 -5.50335550e+00 1.25308919e+00 3.71620625e-01 8.71811807e-01 5.21568642e+01 2. -3. -1.93862343e+00 -3.43136966e-01 -2.87144041e+00 54900000. 77841. 672400. 0. 1.82990860e+02 -1.40914844e+03

-1.40914844e+03</_> <_> 4.81250000e+01 3.07291675e+00 -5.07291651e+00 1.79325402e+00 5.44762790e-01 9.65496302e-01 5.21568642e+01 4. -3. -2.24835062e+00 -1.70181108e+00 -2.14699602e+00 85400000. 348100. 948676. 0. 6.71767029e+02 -1.60020190e+03

-1.60020190e+03</_> <_> 4.82836876e+01 3.80851054e+00 -7.98723412e+00 1.66209245e+00 6.26992047e-01 1.24620569e+00 5.21568642e+01 5. -5. -2.33030105e+00 -1.90032601e+00 -2.39706349e+00 129000000. 801025. 3523129. 0. 1.20914551e+03 -3.92333032e+03

-3.92333032e+03</_> <_> 4.97216492e+01 1.41258740e+00 -5.72027969e+00 1.34882069e+00 5.46171308e-01 9.63716567e-01 5.21568642e+01 3. -3. -1.80543900e+00 -2.90643716e+00 -2.82269692e+00 50600000. 40804. 669124. 0. 8.64734955e+01 -1.43852991e+03

-1.43852991e+03</_> <_> 4.48535004e+01 3.66539931e+00 -1.49429655e+00 2.68247509e+00 5.99604249e-01 7.93848634e-01 5.21568642e+01 5. -1. -2.72262120e+00 -2.22580290e+00 -6.22658491e-01 139000000. 929296. 154449. 0. 1.26498779e+03 -2.27093781e+02

-2.27093781e+02</_> <_> 4.28908653e+01 3.11184216e+00 -2.91776323e+00 2.72577214e+00 4.66641724e-01 4.83082473e-01 4.94117661e+01 4. -1. -2.39231277e+00 -1.90329719e+00 -3.96984625e+00 170000000. 894916. 786769. 0. 1.08452832e+03 -9.62534485e+02

-9.62534485e+02</_> <_> 4.25146065e+01 4.87755108e+00 -2.98367357e+00 2.58254981e+00 6.33508325e-01 6.25755668e-01 4.86274529e+01 6. -1. -2.36698127e+00 -1.77179837e+00 -3.17004466e+00 108000000. 1428025. 534361. 0. 1.90380127e+03 -8.16389832e+02

-8.16389832e+02</_> <_> 3.68095894e+01 7.33248091e+00 -3.41687989e+00 4.80635166e+00 5.55782199e-01 7.91658223e-01 4.90196075e+01 9. -1. -2.54039240e+00 -3.00031066e+00 -3.05293345e+00 207000000. 8219689. 1784896. 0. 5.72019775e+03 -1.68104846e+03

-1.68104846e+03</_> <_> 3.60187340e+01 6.99737549e+00 -3.73228335e+00 4.65609169e+00 5.44592559e-01 8.85421336e-01 4.90196075e+01 8. -1. -2.79222894e+00 -1.84105468e+00 -3.08585691e+00 188000000. 7107556. 2022084. 0. 5.19492285e+03 -1.91476990e+03 -1.91476990e+03</_> </support_vectors> -<decision_functions> -<_> <sv_count>78</sv_count> <rho>2.6666666666666666e-01</rho> <alpha> 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333334922790527e-01 -7.3333328962326050e-01 -7.3333328962326050e-01 -7.3333328962326050e-01</alpha> <index> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77</index> </_> </decision_functions> </my_svm> </opencv_storage>

</opencv_storage>

Can anyone kindly give some insights about the reason of this. I use opencv 2.4.13 for Android.