Displaying 20 results from an estimated 3000 matches similar to: "Problems to run SVM regression with e1071"
2010 May 14
4
Categorical Predictors for SVM (e1071)
Dear all,
I have a question about using categorical predictors for SVM, using "svm"
from library(e1071). If I have multiple categorical predictors, should they
just be included as factors? Take a simple artificial data example:
x1<-rnorm(500)
x2<-rnorm(500)
#Categorical Predictor 1, with 5 levels
x3<-as.factor(rep(c(1,2,3,4,5),c(50,150,130,70,100)))
#Catgegorical Predictor
2011 Feb 23
0
svm(e1071) and scaling of weights
I expected, that I will get the same prediction, if I multiply the
weights for all classes with a constant factor, but I got different
results. Please look for the following code.
> library(e1071)
> data(Glass, package = "mlbench")
> index <- 1:nrow(Glass)
> testindex <- sample(index, trunc(length(index)/5))
> testset <- Glass[testindex, ]
> trainset <-
2010 May 05
2
probabilities in svm output in e1071 package
svm.fit<-svm(as.factor(out) ~ ., data=all_h, method="C-classification",
kernel="radial", cost=bestc, gamma=bestg, cross=10) # model fitting
svm.pred<-predict(svm.fit, hh, decision.values = TRUE, probability = TRUE) #
find the probability, but can not find.
attr(svm.pred, "probabilities")
> attr(svm.pred, "probabilities")
1 0
1 0 0
2 0
2007 Oct 27
1
problems in cross validation of SVM in pakage "e1071"
Hi:
I am a newer in using R for data mining, and find the "e1071" pakage an excellent tool in doing data mining work!
what frustrated me recently is that when I using the function "svm" and using the "cross=10" parameters, I got all the "accuracies" of the model greater than 1. Isn't that the accuracy should be smaller than 1? so I wander how, the
2009 Feb 20
0
e1071 package for SVM
Dear all,
I got a code for e1071 package in R for SVM regression. I
have used *m$coefs* for extracting the coefficients but I am getting only
72 . How can I extract coefficients of the predictors set? Does it mean
that I will get only 72 as *Number of Support Vectors: 72. *
**
Thanks in advance
Code:
--------------
library(e1071)
> # create data
> x <- seq(0.1, 5,
2010 Apr 29
2
can not print probabilities in svm of e1071
> x <- train[,c( 2:18, 20:21, 24, 27:31)]
> y <- train$out
>
> svm.pr <- svm(x, y, probability = TRUE, method="C-classification",
kernel="radial", cost=bestc, gamma=bestg, cross=10)
>
> pred <- predict(svm.pr, valid[,c( 2:18, 20:21, 24, 27:31)],
decision.values = TRUE, probability = TRUE)
> attr(pred, "decision.values")[1:4,]
2017 Sep 02
0
problem in testing data with e1071 package (SVM Multiclass)
Hello all,
this is the first time I'm using R and e1071 package and SVM multiclass
(and I'm not a statistician)! I'm very confused, then. The goal is: I
have a sentence with sunny; it will be classified as "yes" sentence; I
have a sentence with cloud, it will be classified as "maybe"; I have a
sentence with rainy il will be classified as "no".
The
2011 Mar 04
1
Probabilities outside [0, 1] using Support Vector Machines (SVM) in e1071
Hi All,
I'm attempting to use eps-regression or nu-regression SVM to compute
probabilities but the predict function applied to an svm model object
returns values outside [0, 1]:
Variable Data looks like:
Present X02 X03 X05 X06 X07 X13 X14 X15 X18
1 0 1634 48 2245.469 -1122.0750 3367.544 11105.013 2017.306 40 23227
2 0 1402 40 2611.519 -811.2500 3422.769 10499.425 1800.475 40 13822
3 0 1379
2009 Jul 23
0
How to get w in SVR with e1071 package
>
> Hi all,
>
> I need some help about how to calculate w in a SVR in package e1071.
>
> I have a regression y_i=f(x_i)+e
>
> where f(*x*)=(w,phi(x))+b
>
> then go on with the SVR calculation I know that w*=Sum_i=1^n [(á_i -
> á*_i)K(x,x_i) ] where á_i and á*_i are the lagrangian multipliers of the
> dual form.
>
> o.k but how I will get it in R?
>
>
2005 May 19
2
tune.svm in {e1071}
Dear All ,
1- I'm trying to access the values of fitted(model) after model<- tune.svm( ) but seemingly it is not poosible. How can I access to values of fitted ? However ,it is possible only after model<- svm( )
2- How can I access to the other values such as the number of Support Vectors , gamma, cost , nu , epsilon , after model<- tune.svm( ) ? these are not possible?
I
2003 Dec 10
3
e1071:svm - default epsilon = 0.1 (NOT 0.5) (PR#5671)
In e1071 package/svm default epsilon value is set to 0.1 and not 0.5
as documentation says.
R
2009 Aug 03
1
How to get w and b in SVR? (package e1071)
Dear R users,
I'm running a SVR in package e1071 but I did not able to calculate the
parameters w and b of the regression. I don't know how to do that and if it
is possible to do it with this package.
Someone have some idea. Any help would be much appreciated.
Marlene
[[alternative HTML version deleted]]
2010 Feb 23
1
e1071: Cannot predict probabilities
Dear list.
I using the SVM-methods from the e1071, but I can't get the
probabilities when predicting.
Code:
x <- matrix(rbinom(100, 10, 0.3), ncol=2)
y <- apply(x, 1, sum)
fit <- svm(y ~ x, method = "C-classification", kernel = "radial",
probability = TRUE)
predict(fit, x, probability=TRUE)
Here predict doesn't containing any probabilities (not as attributes
2011 Feb 18
1
segfault during example(svm)
If do:
> library("e1071")
> example(svm)
I get:
svm> data(iris)
svm> attach(iris)
svm> ## classification mode
svm> # default with factor response:
svm> model <- svm(Species ~ ., data = iris)
svm> # alternatively the traditional interface:
svm> x <- subset(iris, select = -Species)
svm> y <- Species
svm> model <- svm(x, y)
svm>
2006 Dec 08
1
please help me for svm plot question
I run the following code, all other is ok,
but plot(m.svm,p5.new,As~Cur) is not ok
Anyone know why?
install.packages("e1071")
library(e1071)
library(MASS)
p5 <- read.csv("http://www.public.iastate.edu/~aiminy/data/p_5_2.csv")
p5.new<-subset(p5,select=-Ms)
p5.new$Y<-factor(p5.new$Y)
levels(p5.new$Y) <- list(Out=c(1), In=c(0))
attach(p5.new)
2013 Jan 08
0
bagging SVM Ensemble
Dear Sir,
I got a problem with my program. I would like to classify my data using
bagging support vector machine ensemble. I split my data into training data
and test data. For a given data sets TR(X), K replicated training data sets
are first randomly generated by bootstrapping technique with replacement.
Next, Support Vector Mechine (SVM) is applied for each bootstrap data sets.
Finally, the
2005 Apr 26
3
Error using e1071 svm: NA/NaN/Inf in foreign function call
Hello,
As far I saw in archive mailing list, I am not the first person with this problem. Anyway I was not able to pass this error once the information I got from the archive it is not very conclusive for this case. I have used linear, radial and sigmoid kernels for the same data in the same conditions and everything is ok. This problem just happens with the polynomial kernel. I send the
2006 Dec 07
1
svm plot question
I run the following code, all other is ok,
but plot(m.svm,p5.new,As~Cur) is not ok
Anyone know why?
install.packages("e1071")
library(e1071)
library(MASS)
p5 <- read.csv("http://www.public.iastate.edu/~aiminy/data/p_5_2.csv")
p5.new<-subset(p5,select=-Ms)
p5.new$Y<-factor(p5.new$Y)
levels(p5.new$Y) <- list(Out=c(1), In=c(0))
attach(p5.new)
2004 Dec 21
2
Rgui.exe - Error while tuning svm
Hello,
if I try to tune my svm with the code:
Tune <- tune.svm(Data.Train, Class.Train, type="C-classification",
kernel="radial", gamma = 2^(-1:1), cost = 2^(2:4))
i get a windows Messagebox with a error in the application "Rgui.exe" and
the message: "Die Anweisung in 0x6c48174d verweist auf Speicher 0x00000000.
Der Vorgang "read" konnte nicht auf
2012 Aug 07
1
Interpreting predictions of svm
Hi, I have some difficulties in interpreting the prediction of a svm model
using the package e1071.
y1 is the variable I want to predict. It is of type factor and has got two
levels: "< 50%" and "> 50%".
z is the dataset.
> model <- svm(y1 ~ ., data = z,type="C-classification", cross=10)
> model
Call:
svm(formula = y1 ~ ., data = z, type =