Re: [R] statdataml question

2007-08-20 Thread David Meyer
Bryan: Hi, I was wondering if Statdataml is currently the preferred way to represent statistical data in XML in R. This is hard to tell. We think it is a _possible_ way doing that. Do you have some alternatives in mind? And also if the Statdataml api provides ways to load the XML as a

Re: [R] nnet 10-fold cross-validation

2007-07-24 Thread David Meyer
Hi all, there is tune() in the e1071 package for doing this in general, and, among others, a tune.nnet() wrapper (see ?tune): tmodel = tune.nnet(Species ~ ., data = iris, size = 1:5) summary(tmodel) Parameter tuning of `nnet': - sampling method: 10-fold cross validation - best

[R] [R-pkgs] package relations updated

2007-07-10 Thread David Meyer
., symmetry, transitivity, etc.). David and Kurt. -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Tel: +43-1-313 36 4393 Fax: +43-1-313 36 90 4393 HP: http://wi.wu

[R] [R-pkgs] New package proxy for distances and similiarities

2007-07-09 Thread David Meyer
Dear useRs, a new package for computing distance and similarity matrices made it to CRAN, and will propagate to the mirrors soon. It includes an enhanced version of dist() with support for more than 40 popular similarity and distance measures, both for auto- and cross-distances. Some

[R] Problems with e1071 and SparseM

2007-07-09 Thread David Meyer
Chris: yes, this is indeed a bug (in predict.svm) - will be fixed in the next release of e1071. Thanks for pointing this out, David -- Hello all, I am trying to use the svm method provided by e1071 (Version: 1.5-16) together with a matrix provided by the SparseM

Re: [R] Question for svm function in e1071

2007-07-06 Thread David Meyer
Adschai: The function is written in C++, so debugging the source code of the R svm() function will not really help. What you can do to make the C-code more verbose is the following: - get the sources of e1071 - in the src/ directory, look up the svm.cpp file - In line 37, there is: #if 0

Re: [R] Question about framework to weighting different classes in SVM

2007-07-05 Thread David Meyer
Adschai: here is an example for class.weights (isn't it on the help page?): data(iris) i2 - iris levels(i2$Species)[3] - versicolor summary(i2$Species) wts - 100 / table(i2$Species) wts m - svm(Species ~ ., data = i2, class.weights = wts) Cheers, David

[R] [R-pkgs] New package: relations

2007-06-04 Thread David Meyer
Dear useRs, it is our great pleasure to announce the new package relations to appear on all CRAN-mirrors soon. This package provides data structures and methods for creating and manipulating relations, relation ensembles, sets, and tuples. The feature list includes: * creation of relations by

[R] string edit distance

2007-04-10 Thread David Meyer
It's in package cba (sdists()). David -- I have a column of words, for example DOG DOOG GOD GOOD DOOR ... and I am interested in creating a matrix that contains the string edit distances between each pair of words. I am this close - ' ' - to writing the algorithm myself

Re: [R] training svm

2007-03-18 Thread David Meyer
Oldrich: The columns in data passed to svm need to contain only numeral values. This is not correct, svm() of course also accepts factors and then builds a model matrix similar to lm(). But it won't accept, e.g., character vectors. I simply assigned a number to each category of each

[R] distance metrics

2007-03-13 Thread David Meyer
Hello: Does anyone know if there exists a package that handles methods for [ for dist objects? I would like to access a dist object using matrix notation e.g. dMat = dist(x) dMat[i,j] You can use the [[ operator defined for distance matrices currently

Re: [R] PROC TABULATE with R

2007-03-01 Thread David Meyer
! -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Tel: +43-1-313 36 4393 Fax: +43-1-313 36 90 4393 HP: http://wi.wu-wien.ac.at/~meyer

[R] training svm

2007-02-27 Thread David Meyer
Hello (whoever you are), your data looks problematic. What does head(ne_span_data) reveal? BTW, svm() will not handle NA values. Best David - Hello. I'm new to R and I'm trying to solve a classification problem. I have a training dataset of about 40,000 rows and 50

[R] contingency table for several variables

2007-02-21 Thread David Meyer
David: I ‘m trying to draw ONE table that summarize SEVERAL categorical variables according to one classification variable, say “sex”. The result would look like several contingency tables appended one to the other. All the variables belong to a data frame. The summary.formula in

[R] naiveBayes question

2007-01-22 Thread David Meyer
Aimin: The problem is that the columns you choose for training (only 4 variables) do not match the ones used for prediction (all except y). David I try to use naiveBayes p.nb.90-naiveBayes(y~aa_three+bas+bcu+aa_ss,data=training)

Re: [R] svm plot question

2006-12-09 Thread David Meyer
. it doesn't work. It is pity not saving my original code. Now the question is the plot I get using your code is different from what I got before. Moreover I did remember I use plot(m.svm,p5.new,As~Cur) Do you know why? Thanks, Aimin At 06:32 AM 12/8/2006, David Meyer wrote: Aimin: 1

Re: [R] svm plot question

2006-12-08 Thread David Meyer
.new,As~Cur) Error in scale(newdata[, object$scaled, drop = FALSE], center = object$x.scale$scaled:center, : (subscript) logical subscript too long -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration

Re: [R] vcd package, assoc()

2006-12-06 Thread David Meyer
version of R is this? R-2.4.0, R-patched or R-devel? -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Tel: +43-1-313 36 4393 Fax: +43-1-313 36 90 4393 HP: http://wi.wu

[R] package e1071 - class probabilities

2006-09-30 Thread David Meyer
Vince: the implementations for both are different, so this might happen (although undesirably). Can you provide me an example with data (off-list)? David __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] comparing 2 odds ratios

2006-06-27 Thread David Meyer
by testing whether the 2 odds ratios are the same? -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Tel: +43-1-313 36 4393 Fax: +43-1-313 36 90 4393 HP: http://wi.wu-wien.ac.at

[R] Getting SVM minimized function value

2006-04-17 Thread David Meyer
the package e1071) but I have not succeed. Does anyone knows a way to get that value? Pau -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Tel: +43-1-313 36 4393 Fax: +43-1-313 36

[R] Predict function for 'newdata' of different dimension in svm

2006-03-31 Thread David Meyer
-.default(`*tmp*`, value = c(1, 2, 3, 4, 5, : 'names' attribute [175] must be the same length as the vector [50] What am I missing? Why would the row names have to be the same? Thanks so much, Sandra McBride -- Dr. David Meyer Department of Information Systems and Operations Vienna

[R] Fixed legend in vcd/mosaicplot

2006-03-22 Thread David Meyer
Dieter, there is no way of fixing the range of the residuals yet, we will add sth. like a ylim argument to legend_foo(). Thanks for pointing this out, David PS: there is no mosaicplot() function in vcd, but a mosaic() ... -- Dr. David Meyer Department of Information Systems and Operations

[R] Help with plot.svm from e1071

2006-01-23 Thread David Meyer
~., data = cats) plot(m, cats) I don't see what the difference between their example and mine. -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Fax: +43-1-313 36x746 Tel

[R] e1071::SVM calculate distance to separating hyperplane

2006-01-05 Thread David Meyer
: How can one (elegantly) calculate the distance between data points (in the transformed space, I suppose) and the hyperplane that separates the 2 categories when using svm() from the e1071 library? thanks a lot, Hans -- Dr. David Meyer Department of Information Systems and Operations Vienna

Re: [R] str and structable error

2005-11-28 Thread David Meyer
] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business

[R] [R-pkgs] vcd package 0.9-5 released

2005-10-20 Thread David Meyer
pairs_diagonal_text() for pairs() * The alternative legend function legend_fixed() now looks more similar to the legend of mosaicplot() in base R Comments are more then welcome! David, Achim, Kurt. PS: If you like modern art, try out demo(mondrian)! :) -- Dr. David Meyer Department of Information Systems

[R] how to use tune.knn() for dataset with missing values

2005-10-06 Thread David Meyer
Well, since knn() can't handle incomplete data as it says, you can choose to either omit incomplete observations (e.g., using na.omit()), or to impute the data if the conditions are met (missingness at random, ...); see, e.g., packages cat, mix, norm, and e1071 for that. HTH, David

Re: [R] How to insert a certain model in SVM regarding to fixed kernels

2005-08-12 Thread David Meyer
http://mail.yahoo.com -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Fax: +43-1-313 36x746 Tel: +43-1-313 36x4393 HP: http://wi.wu-wien.ac.at/~meyer

Re: [R] How to insert a certain model in SVM regarding to fixed kernels

2005-08-12 Thread David Meyer
. Cheers, David Its possible that what works already is enough for Amir. For example, library(e1071) library(dyn) set.seed(1) y - ts(rnorm(100)) y.svm - dyn$svm(y ~ lag(y)) yp - predict(y.svm) ts.plot(y, yp, col = 1:2) On 8/12/05, David Meyer [EMAIL PROTECTED] wrote: Amir

Re: [R] setting weights for such a two-class problem in nnet and svm

2005-07-24 Thread David Meyer
for class one, 49 for class 2. How do I do that? Just weights=49? Meanwhile I'd like to try svm(e1071), again, how do I setup class.weights? Thanks. -- Dr. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien

[R] [R-pkgs] New version of vcd package

2005-07-05 Thread David Meyer
. David Meyer Department of Information Systems and Operations Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Fax: +43-1-313 36x746 Tel: +43-1-313 36x4393 HP: http://wi.wu-wien.ac.at/~meyer/ ___ R

Re: [R] svm and scaling input

2005-06-29 Thread David Meyer
completely wrong ... or obvious. Will the svm automatically expand the factors into a binary matrix? yes. If I add numeric variables outside the range of 0 to 1 do I have to scale them to have 0 to 1 range? svm() will scale your data by default. Cheers, David -- Dr. David Meyer

Re: [R] Running SVM {e1071}

2005-06-29 Thread David Meyer
Dear David, Dear Friends, After any running svm I receive different results of Error estimation of 'svm' using 10-fold cross validation. using tune.svm(), or the `cross' parameter of svm()? What is the reason ? It is caused by the algorithm, libsvm , e1071 or something els? The

