Questions tagged [svm]

Support vector machines (SVMs) are a set of related supervised learning methods that analyze data and recognize patterns, used for classification and regression analysis.

From Wikipedia:

Support vector machines (SVMs) are a set of related supervised learning methods that analyze data and recognize patterns, used for classification and regression analysis. The standard SVM takes a set of input data and predicts, for each given input, which of two possible classes the input is a member of, which makes the SVM a non-probabilistic binary linear classifier. Since an SVM is a classifier, then given a set of training examples, each marked as belonging to one of two categories, an SVM training algorithm builds a model that assigns new examples into one category or the other. Intuitively, an SVM model is a representation of the examples as points in space, mapped so that the examples of the separate categories are divided by a clear gap that is as wide as possible. New examples are then mapped into that same space and predicted to belong to a category based on which side of the gap they fall on.

4561 questions
1
vote
0 answers

after mice/multiple imputation, how to pool RF and SVL? (GLM works)

I was recently introduced to mice/multiple imputation and was able to succesfully do a mice , glm model and pool the results. This only worked for a glm though. While looking into mice I could only find pool examples that used either glm or lm, but…
RelcioR
  • 27
  • 6
1
vote
0 answers

Is this possible to run gradient descent to train SVMs?

The classical implementation of SVMs usually use SMO algorithm to train SVMs, which is a bit clumsy and lengthy. Occasionally I saw this line of code : for ii in range(outer_loops * M): i = int(np.random.rand() * M) margin = Y[i] *…
Jiangnan
  • 11
  • 3
1
vote
0 answers

Missmatch between predictions from sklearn LinearSVC and CalibratedClassifierCV

I'm using a LinearSVC-model for making a prediction between 5 classes and using CalibratedClassifierCV-model to get "probabilities" for each class. Here are my definition of the models: from sklearn.calibration import CalibratedClassifierCV from…
Joel
  • 189
  • 7
1
vote
1 answer

AttributeError: 'numpy.ndarray' object has no attribute 'lower'

I am trying to predict using SVM but I receive the error AttributeError: 'numpy.ndarray' object has no attribute 'lower' when executing line text_clf.fit(X_train,y_train) of my code. How to fix this and get the probability that my prediction is…
1
vote
1 answer

Is label encoding automatically done by sklearn SVC?

I am training a Support Vector Machine using sklearn. In the beginning, I did not encode the class labels in any form and left them as Strings (e.g. ["A", "B", "C"]). The resulting accuracy was comparable to when I used a LabelEncoder [0, 1, 2]. So…
Matze
  • 368
  • 1
  • 3
  • 12
1
vote
0 answers

How to plot feature map comprised of tfidf and polarity using pyplot?

I have around 322 text documents. I generated tfidf vector for those documents. I also have polarity assigned to each document(which is a float number). Then I have keywords as columns, and have marked them as 1 if they are present in the…
1
vote
1 answer

My android studio does not generate com,android.support dependency automatically. How can I solve this problem?

dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation…
1
vote
1 answer

Plot SVM trained by caret

I am trying to get a plot similar to the one obtained in this post Plot SVM linear model trained by caret package in R This code works if I run it on my console, but if I do it with my data it does not work, so I am wondering if it is a problem of…
GFA
  • 25
  • 4
1
vote
1 answer

Error in SVM model: Pre-processing methods are limited to: BoxCox, YeoJohnson in R

I am trying to run an SVM model, but I get the error: Error: pre-processing methods are limited to: BoxCox, YeoJohnson, expoTrans, invHyperbolicSine, center, scale, range, knnImpute, bagImpute, medianImpute, pca, ica, spatialSign, ignore, keep,…
Ana Wilmer
  • 63
  • 5
1
vote
1 answer

Why is my Mean Absolute Error (MAE) from a MultiOutputRegressor method showing one value instead of three?

I have the following code, in which I need to predict 3 different outputs and then calculate the MAE (mean absolute error) for each output. Since the Support Vector Machine Regression does not support multioutput regression by itself like other…
1
vote
1 answer

R-Studio SVM classAgreement how-to?

I am an absolute newbie to R-Studio and want to use svm() of the e1071 package. I went through David Meyer's paper. I can't get classAgreement() to run. What do I need to do before I can use classAgreement()? Thanks a…
C. P.
  • 11
  • 1
1
vote
2 answers

Can SVM method deal with 1 dimensional data for forecasting?

I am working on using SVM to predict the future values of one particular 1D data. The data contains 54 month sales values and with their month indexes from 1 to 54. The first problem is that I think the SVM could do the prediction but I am not quit…
Git
  • 23
  • 5
1
vote
1 answer

SVM duality: set of hyperparameters not supported

I am trying to train a SVM model on the Iris dataset. The aim is to classify Iris virginica flowers from other types of flowers. Here is the code: import numpy as np from sklearn import datasets from sklearn.pipeline import Pipeline from…
robertspierre
  • 3,218
  • 2
  • 31
  • 46
1
vote
0 answers

How python finds the support vectors in the kernelized SVM

When the classes are overlapped, the kernel SVM moves the data to a higher dimensionality to find an optimal separation between classes. If SVM finds the separate hyperplane in the transformed data, this means it finds the support vectors in the…
1
vote
0 answers

Mutli-Class Text Classifcation (using TFIDF and SVM). How to implement a scenario where one feedback may belong to more than one class?

I have a file of raw feedbacks that needs to be labeled(categorized) and then work as the training input for SVM Classifier(or any classifier for that matter). But the catch is, I'm not assigning whole feedback to a certain category. One feedback…