svm

SVM parameter optimization in Opencv

╄→尐↘猪︶ㄣ 提交于 2019-12-18 16:11:25
问题 I want to optimize SVM parameters in Opencv. But, every time I use train_auto I get C=1 and gamma=1 . Some people use LibSVM but I could not write a wrapper for that. Both trainingData and labels are taken from an existing code which gives good results so I am trying to get the same parameters for that code with train_auto . In the original code C=312.5 and gamma=0.50625 . I saw that somebody used CvStatModel for python, is it necessary for C++? Where do I make a mistake? Thanks in advance.

PCL行人检测

混江龙づ霸主 提交于 2019-12-18 13:47:56
首先我们知道 Hog特征结合 SVM分类器已经被广泛应用于图像识别中,尤其在行人检测中获得了极大的成功 ,HOG+SVM进行行人检测的方法是法国研究人员 Dalal在 2005的 CVPR上提出的,而如今虽然有很多行人检测算法不断提出,但基本都是以 HOG+SVM的思路为主,那么PCL中也是利用这一思想来进行行人的检测, 总体思路: 1、提取正负样本hog特征 2、投入svm分类器训练,得到model 3、由model生成检测子 4、利用检测子检测负样本,得到hardexample 5、提取hardexample的hog特征并结合第一步中的特征一起投入训练,得到最终检测子。 首先整合一下理论知识 HOG特征: 方向梯度直方图( Histogram of Oriented Gradient, HOG)特征是一种在计算机视觉和图像处理中用来进行物体检测的特征描述子。它通过计算和统计图像局部区域的梯度方向直方图来构成特征。 具体的是实现方法: 首先将图像分成小的连通区域,我们把它叫细胞单元。然后采集细胞单元中各像素点的梯度的或边缘的方向直方图。最后把这些直方图组合起来就可以构成特征描述器。 提高性能: 把这些局部直方图在图像的更大的范围内(我们把它叫区间或 block)进行对比度归一化( contrast-normalized),所采用的方法是:先计算各直方图在这个区间( block

The dimension of dual_coef_ in sklearn. SVC

坚强是说给别人听的谎言 提交于 2019-12-18 13:38:50
问题 In SVC() for multi-classification, the one-vs-one classifiers are trained. So there are supposed to be n_class * (n_class - 1)/2 classifiers in total. But why clf.dual_coef_ returns me only (n_class - 1) * n_SV ? What does each row represent then? 回答1: The dual coefficients of a sklearn.svm.SVC in the multiclass setting are tricky to interpret. There is an explanation in the scikit-learn documentation. The sklearn.svm.SVC uses libsvm for the calculations and adopts the same data structure for

How to use libsvm in Matlab?

帅比萌擦擦* 提交于 2019-12-18 13:16:42
问题 I am new to matlab and don't know how to use libsvm. Is there any sample code for classifying some data (with 2 features) with a SVM and then visualize the result? How about with kernel (RBF, Polynomial, and Sigmoid )? I saw that readme file in libsvm package, but I could not make a head or tail of it would you please give an example of classification of 2 classes using Support Vector Machines (SVM) in matlab something like: Attribute_1 Attribute_2 Class 170 66 -1 160 50 -1 170 63 -1 173 61

scikit-learn SVM.SVC() is extremely slow

落花浮王杯 提交于 2019-12-18 12:47:43
问题 I tried to use SVM classifier to train a data with about 100k samples, but I found it to be extremely slow and even after two hours there was no response. When the dataset has around 1k samples, I can get the result immediately. I also tried SGDClassifier and naïve bayes which is quite fast and I got results within couple of minutes. Could you explain this phenomena? 回答1: General remarks about SVM-learning SVM-training with nonlinear-kernels, which is default in sklearn's SVC, is complexity

Scaling of target causes Scikit-learn SVM regression to break down

无人久伴 提交于 2019-12-18 12:30:04
问题 When training a SVM regression it is usually advisable to scale the input features before training. But how about scaling of the targets? Usually this is not considered necessary, and I do not see a good reason why it should be necessary. However in the scikit-learn example for SVM regression from: http://scikit-learn.org/stable/auto_examples/svm/plot_svm_regression.html By just introducing the line y=y/1000 before training, the prediction will break down to a constant value. Scaling the

Know any good c++ support vector machine (SVM) libraries? [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-18 11:05:40
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Do you know of any good c++ svm libraries out there I tried libsvm http://www.csie.ntu.edu.tw/~cjlin/libsvm/ but so far I'm not

Know any good c++ support vector machine (SVM) libraries? [closed]

给你一囗甜甜゛ 提交于 2019-12-18 11:04:56
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Do you know of any good c++ svm libraries out there I tried libsvm http://www.csie.ntu.edu.tw/~cjlin/libsvm/ but so far I'm not

Prepare data for text classification using Scikit Learn SVM

拟墨画扇 提交于 2019-12-18 10:12:45
问题 I'm trying to apply SVM from Scikit learn to classify the tweets I collected. So, there will be two categories, name them A and B. For now, I have all the tweets categorized in two text file, 'A.txt' and 'B.txt'. However, I'm not sure what type of data inputs the Scikit Learn SVM is asking for. I have a dictionary with labels (A and B) as its keys and a dictionary of features (unigrams) and their frequencies as values. Sorry, I'm really new to machine learning and not sure what I should do to

Why feature scaling?

被刻印的时光 ゝ 提交于 2019-12-18 09:59:27
问题 I found that scaling in SVM (Support Vector Machine) problems really improve its performance... I have read this explanation: "The main advantage of scaling is to avoid attributes in greater numeric ranges dominating those in smaller numeric ranges." Unfortunately this didn't help me ... Can somebody provide me a better explanation? Thank you in advance! 回答1: The true reason behind scaling features in SVM is the fact, that this classifier is not affine transformation invariant . In other