svm Questions
3
Solved
When passing x,y in fit, I am getting the following error:
Traceback (most recent call last):
File "C:/Classify/classifier.py", line 95, in
train_avg, test_avg, cms = train_model(X, y, "cep...
Calycine asked 24/11, 2016 at 7:12
3
Solved
I am currently performing multi class SVM with linear kernel using python's scikit library.
The sample training data and testing data are as given below:
Model data:
x = [[20,32,45,33,32,44,0],[...
Latt asked 12/7, 2018 at 4:43
2
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 cla...
Kingcraft asked 20/9, 2016 at 22:6
6
Solved
The meat of my question is "how does one design a kernel function for a learning problem?"
As a quick background, I'm reading books on support vector machines and kernel machines, and everywhere ...
Therewithal asked 14/5, 2011 at 0:5
1
I am using the train function in caret to train a SVM using the svmRadial kernel for a binary classification task I have.
When I run the train function on my data, I incrementally get these messa...
Glomerulonephritis asked 6/4, 2017 at 23:15
4
Solved
Suppose we are given a training dataset {yᵢ, xᵢ}, for i = 1, ..., n, where yᵢ can either be -1 or 1 and xᵢ can be e.g. a 2D or 3D point.
In general, when the input points are linearly separable, ...
Milwaukee asked 20/3, 2013 at 15:20
6
Solved
I am using sklearn for multi-classification task. I need to split alldata into train_set and test_set. I want to take randomly the same sample number from each class.
Actually, I amusing this funct...
Bodine asked 18/2, 2016 at 4:13
3
Solved
I'm trying to convert some old code from using sklearn to Keras implementation. Since it is crucial to maintain the same way of operation, I want to understand if I'm doing it correctly.
I've conv...
Reputation asked 29/1, 2019 at 5:30
2
I am using the NuSVC class in sklearn. After trying to instantiate an NuSVC object as follows:
self.classifier = OneVsRestClassifier(NuSVC())
I found that I repeatedly get a 'specified nu is inf...
Arizona asked 18/11, 2014 at 5:30
4
In my code in which X and y are the training data:
from sklearn.svm import SVC
clf = SVC(kernel=lambda x,y:gauss_kernel(x, y, 100) )
print(X.shape[0])
print(X.shape[1])
print(X.shape)
clf.fit(X, ...
Sophocles asked 30/11, 2017 at 1:30
2
Solved
I was going through the code for SVM loss and derivative, I did understand the loss but I cannot understand how the gradient is being computed in a vectorized manner
def svm_loss_vectorized(W, X, ...
3
Solved
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 n...
Exsanguine asked 9/11, 2012 at 0:11
2
Solved
I am trying to optimize an SVR model and facing a problem because of overfitting, to overcome this I have tried to decrease the number of iterations instead of leaving it until convergence.
To com...
Gallinaceous asked 5/1, 2017 at 13:41
3
Solved
Using SVM with sklearn library, I would like to plot the data with each labels representing its color. I don't want to color the points but filling area with colors.
I have now :
d_pred, d_trai...
Babby asked 24/7, 2018 at 10:2
4
Solved
I'm trying to use the CVXOPT qp solver to compute the Lagrange Multipliers for a Support Vector Machine
def svm(X, Y, c):
m = len(X)
P = matrix(np.dot(Y, Y.T) * np.dot(X, X.T))
q = matrix(np.on...
Nipper asked 8/4, 2016 at 23:23
5
Solved
How can i know sample's probability that it belongs to a class predicted by predict() function of Scikit-Learn in Support Vector Machine?
>>>print clf.predict([fv])
[5]
There is any fun...
Ventriloquy asked 22/2, 2013 at 2:10
5
Solved
I use linear SVM from scikit learn (LinearSVC) for binary classification problem. I understand that LinearSVC can give me the predicted labels, and the decision scores but I wanted probability esti...
Thickening asked 21/10, 2014 at 2:29
3
Solved
I'm currently working on kernel methods, and at some point I needed to make a non positive semi-definite matrix (i.e. similarity matrix) into one PSD matrix.
I tried this approach:
def makePSD(ma...
Nidify asked 5/4, 2017 at 17:45
3
Solved
I am using libSVM.
Say my feature values are in the following format:
instance1 : f11, f12, f13, f14
instance2 : f21, f22, f23, f24
instance3 : f31, f32, f33, f34
instance4 : f41, f42, f43, f...
Saxton asked 15/3, 2013 at 15:36
1
I am executing the scikit-learn SVM classifier (SVC) from python 2.7.10 and it has been running for over 2 hours now. I have read the data using pandas.read_csv preprocessed it and then run
clf =...
Rhizogenic asked 21/7, 2015 at 22:17
2
Solved
Does anyone have experience of training a support vector machine (SVM) in Julia (1.4.1) ?
I tried the LIBSVM interface, but the example on the gituhub page gave an error :
# Load Fisher's classic i...
Clergyman asked 26/6, 2020 at 12:6
2
Solved
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 ...
Profant asked 17/10, 2016 at 1:49
1
I'm working on a binary classification problem. I had this situation that I used the logistic regression and support vector machine model imported from sklearn. These two models were fit with the s...
R asked 21/7, 2021 at 19:36
2
Solved
I found sklearn.svm.LinearSVC and sklearn.svm.SVC(kernel='linear') and they seem very similar to me, but I get very different results on Reuters.
sklearn.svm.LinearSVC: 81.05% in 28.87s train / 9....
Virga asked 29/7, 2017 at 0:49
2
Solved
Is there a way to get access to the predicted values calculated within a GridSearchCV process?
I'd like to be able to plot the predicted y values against their actual values (from the test/validat...
Coenzyme asked 3/4, 2018 at 15:9
1 Next >
© 2022 - 2025 — McMap. All rights reserved.