[R] SVM parameters...

2005-06-27 Thread David Meyer
Vivek, I certainly would agree that every help page, including the one of svm(), could be improved, but I think it is not _that_ deficient. In particular, it tells you which parameters are used in the various kernels available. Have you read the corresponding article in R News (basically

Re: [R] best.svm

2005-05-24 Thread David Meyer
Stephen: you need to supply the parameter ranges, your call did not tune anything at all. best.svm() is really just a wrapper for tune.svm(...)$best.model. The help page for 'tune()' will tell you more on the available options. HTH, David [...] svm.model =

[R] tune.svm in {e1071}

2005-05-20 Thread David Meyer
( ) ? these are not possible? I receive only Error estimation of 'svm' with model and summary(model) functions. Clear from the above, I think. HTH, David Best Wishes and so many thanks, Amir -- Dr. David Meyer Department of Information Systems and Process Management Vienna University

[R] SVM linear kernel and SV

2005-05-13 Thread David Meyer
Thank you for your answer, but my problem concerns the support vectors. Indeed the two classes are well separated and the hyperplane is linear but the support vectors aren't aligned in parallel to the hyperplane. And according to me, the support vectors (for each class) should be aligned

[R] SVM linear kernel and SV

2005-05-12 Thread David Meyer
-- Dr. David Meyer Department of Information Systems and Process Management Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Fax: +43-1-313 36x746 Tel: +43-1-313 36x4393 HP: http://wi.wu-wien.ac.at/~meyer

[R] Status

2005-04-29 Thread david . meyer
ALERT! This e-mail, in its original form, contained one or more attached files that were infected with a virus, worm, or other type of security threat. This e-mail was sent from a Road Runner IP address. As part of our continuing initiative to stop the spread of malicious viruses, Road Runner

Re: [R] Error using e1071 svm: NA/NaN/Inf in foreign function call

2005-04-28 Thread David Meyer
Joao: 1) The error message you get when setting nu=0 is due to the fact that no support vectors can be found with that extreme restriction, and this confuses the predict function (try svm(, fitted = false): the model returned is empty). In fact, the C++ code interfaced by svm() clearly allows

