Displaying 8 results from an estimated 8 matches for "tunecontrol".
2005 May 24
1
best.svm
Hi
I am trying to fit an svm to predict speech recognition errors. I am
using best.svm like this:
svm.model = best.svm(data[1:3000,1:23],data[1:3000,24],tunecontrol =
tune.control())
I got this:
> print(svm.model)
Call:
best.svm(x = data[1:3000, 1:23], tunecontrol = tune.control(),
data[1:3000, 24])
Parameters:
SVM-Type: eps-regression
SVM-Kernel: radial
cost: 1
gamma: 0.04347826
epsilon: 0.1
Number of Support Ve...
2008 Mar 02
2
listing components of an object
...od? Let me be more clear with an example
data(iris)
## tune `svm' for classification with RBF-kernel (default in svm),
## using one split for training/validation set
obj <- tune(svm, Species~., data = iris,
ranges = list(gamma = 2^(-1:1), cost = 2^(2:4)),
tunecontrol = tune.control(sampling = "fix")
)
## alternatively:
## obj <- tune.svm(Species~., data = iris, gamma = 2^(-1:1), cost = 2^(2:4))
summary(obj)
plot(obj)
---------------------------------
For tune, an object of class tune, including the components:
best.parameter...
2005 Oct 06
1
how to use tune.knn() for dataset with missing values
...giving an error saying
missing values are not allowed.... again here is the script for
BreastCancer Data,
library(e1071)
library(mda)
trdata<-data.frame(train,row.names=NULL)
attach(trdata)
xtr <- subset(trdata, select = -Class)
ytr <- Class
bestpara <-tune.knn(xtr,ytr, k = 1:25, tunecontrol = tune.control(sampling
= "cross"))
and here i got the mentioned error.
can anybody help me in this regard...
Thanks & Regards,
Uttam Phulwale
Tata Consultancy Services Limited
Mailto: uttam.phulwale@tcs.com
Website: http://www.tcs.com
[[alternative HTML version deleted]]
2010 May 14
0
bootstrapping an svm
...training <- subset(D, select=Class)
dataclstest <- subset(E,select=c(.......))
classesclstest <- subset(E, select=Class)
bootsvm <- function(data, new_data, newdata_classes, indices)
{
d <-data[indices,]
** model2 <- best.svm(Class~.,data=d, gamma = 10^(-6:-1), cost = 10^(-1:1), tunecontrol=tune.control(sampling="bootstrap", nboot=1000, boot.size=8/8))
pred.b <- predict(model2, newdata=new_data, decision.values=FALSE, probability=FALSE)
return(auc(pred.b, t(newdata_classes)))
}
colon.boot <- boot(data=dataclstraining, statistic=bootsvm, R=1000, new_data=dataclstest,...
2006 Mar 25
2
R gets slow
...;
attach(dd);
tr_in = as.matrix(dd[,2:(1 + 1)]);
tr_out = dd[,1];
val_in = as.matrix(ddv[,2:(1 + 1)]);
val_out = ddv[,1];
t = tune(svm, kernel = "radial", train.x = tr_in, train.y = tr_out,
validation.x = val_in, validation.y = val_out,
range = list( gamma = 2^(-1:1), cost = 2^(2:4) ), tunecontrol =
tune.control(sampling = "fix") )
z = t$best.model
save(z, file = "./models/1/20", compress=FALSE);
Thanks
Pau.
2012 Aug 19
1
e1071 - tuning is not giving the best within the range
...a <- data.frame( rbind(matrix(rnorm(1500, mean = 10, sd = 5),ncol = 10),
matrix(rnorm(1500, mean = 5, sd = 5),ncol = 10)))
class <- as.factor(rep(1:2, each=150))
data<- cbind(data,class)
tuned<-best.svm(class~., data=data, kernel = "linear", cost =
seq(0.24,0.44, by = .01), tunecontrol=tune.control(cross=300) )
# test with train data
predicts <- predict(model, data, probability=TRUE, decision.values = TRUE)
tab<-table(predicts, data$class)
tab/
This is what I face:
/Parameters:
SVM-Type: C-classification
SVM-Kernel: linear
cost: 0.26
gamma: 0.1
N...
2011 Apr 12
0
Help required
...nto .csv file and loaded it into R.
> 2) then I invoked e-1071 package and used the following code to tune the svm.
>> retune<-tune(svm, Rexp~.,data=retrain, ranges=list(gamma=c(2^-10,2^-8,2^-6,2^-4, 2^-2,
> 2^0, 2^1, 2^2, 2^3), cost=c(0.1,0.4,0.6,0.8,1.0,1.2,1.4),
> eps=10^(2:1)),tunecontrol=tune.control(sampling="cross")).
> 3) I got the following error message.
> Error in predict.svm(ret, xhold, decision.values = TRUE) :
> ?Model is empty!
> 4) 10 random data as per your instructions are:
> structure(list(Peb = c(225.0282, 514.4835, 66.6346, 221.4287,
> 36...
2006 Feb 28
3
does svm have a CV to obtain the best "cost" parameter?
Hi all,
I am using the "svm" command in the e1071 package.
Does it have an automatic way of setting the "cost" parameter?
I changed a few values for the "cost" parameter but I hope there is a
systematic way of obtaining the best "cost" value.
I noticed that there is a "cross" (Cross validation) parameter in the "svm"
function.
But I