svm

“Something is wrong; all the Accuracy metric values are missing:”

China☆狼群 提交于 2019-12-12 03:51:41
问题 I took the following code out of a textbook, "Machine Learning With R" by Brett Lantz, however copied exactly the same to the console from the textbook, > library(caret) Loading required package: lattice Loading required package: ggplot2 > library(kernlab) Attaching package: ‘kernlab’ The following object is masked from ‘package:ggplot2’: alpha > set.seed(300) > ctrl <- trainControl(method = "cv", number = 10) > bagctrl <- bagControl(fit = svmBag$fit, predict = svmBag$pred, aggregate = svmBag

How to create source data file for training and testing file in libsvm?

自作多情 提交于 2019-12-12 03:35:03
问题 I want to use a dataset to train a model. The dataset has three different types of physiological data. type 1, type 2 and type 3. The format of the libSVM is as below: label index1:value1 index2:value2.... Now, I have taken label as 1 for type 1, 2 for type 2 and 3 for type 3. Where as all the values are save as 1:(value). So, my training and testing file is as below. 1 1:value \n 1 1:value \n 1 1:value \n 1 1:value \n 1 1:value \n . . . 1 1:value \n 2 1:value \n 2 1:value \n 2 1:value \n 2 1

WEKA - filtering out classes in a MultiClassClassifer

人盡茶涼 提交于 2019-12-12 03:29:59
问题 I have trained a MultiClassClassifier (tested, working) and saved it somewhere on my hard drive. Now I want to make predictions for a new sample I got. I load my application and my classifier auto loads with it. I have narrowed down the search to five 5 possible classes already for the sample, outside the classification process. This means, I know k classes, that can easily be avoided in the classification. Is it possible to filter a MultiClassClassifier (filter out all unwanted classes)

error loading svm learning configuration file in gate tool

核能气质少年 提交于 2019-12-12 03:24:08
问题 I am new to machine learning. When I tried learning through gate, it is showing some error. The learning configuration file is given below. <?xml version="1.0"?> <ML-CONFIG> <SURROUND value="false"/> <FILTERING ratio='0.2' dis='far'/> <EVALUATION method="holdout" runs="2" ratio="0.66"/> <multiClassification2Binary method="one-vs-anothers" thread-pool-size="2"/> <PARAMETER name="thresholdProbabilityBoundary" value="1.0"/> <PARAMETER name="thresholdProbabilityEntity" value="1.0"/> <PARAMETER

opencv 3 (C++) auto trained SVM loading issue

纵饮孤独 提交于 2019-12-12 03:17:53
问题 I'm using SVM to do classification, and I do the training in one project, testing in another, in order to train only once. The TRAINing part is as follows: classifier->trainAuto(trainData); string svmDir = "/File/Dir/"; string svmFile = "svmClassifier.xml"; classifier->save(svmDir+svmFile); And the TESTing part is: string svmDir = "/File/Dir/"; string svmFile = "svmClassifier.xml"; Ptr<ml::SVM> classifier = ml::SVM::load<ml::SVM>(svmDir+svmFile); ... float response = classifier->predict

Libsvm model file format No model number

痴心易碎 提交于 2019-12-12 01:51:22
问题 I am using libsvm for document classification. I use svm.cc and svm.h in my project. I then call svm_train. I save the model in a file using svm_save_model. I have there categories. The svm model file is: svm_type c_svc kernel_type rbf gamma 0.001002 nr_class 3 total_sv 9 rho -0.000766337 0.00314423 0.00387654 label 0 1 2 nr_sv 3 3 3 SV 1 1 1:0.001 2:0.001 3:0.012521912 5:0.001 15:0.012521912 17:0.012521912 23:0.001 1 1 1:0.001 2:0.014176543 4:0.093235799 6:0.001 7:0.0058630699 9:0.040529628

Libsvm save model file in binary format

妖精的绣舞 提交于 2019-12-12 00:28:23
问题 I am training a huge data file for libsvm and the resulting training file is too large. Is there any way to save the libsvm libraries model file in binary format? 回答1: If you are using Matlab: Download svm_savemodel.c and svm_model_matlab.c (this is already included in libsvm, you can try to use the original one, but if it doesn't work, try this link) to your libsvm dir. Compile the Mex file ( mex svm_savemodel.c ), then it should work: %save model model fid = fopen('model.bin','w'); model =

Use the osusvm to recognize faces after the C2 layer in HMAX model

余生长醉 提交于 2019-12-11 19:39:27
问题 I achieved the computation of the original HMAX model, and I get the results at C2 layer. Now I still have the tuned-layer, in other words, to use the osusvm. In my project, I have two directories. One containing the training images and other containing the test images. Reference: lennon310's response in Training images and test images Firstly , I would like to show you my results at C2 layer (surely that the results should be a vectors). Notice that I extracted only 2 prototypes in the S2

Recommended values for OpenCV SVM parameters

允我心安 提交于 2019-12-11 19:25:11
问题 Any idea on the recommended parameters for OpenCV SVM? I'm playing with the letter_recog.cpp in the OpenCV sample directory, however, the SVM accuracy is very poor! In one run I only got 62% accuracy: $ ./letter_recog_modified -data /home/cobalt/opencv/samples/data/letter-recognition.data -save svm_letter_recog.xml -svm The database /home/cobalt/opencv/samples/data/letter-recognition.data is loaded. Training the classifier ... data.size() = [16 x 20000] responses.size() = [1 x 20000]

Increasing the number of iterations with multisvm

一曲冷凌霜 提交于 2019-12-11 18:18:44
问题 I'm attempting to use the multisvm function in matlab. On a small data set, everything works great. Increase the size where I need it, and I get the following error: Error using seqminopt>seqminoptImpl (line 198) No convergence achieved within maximum number of iterations. Error in seqminopt (line 81) [alphas offset] = seqminoptImpl(data, targetLabels, ... Error in svmtrain (line 499) [alpha, bias] = seqminopt(training, groupIndex, ... Error in multisvm (line 20) models(k) = svmtrain