similar to: tune(): how to specify a kernel ?

Displaying 20 results from an estimated 10000 matches similar to: "tune(): how to specify a kernel ?"

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
2003 Nov 12
4
column extraction by name ?
I have a data frame (df) with colums x, y and z. e.g. df <- data.frame(x = sample(4), y = sample(4), z = sample(4)) I can extract column z by: df$z or df[3] I can also extract columns x,y by: df[1:2] or by df[-3]. Is it possible to extract x,y columns in a "symbolic" fashion i.e. by equivalent of df[-z] (which is illegal) ??? Or alternativeley, is there an equivalent of
2003 Nov 03
1
svm in e1071 package: polynomial vs linear kernel
I am trying to understand what is the difference between linear and polynomial kernel: linear: u'*v polynomial: (gamma*u'*v + coef0)^degree It would seem that polynomial kernel with gamma = 1; coef0 = 0 and degree = 1 should be identical to linear kernel, however it gives me significantly different results for very simple data set, with linear kernel
2003 Dec 09
2
problem with pls(x, y, ..., ncomp = 16): Error in inherit s( x, "data.frame") : subscript out of bounds
I don't know the details of pls (in the pls.pcr package, I assume), but if you use validation="CV", that says you want to use CV to select the best number of components. Then why would you specify ncomp as well? Andy > From: ryszard.czerminski at pharma.novartis.com > > When I try to use ncomp parameter in pls procedure I get > following error: > > >
2003 Oct 24
5
how to remove NaN columns ?
How can I remove columns with NaN entries ? Here is my simple example: > data <- read.csv("test.csv") > xdata <- data[3:length(data)] > xs <- lapply(xdata, function(x){(x - mean(x))/sqrt(var(x))}) > x <- data.frame(xs) > x C D E F 1 -0.7071068 NaN -0.7071068 -0.7071068 2 0.7071068 NaN 0.7071068 0.7071068
2003 Oct 31
3
print(), cat() and simple I/O in R
I am trying to produce rather mundane output of the form e.g. pi, e = 3.14 2.718 The closest result I achieved so far with print() is: > print (c(pi, exp(1)), digits = 3) [1] 3.14 2.72 > print(c("pi, e =", pi, exp(1)), digits = 3) [1] "pi, e =" "3.14159265358979" "2.71828182845905" I understand that c() promotes floats to strings and
2004 Jan 15
2
prcomp scale error (PR#6433)
Full_Name: Ryszard Czerminski Version: 1.8.1 OS: GNU/Linux Submission from: (NULL) (205.181.102.120) prcomp(..., scale = TRUE) does not work correctly: $ uname -a Linux 2.4.20-28.9bigmem #1 SMP Thu Dec 18 13:27:33 EST 2003 i686 i686 i386 GNU/Linux $ gcc --version gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) > a <- matrix(rnorm(6), nrow = 3) > sum((scale(a %*% svd(cov(a))$u, scale
2004 Mar 02
2
row.names are dropped when extracting one column ?
Apparently row names are dropped when I extract single column from a data frame. Why this behaviour ? > y <- as.matrix(df[,1:2]); length(row.names(y)) [1] 324 > y <- as.matrix(df[,1:1]); length(row.names(y)) [1] 0 Best regards, Ryszard
2010 May 13
1
tune svm
Hello, I hope you can help me! I`m trying to tune svm parameters: cost and gamma for a landsat image classification, but I get an error and I can't understand it. I write this: > tune(svm, Class~., data = mdt01bis, ranges = list(gamma = 2^(-15:3), cost > = 2^(-5:15))) and R gives: Error en predict.svm(model, if (!is.null(validation.x)) validation.x else if (useFormula)
2003 Nov 14
6
index of max value ?
Is there a function in R, which would return index of maximum value in a vector ? e.g. > v <- round(10*rnorm(8)) > v [1] 6 -3 -6 15 7 9 0 -19 > max(v) [1] 15 ??? index.max(v) ??? 4
2004 Dec 01
1
tuning SVM's
Hi I am doing this sort of thing: POLY: > > obj = best.tune(svm, similarity ~., data = training, kernel = "polynomial") > summary(obj) Call: best.tune(svm, similarity ~ ., data = training, kernel = "polynomial") Parameters: SVM-Type: eps-regression SVM-Kernel: polynomial cost: 1 degree: 3 gamma: 0.04545455 coef.0: 0
2012 Sep 17
0
How to use tune.svm or tune(svm...) for regression
I dont know how to tell to the function 'svm' in this two cases: tune.svm or tune (svm...) the type (I want regression, but by default it works with classification) and the specify kind of kernel (by default it work with radial)... thank you so much!!! -- View this message in context: http://r.789695.n4.nabble.com/How-to-use-tune-svm-or-tune-svm-for-regression-tp4643331.html Sent
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>
2004 Jun 09
4
how to initialize random seed properly ?
I want to start R processes on multiple processors from single shell script and I want all of them to have different random seeds. One way of doing this is sleep 2 # (with 'sleep 1' I am often getting the same number) ... set.seed(unclass(Sys.time())) Is there a simpler way without a need to sleep between invoking different R processes ? Ryszard
2006 Nov 03
1
R CMD BATCH: unable to start device PNG
And on that note, here is a function that I use to get around it: -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Jeffrey Horner Sent: Friday, November 03, 2006 10:01 AM To: ryszard.czerminski at novartis.com Cc: r-help at stat.math.ethz.ch Subject: Re: [R] R CMD BATCH: unable to start device PNG ryszard.czerminski
2004 Jan 06
2
dist(x,y)
Hi Ryszard! There is a dist function in R. It's in the mva package. You can set the kind of distance that you want. Thanks, Erin mailto:hodgess at gator.uhd.edu
2003 Oct 27
2
how to select random rows ?
How can I select random subsets (rows!) from a data set ? If I generate simple data set > a <- data.frame(x=1:2, y = NaN, z = 2:1) > a x y z 1 1 NaN 2 2 2 NaN 1 I can select random subsets (colums) very easily using sample function: > sample(a, 2) z y 1 2 NaN 2 1 NaN I expected that using transpose of a would do the same for rows, but I am getting rather unexpected
2004 May 27
1
R-1.9.0: Error in paste(ncomp, "LV's") : Argument "ncomp" is missing, with no default
Is it just my installation or bug in 1.9.0 ? The same thing works fine in 1.8.1 Best regards, Ryszard # R-1.9.0 library(pls.pcr) nr <- 8; ndim <- 2 x <- matrix(rnorm(nr*ndim), nrow=nr) y <- as.matrix(x[,1]) for (i in 2:ndim) y <- y + x[,i] y <- y + rnorm(length(y)) m <- pls(x,y,validation='CV') # Error in paste(ncomp, "LV's") : Argument
2004 Mar 11
1
how to pass extra parameters using call() or similar mechanism ?
I am trying to write a function, which would allow to call various methods and would pass to them extra arbitrary parameters. My first attempt was to use call() as illustrated below, but apparently '...' cannot be used in such context. How can this be achieved ? Best regards, Ryszard > myfun <- function(method, x, ...) { + v <- eval(call(method, x, ...)) + } > method =
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