2017-05-02 00:42:57 -0600 | commented question | What should be default value of features for classification stored in csv file using svm classifciation Someone please help in this question |
2017-05-01 07:43:24 -0600 | commented question | What should be default value of features for classification stored in csv file using svm classifciation Let me explain it again.There are 100 items that need to be classified using svm classification.Each items have some feature value corresponding to them.Now 75 items have 26 features and their corresponding value.Remaining 25 items have only 20 features and their corresponding value.These 100 items with their features are saved in csv file.What should be the default value of remaining 6 features of 25 items.There are 26 columns in csv file and 100 rows.75 items have all the 26 columns filled with values.25 items have 20 columns filled with values.What should be the default value of 6 columns of 25 items which have only 20 features.Should I write default value as 0.000000 or -1.000000 for features that are not part of 25 items. |
2017-05-01 07:13:17 -0600 | received badge | ● Editor (source) |
2017-05-01 03:04:56 -0600 | asked a question | What should be default value of features for classification stored in csv file using svm classifciation Hi, I am writing code in cpp. My task is to classify part of document image belongs to table or not.I have dataset consisting of 80 items.20 items have 20 features each.The value of each feature is stored in csv file.60 items have 26 features and their value is also stored in same csv file.Now 20 items have 20 features corresponding to them,and 60 items have 26 features.What should be the default value of 6 features of 20 items who have 20 . |
2017-04-22 12:01:41 -0600 | commented answer | how to find optimal SVM parameters gamma and cost using grid search with 5-fold cross validation process? The code is working.But it is not giving right answer |
2017-04-22 06:17:56 -0600 | commented question | how to find optimal SVM parameters gamma and cost using grid search with 5-fold cross validation process? Is the way i am using trainAuto function correct? I have dataset of 100 images.I need to detect tables from these images.I have divided dataset into two parts one for training and one for testing. For each document image , a component is extracted and features are determined for that component.26 Features are there for each component and i have saved these features in csv file. I just want to know how to optimize parameters gamma and cost using grid search with 5-fold cross-validation process?Or what value should i take for c and gamma to get correct results. |
2017-04-22 05:42:01 -0600 | asked a question | how to find optimal SVM parameters gamma and cost using grid search with 5-fold cross validation process? I'm using libsvm to classify my dataset but I'm not reaching good results with SVM. I think that it is because the parameters: Gamma and Cost were defined wrongly. I'm training the SVM with C-SVC and RBF Kernel.Please tell how to obtain optimal parameters using a grid-search with 5-fold cross-validation process. My complete code is given below |
2017-04-01 03:52:31 -0600 | commented question | Error while converting csv file into matrices form using CvMLData That problem is removed.Now the error is coming in this line float res = svm->predict(data1); OpenCV Error: Assertion failed (nsamples == 1) in predict, file /home/vidushi/Desktop/OpenCV/modules/ml/src/svm.cpp, line 1939 terminate called after throwing an instance of 'cv::Exception' This is the error generated |
2017-04-01 01:26:35 -0600 | commented question | Error while converting csv file into matrices form using CvMLData No image number is not my class label |
2017-04-01 00:54:53 -0600 | commented answer | Error while converting csv file into matrices form using CvMLData I wrote the following code int main(int,char **){ Ptr<ml::traindata> tdata = ml::TrainData::loadFromCSV("/home/vidushi/Desktop/new/training.csv",0,-2,0); Mat data = tdata->getTrainSamples(); int labels[11] = {1,1,1,1,1,1,1,1,1,1,1}; Mat labelsMat(11, 1, CV_32SC1, labels); Ptr<svm> svm = SVM::create(); svm->setType(SVM::C_SVC); svm->setKernel(SVM::LINEAR); svm->setTermCriteria(TermCriteria(TermCriteria::MAX_ITER, 100, 1e-6)); svm->train(data, ROW_SAMPLE, labelsMat); Ptr<ml::traindata> tdata1 = ml::TrainData::loadFromCSV("/home/vidushi/Desktop/new/testing.csv",0,-2,0); Mat data1 = tdata1->getTrainSamples(); float res = svm->predict(data1); cout<<"result = "<<res<<"\n"; return="" 0;}error="" generated="" is="" :="" opencv="" error:="" assertion="" failed="" (nvars="=" (int)rowvals.size())="" in="" loadcsv,<="" p=""> |
2017-03-31 03:43:29 -0600 | commented question | Error while converting csv file into matrices form using CvMLData It is comma seperated csv file and contains 10 decimal values in one row of csv file.The first column contains image number.Remaining 9 column contains features of the image in decimal form.Features could be like number of pixels in image,number of horizontal line in image. I tried using TrainData also but than also error was generated.I would be highly obliged if you could tell me how to use TrainData. |
2017-03-31 03:18:50 -0600 | asked a question | Error while converting csv file into matrices form using CvMLData I need to convert csv file into matrices.I wrote the following code. Please tell how to resolve this error. I am using opencv 3.2.0, ubuntu 16.04 LTS. |
2017-03-20 00:14:15 -0600 | received badge | ● Enthusiast |
2017-03-18 09:38:57 -0600 | commented answer | Convexity Defects in OpenCV 2.4.2 I need to find number of convex deficient region in image..following error is coming error: no match for call to ‘(std::vector<std::vector<cv::vec<int, 4=""> > >) (std::vector<cv::point_<int> >&, std::vector<int>&, std::vector<std::vector<cv::vec<int, 4=""> > >&)’ convexityDefects(contours[i], hullIndices, convexityDefects); Please suggest how to resolve this error. |
2017-03-15 04:39:07 -0600 | commented question | Find number of open horizontal line in image I need to find open horizontal lines in an image. |
2017-03-15 01:31:41 -0600 | asked a question | Find number of open horizontal line in image I have an image consisting of text,tables and images. I need to extract tables from an image.Now tables are normally composed of both horizontal and vertical line sides.Whereas graphic objects , boundary of images tend to have 'open' lines that do not intersect other lines at one of its end. I want to find number of such horizontal and vertical lines.Is there an inbuilt method available in opencv. |