svm

How to extract info from scikits.learn classifier to then use in C code

断了今生、忘了曾经 提交于 2019-12-21 01:12:41
问题 I have trained a bunch of RBF SVMs using scikits.learn in Python and then Pickled the results. These are for image processing tasks and one thing I want to do for testing is run each classifier on every pixel of some test images. That is, extract the feature vector from a window centered on pixel (i,j), run each classifier on that feature vector, and then move on to the next pixel and repeat. This is far too slow to do with Python. Clarification: When I say "this is far too slow..." I mean

OpenCV templates in 2D point data set

[亡魂溺海] 提交于 2019-12-20 20:22:09
问题 I was wandering what the best approach would be for detecting 'figures' in an array of 2D points. In this example I have two 'templates'. Figure 1 is a template and figure 2 is a template. Each of these templates exists only as a vector of points with an x,y coordinate. Let's say we have a third vector with points with x,y coordinate What would be the best way to find out and isolate points matching one of the first two arrays in the third one. (including scaling, rotation)? I have been

Custom kernels for SVM, when to apply them?

狂风中的少年 提交于 2019-12-20 14:22:46
问题 I am new to machine learning field and right now trying to get a grasp of how the most common learning algorithms work and understand when to apply each one of them. At the moment I am learning on how Support Vector Machines work and have a question on custom kernel functions. There is plenty of information on the web on more standard (linear, RBF, polynomial) kernels for SVMs. I, however, would like to understand when it is reasonable to go for a custom kernel function. My questions are: 1)

How to find the Precision, Recall, Accuracy using SVM?

霸气de小男生 提交于 2019-12-20 14:22:32
问题 Duplicate calculating Precision, Recall and F Score I have a input file with text description and classified level (i.e.levelA and levelB). I want to write a SVM classifier that measure precision, recall and accuracy. I looked at scikit and LIBSVM but I want to know more step by step. Any sample code or basic tutorial would be really nice. Thanks for any suggestion in advance. 回答1: These performance measures are easy to obtain from the predicted labels and true labels, as a post-processing

What is the difference between OneVsRestClassifier with SVC and SVC with decision_function_shape='ovr'?

拈花ヽ惹草 提交于 2019-12-20 11:52:28
问题 I thought it should be the same, but for method decision_function() I get different results. And SVC with only decision_function_shape='ovr' is really faster. Related: Scikit learn multi-class classification for support vector machines 回答1: I got some clarification on the documentation of LinearSVC in the See also heading, where SVC is mentioned. SVC Implementation of Support Vector Machine classifier using libsvm: .... .... Furthermore SVC multi-class mode is implemented using one vs one

What is the difference between OneVsRestClassifier with SVC and SVC with decision_function_shape='ovr'?

ぃ、小莉子 提交于 2019-12-20 11:52:14
问题 I thought it should be the same, but for method decision_function() I get different results. And SVC with only decision_function_shape='ovr' is really faster. Related: Scikit learn multi-class classification for support vector machines 回答1: I got some clarification on the documentation of LinearSVC in the See also heading, where SVC is mentioned. SVC Implementation of Support Vector Machine classifier using libsvm: .... .... Furthermore SVC multi-class mode is implemented using one vs one

Support Vector Machine kernel types

白昼怎懂夜的黑 提交于 2019-12-20 11:08:53
问题 Popular kernel functions used in Support Vector Machines are Linear, Radial Basis Function and Polynomial. Can someone please expalin what this kernel function is in simple way :) As I am new to this area I don't clear understand what is the importance of these kernel types. 回答1: Let us start from the beggining. Support vector machine is a linear model and it always looks for a hyperplane to separate one class from another. I will focus on two-dimensional case because it is easier to

R understanding {caret} train(tuneLength = ) and SVM methods from {kernlab}

只谈情不闲聊 提交于 2019-12-20 10:34:49
问题 Trying to better understand how train(tuneLength = ) works in {caret} . My confusion happened when trying to understand some of the differences between the SVM methods from {kernlab} I've reviewed the documentation (here) and the caret training page (here). My toy example was creating five models using the iris dataset. Results are here, and reproducible code is here (they're rather long so I didn't copy and paste them into the post). From the {caret} documentation: tuneLength an integer

facial expression classification in real time using SVM

孤街醉人 提交于 2019-12-20 09:37:57
问题 I am currently working on a project where I have to extract the facial expression of a user (only one user at a time from a webcam) like sad or happy. My method for classifying facial expressions is: Use opencv to detect the face in the image Use ASM and stasm to get the facial feature point and now i'm trying to do facial expression classification is SVM a good option ? and if it is how can i start with SVM : how i'm going to train svm for every emotions using this landmarks ? 回答1: Yes, SVMs

Example for svm feature selection in R

天涯浪子 提交于 2019-12-20 09:24:26
问题 I'm trying to apply feature selection (e.g. recursive feature selection) in SVM, using the R package. I've installed Weka which supports feature selection in LibSVM but I haven't found any example for the syntax of SVM or anything similar. A short example would be of a great help. 回答1: The function rfe in the caret package performs recursive feature selection for various algorithms. Here's an example from the caret documentation: library(caret) data(BloodBrain, package="caret") x <- scale