Questions tagged [e1071]

e1071 is a R package for miscellaneous functions of the Department of Statistics (e1071) at TU Wien (Vienna University of Technology). It includes functions for latent class analysis, short time Fourier transform, fuzzy clustering, support vector machines, shortest path computation, bagged clustering, naive Bayes classifier, etc.

Filter by
Sorted by
Tagged with
1 vote
1 answer
163 views

Random Forest vs Support Vector Machine. Which is faster?

I am comparing the performance of Support Vector Machine with a radial basin function and Random Forests with 250 trees. I am using e1071 (SVM) and ...
user avatar
  • 113
0 votes
0 answers
29 views

What is the math behind predict() in e1071 for SVM? [duplicate]

I have no math or computer science training. When I run predict(svm,data,type="class") R spits out a prediction of 1 or 0 for each row of data. What is it doing ...
user avatar
  • 57
1 vote
0 answers
63 views

Help! All coefs = cost, too many support vectors, and performance is terrible SVM e1071

I am trying to learn how to use the svm modeler e1071 in R. When I run my model I get what seems to be an obnoxiously high number of support vectors and a terrible "best performance" of 12% using tune....
user avatar
  • 57
0 votes
0 answers
142 views

R: Naive Bayes model e1071, why does it works with totally different columns in training ad testing?

I'm working with the e1071:: naiveBayes() function, but I don't figure out how it works. My doubts arose when I read this post. I've posted this question on SO, but ...
user avatar
  • 217
3 votes
1 answer
132 views

Recover $\rho$ of $\nu$-SVM from e1071 package in R

Given a dataset $\{(x_i,y_i)\}_{i=1}^n$, the primal problem for $\nu$-SVM is: \begin{align} &\min_{w,b,\xi,\rho} && \frac{1}{2}w^\top w-\nu\rho+\frac{1}{n}\sum_{i=1}^n\xi_i\\ &\text{...
user avatar
  • 3,002
0 votes
1 answer
758 views

R Naive Bayes and Laplace: Even turned off, works fine with unseen words in test data?

I'm trying to better understand Laplace+1 smoothing on Naive Bayes for text classification. Using the e1071 package in R, naiveBayes() function, I get some confusing results. If I fit a model using ...
user avatar
2 votes
1 answer
1k views

Error and Dispersion meaning in tune.out for SVM Classifier

I am using a SVM to solve a binary classification problem with qualitative response as output. To find out the best parameters for the SVM I used a 10-fold cross-validation technique. And the result ...
user avatar
3 votes
1 answer
2k views

Manually finding the bias term in classification SVM in R

Apropos of a follow-up question to this post, I tried to prove to myself that I understood the notation in the equation for the bias (page 5) in support vector machine SVM (classification, linear ...
user avatar
3 votes
2 answers
11k views

c-classification SVM vs nu-classification SVM in e1071 R

When should I use c-svm and when nu-svm? I have read that "The range of C is from zero to infinity, but nu is always between [0,1]", but I couldn't understand anything from this. What is the range ...
user avatar
1 vote
1 answer
3k views

When SVM can do multi-class classification itself, why do people still use (one vs one) or (one Vs many) classification?

I used - library(e1071) which was able to predict all(10) of my classes in a single run. Now, why do people go for one Vs one and one Vs many approach? What is the benefit of those approaches? Is it ...
user avatar
2 votes
4 answers
377 views

Does SVM perform poorly with too few observations

I try to train a linear SVM using package e1071, with cost=10 on the following data: ...
user avatar
2 votes
1 answer
4k views

R - SVM (radial) regression using tune() (e1071) - How to uncover influential features?

I have some questions regarding SVM and regression. 1) How to interpret SVM (regression) results. 2) How to make a proper plot (containing decent information) ...
user avatar
  • 43
1 vote
1 answer
1k views

What are the decision values at the margins in an SVM model?

I am trying to show the decision surface of an SVM model and its margins in a 3D RGL graph in R. Here is a really nice, replicable example from stack overflow. I am using the same example: ...
user avatar
  • 125
0 votes
1 answer
1k views

How to train an SVR model? [closed]

I'm trying to figure out how SVR works, as I need to use it to model some time series. For this purpose, before starting with this model, I've tried to create a toy-model from a sinusoidal function, ...
user avatar
8 votes
1 answer
24k views