[R] read.matrix.csr bug (e1071)?

2005-01-29 Thread David Meyer
This is a bug, thanks for pointing this out. Fixed for the next release of e1071. David - Hello, I would like to read and write sparse matrices using the functions write.matrix.csr() and read.matrix.csr() of the package e1071. Writing is OK but reading back the matrix fails:

Re: [R] probabilty calculation in SVM

2005-01-16 Thread David Meyer
Raj: The references given on the help page will tell you. Best, David - Hi All, In package e1071 for SVM based classification, one can get a probability measure for each prediction. I like to know what is method that is used for calculating this probability. Is it calculated using

Re: [R] How to interpret and modify plot.svm?

2004-12-23 Thread David Meyer
I updated the e1071 package but still can't find the other three arguments for plot.svm. It's in e1071 since version 1.5-3. (current version: 1.5-4). In addition, I can plot a gray-colored contour region by adding the argument col = c(gray(0.2), gray(0.8)). But I failed to change those

[R] Rgui.exe - Error while tuning svm

2004-12-23 Thread David Meyer
0x. Der Vorgang read konnte nicht auf dem Speicher ausgef_hrt werden. . Which version of e1071 are you using? There has been a memory leak problem until 1.5-1 which could very well cause this null pointer exception... best, David -- Dr. David Meyer Department of Information Systems

