svm

scikit learn sample try out with my classifier and data

荒凉一梦 提交于 2019-12-08 03:14:53
问题 I have build a small program that creates a classifier for a given dataset with scikit-learn. Now I wanted to try this example, to see the classifier at work. For example the clf has to detect "cats". This is how I go on: I have 50 pictures of Cats and 50 pictures of "none cats". get descriptors for data_set with sift-feature detector Split data into training set and test set (25 pictures cats + 25 pictures non cats = training_set, test_set same) get cluster centers with kmeans from the

Weird SVM prediction performance in scikit-learn (SVMLIB)

蓝咒 提交于 2019-12-08 02:10:02
问题 I am using SVC from scikit-learn on a large dataset of 10000x1000 (10000 objects with 1000 features). I already saw in other sources that SVMLIB doesn't scale well beyond ~10000 objects and I indeed observe this: training time for 10000 objects: 18.9s training time for 12000 objects: 44.2s training time for 14000 objects: 92.7s You can imagine what happens when I trying to 80000. However, what I found very surprising is the fact that the SVM's predict() takes even more time than the training

SVM in OpenCV: Visual Studio 2008 reported error wrongly (or is it right?)

狂风中的少年 提交于 2019-12-08 01:28:31
问题 I'm using MS Visual Studio 2008, OpenCV, C++ and SVM for a OCR-related project. At least I can run the code until yesterday, when I open the project to continue working, VS reported this error: error C2664: 'bool CvSVM::train(const CvMat *,const CvMat *,const CvMat *,const CvMat *,CvSVMParams)' : cannot convert parameter 1 from 'cv::Mat' to 'const CvMat *' It didn't happen before and I haven't changed any code relating to it (I only changed the parameters for the kernel). The code got error

What's the difference between ANN, SVM and KNN classifiers?

一世执手 提交于 2019-12-08 01:04:32
问题 I know this is a very general question without specifics about my actual project, but my question is: I am doing remote sensing image classification. I am using the object-oriented method: first I segmented the image to different regions, then I extract the features from regions such as color, shape and texture. The number of all features in a region may be 30 and commonly there are 2000 regions in all, and I will choose 5 classes with 15 samples for every class. In summary: Sample data 1530

OpenCV SVM always predicts higher class label

无人久伴 提交于 2019-12-07 23:39:55
问题 I'm using the OpenCV SVM implementation to binarily predict the importance of an image feature. I'm therefore training it upon positive and negative image features and looking for a classification in {0,1}. The problem I'm encountering is that following training, the SVM always predicts the class with the higher/greater class label. I can change the labels for the training data set and this problem persists. I've carefully inspected the generated label and training cv::Mat matrices and haven

SVM for Text Mining using scikit

狂风中的少年 提交于 2019-12-07 23:31:22
问题 Can someone share a code snippet that shows how to use SVM for text mining using scikit. I have seen an example of SVM on numerical data but not quite sure how to deal with text. I looked at http://scikit-learn.org/stable/auto_examples/document_classification_20newsgroups.html but couldn't find SVM. 回答1: In text mining problems, text is represented by numeric values. Each feature represent a word and values are binary numbers. That gives a matrix with lots of zeros and a few 1s which means

OpenCV3中的机器学习算法

一世执手 提交于 2019-12-07 13:55:10
OpenCV3中加入了几种机器学习算法,可以将机器学习算法与图像和视频处理结合起来。可参考: OpenCV/OpenCV3计算机视觉软件支持库和最新资源 OpenCV3的最新特征 OpenCV3的人脸检测-使用Python OpenCV3的机器学习算法kNN-使用Python OpenCV3的kNN算法进行OCR识别-使用Python OpenCV3的机器学习算法SVM-使用Python OpenCV3的机器学习算法-K-means-使用Python 来源: oschina 链接: https://my.oschina.net/u/2306127/blog/626538

Verbose log abbriviations meaning in SVC, scikit-learn

非 Y 不嫁゛ 提交于 2019-12-07 13:23:50
问题 I am looking for the meaning of verbose log abbriviations of SVC function in scikit-learn? If nSV is the number of support vectors, #iter is the number of iteration, what dose nBSV, rho,obj mean? This is an example: import numpy as np from sklearn.svm import SVR sets=np.loadtxt('data\Exp Rot.txt') # reading data model=SVR(kernel='rbf',C=100,gamma=1,max_iter=100000,verbose=True) model.fit(sets[:,:2],sets[:,2]) print(model.score) and here is the result 回答1: scikit-learn is using libsvm's

关于SVM的那点破事

送分小仙女□ 提交于 2019-12-07 11:45:36
SVM的实现工具箱有很多,但我还是认为libsvm最好用(lssvm也不错的说),我认为把这一个SVM的实现工具箱研究的透彻就够了,反正我是够用了,即如果现在需要SVM这个工具来进行分类或者回归我可以拿来libsvm-mat-2.89-3[FarutoUltimate3.0]就能熟练使用以达到解决自己的问题的目的,而不用再重新学习掌握SVM这个工具。 其实还有一些话要说,姑且先留着吧 … … ==================== MATLAB技术论坛电子 期刊 第九期(2011.06)[faruto帖子集锦] http://www.matlabsky.com/thread-17223-1-1.html ==================== 《Learn SVM Step by Step 》系列 视频 应用篇 Libsvm的下载、安装和使用 http://www.matlabsky.com/thread-18080-1-1.html Libsvm参数实例详解 http://www.matlabsky.com/thread-18457-1-1.html 一个实例搞定libsvm分类 http://www.matlabsky.com/thread-18521-1-1.html 一个实例搞定libsvm回归 http://www.matlabsky.com/thread-18552

Regarding Probability Estimates predicted by LIBSVM

自古美人都是妖i 提交于 2019-12-07 08:42:35
问题 I am attempting 3 class classification by using SVM classifier. How do we interpret the probabililty estimates predicted by LIBSVM. Is it based on perpendicular distance of the instance from the maximal margin hyperplane?. Kindly through some light on the interpretation of probability estimates predicted by LIBSVM classifier. Parameters C and gamma are first tuned and then probability estimates are outputted by using -b option with both training and testing. 回答1: Multiclass SVM is always