Meaning of Epsilon in SVM regression

I did some tutorials and read few articles but still have a problem with SVM, exactly with SVR. I'm doing analysis in R and I use e1071 library with "svm" function. Into that function I use my ...
user avatar
  • 103
1 vote
1 answer
945 views

Fastest SVM library in R for large data and Multiclass problem [closed]

I try to implement SVM on a very large data set. My Data is categorical with three classes. I have tried e1071, but it took too long to solve my problem. Anyone ...
user avatar
1 vote
3 answers
886 views

naiveBayes does not give expected probabilities

I do not understand how the naiveBayes method from the e1071 package is calculating probabilities when classes are perfectly separable (more generally in categories where there are only one class ...
user avatar
  • 205
1 vote
0 answers
1k views

How can in interpret the SVM summary on e1071 package in R?

I don't know how to interpret the svm summary outputs in R. I show you the reproducible code below. data <- read.csv(file.choose (), header = TRUE, sep=';') set.seed(1234) splitIndex &...
user avatar
  • 13
1 vote
1 answer
1k views

How to calculate decision boundary from nonlinear svm in R?

As a follow up to this question - How to obtain decision boundaries from linear SVM in R? Is it possible to do the same with non linear SVM? (Radial for example). What do the weights represent?
user avatar
10 votes
1 answer
15k views

Difference between the types of SVM

I am new to support vector machines. Short explanation The svm function from the e1071 package in R offers various options: ...
user avatar
  • 4,912
2 votes
2 answers
883 views

SVM always gives me (in average) below chances cross validation accuracy with random data

I am running e1071 linear SVM on my neuroimaging data. (by function svm()) When I was doing permutation tests, I found, in average, the cross validation (CV) ...
user avatar
  • 21
1 vote
1 answer
5k views

Any way of getting vector of probabilities for each response with Naive Bayes in R?

I'm currently using naiveBayes from {e1071}. My response is simply a prediction based on my independent variables. Is there a ...
user avatar
  • 869
1 vote
1 answer
53 views

e1071: CVE returns linear separation, Hold-out returns large error

I'm using the Adult dataset that can be found here: http://archive.ics.uci.edu/ml/datasets/Adult After taking a sample of the dataset, I use the svm function of e1071 to obtain the accuracy with a ...
user avatar
  • 21
7 votes
2 answers
9k views

SVM predicts everything in one class

I'm running a basic language classification task. There are two classes (0/1), and they are roughly evenly balanced (689/776). Thus far, I've only created basic unigram language models and used these ...
user avatar
  • 460
1 vote
1 answer
625 views

How to conduct Support Vector Mache using R(e1071)

Could anyone help me to interpret these results from R? How can I find nBSV,nSv, obj and iteration numbers? How can I use nBSV and nSv, obj to determine which kernel is the best? ...
user avatar
6 votes
3 answers
15k views

R caret Naive Bayes (untuned) results differ from klaR

I'm running a naive bayes classification model and I noticed that the caret package returns a different result than does klaR (which caret references) or e1071. My question is: is there something ...
user avatar
1 vote
1 answer
1k views

Naive Bayes Classifier in R with class weights

I'm searching for a Naive Bayes classifier in R where I can add a paramter for class weights. I need this, because my data is highly unbalanced. Eg.: Class1: 1000 examples Class2: 800 examples ...
user avatar
7 votes
4 answers
2k views

Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms?

I work with R and let's say that I have a train set and a test set. I want to test different algorithms (for example neural networks and svm). I will perform a first 10-folds cross validation on my ...
user avatar
1 vote
0 answers
817 views

SVM for regression : confidence intervalls

I use the svm function (for regression) to make forecast like I would with for exemple the arima function: fit<-auto.arima(ts) ...
user avatar
  • 136
4 votes
0 answers
2k views

How to draw plot of the values of decision function of multi class svm versus another arbitrary values?

I am trying to draw a plot of the decision function ($f(x)=sign(wx+b)$ which can be obtain by fit$decision.values in R using the svm function of e1071 package) versus another arbitrary values. From ...
user avatar
4 votes
1 answer
12k views

SVM in R (package e1071): predicting class using predict()

I have difficulties to understand predict.svm. Please find an illustration of my confusion below. As we can see, results are different depending on the ...
user avatar
  • 1,705
0 votes
1 answer
309 views

Cost in e1071's SVM doesn't seems same as svmlight's Cost. How to provide cost for balancing training by imbalanced train dataset?

The manual of e1071 library states the following definition for its cost parameter: ...
user avatar
2 votes
1 answer
799 views

Why does the linear SVM give a lot of support vectors?

I simulate a simple linear setup: n = 1000 X = runif(n) Y = runif(n) ind = X + 2*Y < 1 ind[ind == TRUE] = runif(sum(ind)) < 1 plot(X,Y,col = ind + 1) ...
user avatar
2 votes
1 answer
2k views

e1071 svm queries regarding plot and tune

I am new to R and I am learning the e1071 packages' svm function. Following are the few questions I have. How does the plot function work? I cannot understand the plotting case with more than 2 ...
user avatar
2 votes
1 answer
499 views

Rule from SVM results

I am using Support Vector Machines from "e1071" package in R. For standard IRIS data the code is: ...
user avatar
  • 611
1 vote
1 answer
845 views

e1071 svm predicted probabilties are all 0.5

My svm classifier model always predict 0.5 as probabilities. ...
user avatar
0 votes
1 answer
37 views

SVMs for nested/prioritzed text document classes.

Let's say A, B, C, D, E, F are classes of text documents (i.e. sentences). Usually they occur distinctively, say: one document is precisely C. But sometimes one document is C AND A, at the same time. ...
user avatar
  • 133
3 votes
1 answer
5k views

R e1071 tune plot does not give me the best gamma?

I am using the R e1071 library for the SVM (Support Vector Machine) algorithm. And I used tune to find out the best Cost and gamma parameters. Though the plot doesn't seem to provide the actual best ...
user avatar
3 votes
2 answers
2k views

SVM prediction accuracy drops when using Test data [closed]

I am using the Kaggle Scikit data to learn R. I am using the R e1071 SVM function to predict classes. When I use: ...
user avatar
0 votes
1 answer
1k views

Support Vectors Not Falling on Margin Lines for e1071 and kernlab packages in R?

In a previous thread, Computing the Decision Boundary of a linear SVM model(Computing the decision boundary of a linear SVM model), the following R code was given as a way to compute the formula of ...
user avatar
4 votes
3 answers
2k views

Methods to combine ( e1071 svm ) models in R to generate a more complete, accurate model

I am using the function svm from the package e1071 in R to generate a support vector machine ...
user avatar
7 votes
3 answers
3k views

Suitable number of classes for SVM in text categorization

I'm doing text categorization with R and SVM in the package e1071. I have around 30000 text files for training, and 10000 for test. The goal is to hierarchically categorize these files. For example, I ...
user avatar
10 votes
1 answer
8k views

How to obtain decision boundaries from linear SVM in R?

I am in need of a package that can give me the equation for a linear SVM model. Currently I'm using e1071 like so: ...
user avatar
  • 528
13 votes
2 answers
4k views

Problem with e1071 libsvm?

I have a dataset with two overlapping classes, seven points in each class, points are in two-dimensional space. In R, and I'm running svm from the ...
user avatar
  • 2,484
3 votes
1 answer
4k views

Using SparseM/Matrix Sparse Matrix in training SVM from e1071 returning different results from same data in standard matrix

Using sparse matrix objects in svm training in e1071 returns different results than running on the same data represented as standard matrix: ...
user avatar
10 votes
4 answers
12k views

Improving the SVM classification of diabetes

I am using SVM to predict diabetes. I am using the BRFSS data set for this purpose. The data set has the dimensions of $432607 \times 136$ and is skewed. The percentage of ...
user avatar
  • 1,102
5 votes
2 answers
6k views

Spam filtering using naive Bayesian classifiers with the e1071/klaR package on R

I'm looking at doing text classification/spam filtering using naive Bayesian classifiers with the e1071 or klaR package on R. Is there a good tutorial out there to describe this? I'm kind of stuck ...
user avatar
2 votes
1 answer
1k views

MLE for Naive Bayes in R

I am using the naivebayes function of the e1071 library. Some example commands are: ...
user avatar