Re: [R] erro in SVM (packsge e1071)

2004-12-19 Thread David Meyer
-regression. It is an omission in the ?svm help page? Or am I notundestanding something? I believe it has something to do with the calculus of the eigenvalues. Anyway how can I overpass this problem? Increasing the training data (is around 900 records)? Thanks for any help Joao -- Dr. David

[R] Problem with SVM and scaling

2004-12-17 Thread David Meyer
. David Meyer Department of Information Systems Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Fax: +43-1-313 36x746 Tel: +43-1-313 36x4393 HP: http://wi.wu-wien.ac.at/~meyer/ __ [EMAIL PROTECTED

[R] How to interpret and modify plot.svm?

2004-12-17 Thread David Meyer
of predicted values. Best, -d Thank you very much, Frank -- Dr. David Meyer Department of Information Systems Vienna University of Economics and Business Administration Augasse 2-6, A-1090 Wien, Austria, Europe Fax: +43-1-313 36x746 Tel: +43-1-313 36x4393 HP: http://wi.wu-wien.ac.at/~meyer

[R] svm- class.weights

2004-12-09 Thread David Meyer
Uwe: [the language of the list is English!] Try using a *factor* for classification. The described behavior (segfault when using class.weights with a *numeric* dependent variable) should be fixed in the current version of e1071 (1.5-2), so please check if you are using the latest version of

[R] tuning SVM's

2004-12-01 Thread David Meyer
but it seems a good way to measure if your results might be by chance. Two questions: Any comments on Kappa and what it might be telling me? What can I do to tune my kernels further? Stephen -- Dr. David Meyer Department of Information Systems Vienna University of Economics and Business

[R] Re: What is nu-regression for svm?

2004-09-20 Thread David Meyer
; charset=ISO-8859-1 Does anyone knows what is the nu-regression option for the type parameter in svm (from package e1071)? I cannot find any explanation on that and I have a reasonable understanding on svm fundamentals. Thanks Joao Moreira - David Meyer Department of Information

[R] Re: R library(e1071) question: definition of performance in tune.* functions

2004-07-13 Thread David Meyer
might want to check if your target variable is indeed a factor. In case it is and you still get values greater than 1, drop me a mail with a piece of code (and data) enabling me to reproduce the phenomenon. Best, David -- Dr. David Meyer Department of Information Systems Vienna University

Re: [R] reading a sparse matrix into R

2004-04-28 Thread David Meyer
Have you considered the read.matrix.csr() function in pkg. e1071? It uses another sparse input format, but perhaps you can easily transform your data in the supported one. Also, in my experience, data frames are not the best basis for a sparse format since they might turn out to be very memory

[R] SVM question

2004-03-22 Thread David Meyer
validation out the svm? I mean e.g. numbers about the true positives ,fp,fn,tf ? No, because the accuracies are not computed using a confusion matrix. The computation is internally done in C. How do I get a list of the classified examples ? -- Dr. David Meyer Department of Information Systems

[R] Re: R-help Digest, Vol 13, Issue 14

