svm

Which machine learning library to use [closed]

早过忘川 提交于 2019-12-18 09:56:15
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I am looking for a library that, ideally, has the following features: implements hierarchical clustering of multidimensional data (ideally on similiarity or distance matrix) implements support vector machines is in C++ is somewhat documented (this one seems to be hardest) I would like this to be in C++, as I am

Non-Integer Class Labels Scikit-Learn

无人久伴 提交于 2019-12-18 04:30:21
问题 Quick SVM question for scikit-learn. When you train an SVM, it's something like from sklearn import svm s = svm.SVC() s.fit(training_data, labels) Is there any way for labels to be a list of a non-numeric type? For instance, if I want to classify vectors as 'cat' or 'dog,' without having to have some kind of external lookup table that encodes 'cat' and 'dog' into 1's and 2's. When I try to just pass a list of strings, I get ... ValueError: invalid literal for float(): cat So, it doesn't look

Choosing from different cost function and activation function of a neural network

戏子无情 提交于 2019-12-17 23:02:51
问题 Recently I started toying with neural networks. I was trying to implement an AND gate with Tensorflow. I am having trouble understanding when to use different cost and activation functions. This is a basic neural network with only input and output layers, no hidden layers. First I tried to implement it in this way. As you can see this is a poor implementation, but I think it gets the job done, at least in some way. So, I tried only the real outputs, no one hot true outputs. For activation

One-class classification with SVM in R

北战南征 提交于 2019-12-17 18:42:10
问题 I'm using the package e1071 in R in order to build a one-class SVM model. I don't know how to do that and I neither find any example on the Internet. Could someone give an example code to characterize, for example, the class "setosa" in the "iris" dataset with a one-class classification model and then test all the examples in the same dataset (in order to check what examples belong to the characterization of the "setosa" class and what examples not)? 回答1: I think this is what you want:

What are advantages of Artificial Neural Networks over Support Vector Machines? [closed]

左心房为你撑大大i 提交于 2019-12-17 17:23:20
问题 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 . ANN (Artificial Neural Networks) and SVM (Support Vector Machines) are two popular strategies for supervised machine learning and

Training custom SVM to use with HOGDescriptor in OpenCV

て烟熏妆下的殇ゞ 提交于 2019-12-17 07:27:07
问题 I'm trying to train my own detector for use with OpenCV::HOGDescriptor but I'm having trouble making the existing HOGDescriptor work with my newly trained SVM. I have calculated HOG features for positive and negative training images, labeled them and trained the SVM using CvSVM. The parameters I have used are: CvSVMParams params; params.svm_type =CvSVM::EPS_SVR; params.kernel_type = CvSVM::LINEAR; params.C = 0.01; params.p = 0.5; Then I calculate Primal Form of the support vectors so that I

Training custom SVM to use with HOGDescriptor in OpenCV

百般思念 提交于 2019-12-17 07:27:06
问题 I'm trying to train my own detector for use with OpenCV::HOGDescriptor but I'm having trouble making the existing HOGDescriptor work with my newly trained SVM. I have calculated HOG features for positive and negative training images, labeled them and trained the SVM using CvSVM. The parameters I have used are: CvSVMParams params; params.svm_type =CvSVM::EPS_SVR; params.kernel_type = CvSVM::LINEAR; params.C = 0.01; params.p = 0.5; Then I calculate Primal Form of the support vectors so that I

How do I do use non-integer string labels with SVM from scikit-learn? Python

风流意气都作罢 提交于 2019-12-14 03:42:16
问题 Scikit-learn has fairly user-friendly python modules for machine learning. I am trying to train an SVM tagger for Natural Language Processing (NLP) where my labels and input data are words and annotation. E.g. Part-Of-Speech tagging, rather than using double/integer data as input tuples [[1,2], [2,0]] , my tuples will look like this [['word','NOUN'], ['young', 'adjective']] Can anyone give an example of how i can use the SVM with string tuples? the tutorial/documentation given here are for

One-class Support Vector Machine Sensitivity Drops when the number of training sample increase

被刻印的时光 ゝ 提交于 2019-12-14 03:37:57
问题 I am using One-Class SVM for outlier detections. It appears that as the number of training samples increases, the sensitivity TP/(TP+FN) of One-Class SVM detection result drops, and classification rate and specificity both increase. What's the best way of explaining this relationship in terms of hyperplane and support vectors? Thanks 回答1: The more training examples you have, the less your classifier is able to detect true positive correctly. It means that the new data does not fit correctly

Distance between a point and the hyperplane in SVM, MATLAB

孤者浪人 提交于 2019-12-14 02:35:20
问题 I'm using LIBSVM for MATLAB. Now I'm trying to compute the the distance between a point and the hyperplane. According to the official solution (http://www.csie.ntu.edu.tw/~cjlin/libsvm/faq.html#f4151): "The distance is |decision_value| / |w| We have |w|^2 = w^Tw = alpha^T Q alpha = 2*(dual_obj + sum alpha_i). Thus in svm.cpp please find theplace where we calculate the dual objective value (i.e., the subroutine Solve() ) and add a statement to print w^Tw ." But I'm a little confused: there are