2004-03-15 Thread David Meyer
You could look at @Article{ e1071-papers:meyer+leisch+hornik:2003, author= {David Meyer and Friedrich Leisch and Kurt Hornik}, title = {The Support Vector Machine under Test}, journal = {Neurocomputing}, year = 2003, month = {September

[R] SVM unbalanced classes

2004-03-09 Thread David Meyer
You might consider using the `weight' argument of svm(). Best, David. Hi! I am using R 1.8.1 and the svm of the e1071 package for classification. The problem is that I have unbalanced classes e.g. the first one is much bigger than the second one and therfore the svm is biased to the first

Re: [R] svm in e1071 package: polynomial vs linear kernel

2003-11-03 Thread David Meyer
On Mon, 3 Nov 2003 [EMAIL PROTECTED] wrote: 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

Re: [R] problem with tune.svm

2003-10-31 Thread David Meyer
On Fri, 31 Oct 2003 [EMAIL PROTECTED] wrote: rng - list(gamma = 2^(-1:1), cost = 2^(2:4)) rng $gamma [1] 0.5 1.0 2.0 $cost [1] 4 8 16 obj - tune.svm(pIC50 ~ ., data = data, ranges = rng) Error in tune(svm, train.x = x, data = data, ranges = ranges, ...) : formal

Re: [R] svm from e1071 package

2003-10-29 Thread David Meyer
This suggests to me that data are scrambled each time - the last time I looked at libsvm python interface this is what was done. Is this the same here (I hope) ? yes. g., David __ [EMAIL PROTECTED] mailing list

Re: [R] Logit reality check

2003-09-28 Thread David Meyer
If I try the model below, R seems to grumble with a complaint. glm(cbind(Y,1-Y) ~ X, family = binomial) non-integer counts in a binomial glm! in: eval(expr, envir, enclos) For binomial models (as described in the help page), the response must be either a factor or a n x 2 matrix with

Re: [R] How to detect which function is used for e.g. printing an object of a given class

2003-09-24 Thread David Meyer
Is there an alternative way of dispatching the printing, such that the usual print method for loglm is used after doing what is special for hllm? You might want to have a look at `NextMethod()' Best, David __ [EMAIL PROTECTED] mailing list

Re: [R] problem with HoltWinters

2003-09-03 Thread David Meyer
will change the code to give a better error message in such cases. Best, David. On 2003.09.03 18:32, Luis Miguel Almeida da Silva wrote: The data goes in attachment. I used ts to create data.ts data.ts-ts(data=data,start=c(2001,1),frequency=12) -Original Message- From: David Meyer

Re: [R] R, geochemistry, ternary diagrams

2003-07-15 Thread David Meyer
And in package vcd function ternaryplot(). g., -d On 2003.07.15 09:33, Tobias Verbeke wrote: Are there enough geochemists using R already that he'd find like-minded people to discuss technical issues with if he _did_ switch to R? Is there a package somewhere already that does ternary and

Re: [R] Can't load e1071

2003-06-24 Thread David Meyer
Andrew, 1) The current R version is 1.7.1 2) Which version of `e1071' are you using? 3) Does the `e1071.so' file exist (in e1071/libs)? best, David. On 2003.06.24 21:43, Andrew Perrin wrote: After upgrading to 1.7.0 under debian linux, I can't get e1071 working properly. The first problem I had

Re: [R] formula (joint, conditional independence, etc.) - mosaicplots

2003-06-13 Thread David Meyer
On 2003.06.13 02:11, g wrote: Hi, Can someone set me straight as to how to write formulas in R to indicate: complete independence [A][B][C] Freq ~ A + B + C joint independence [AB][C] Freq ~ A * B + C conditional independence [AC][BC] Freq ~ A * C + B * C nway interaction

Re: [R] Code for Support Vector Clustering Algorithm

2003-06-12 Thread David Meyer
On 2003.06.12 09:15, Uwe Ligges wrote: Iouri Tipenko wrote: Dear R-Users, I'm a master student in Mathematics and Statistics at Carleton University, Ottawa, Canada. I'm studying Clustering methods including different related algorithms. One of them is Support Vector Clustering algorithm. I was

Re: [R] Code for Support Vector Clustering Algorithm

2003-06-12 Thread David Meyer
Support Vector Machines Description: `svm' is used to train a support vector machine. It can be used to carry out general regression and classification (of nu and epsilon-type), as well as density-estimation. A formula interface is provided. David Meyer [EMAIL PROTECTED] wrote

Re: [R] Error Compiling e1071

2003-06-07 Thread David Meyer
I am trying to compile the package e1071 (version 1.3-11) with R CMD INSTALL. I tried with R 1.7.0 on Redhat Linux 2.4.7-10 and R 1.6.2 on Linux 2.4.9-34smp but keep getting the same error message during configure : WARNING: g++ 2.96 cannot reliably be used with this package. Please use

Re: [R] Goodness of fit tests

2003-03-29 Thread David Meyer
Try `goodfit' in package `vcd'. g., -d Mag. David MeyerWiedner Hauptstrasse 8-10 Vienna University of Technology A-1040 Vienna/AUSTRIA Department of Tel.: (+431) 58801/10772 Statistics and Probability Theory Fax.: (+431) 58801/10798 On Sat

Re: [R] RODBC and Excel in Widows

2003-03-26 Thread David Meyer
__ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help -- Mag. David MeyerWiedner Hauptstrasse 8-10 Vienna University of Technology A-1040 Vienna/AUSTRIA Department of Tel.: (+431