Re: [R] bagged importance estimates in earth problem
Thanks for your response Gavin. I get the same error as I noted before when running the example from bagEarth. earth and caret are the most recent versions (on the MAC) available on CRAN binaries, 2.0-5 and 3.45 respectively. I see that the CRAN checks for caret lists an error status for version 4.15 r-release-macosx-ix86, which is probably why it is not available in binary form. I also suspect, but am not sure, that this is why varImp fails. Joe --- On Sat, 5/16/09, Gavin Simpson gavin.simp...@ucl.ac.uk wrote: From: Gavin Simpson gavin.simp...@ucl.ac.uk Subject: Re: [R] bagged importance estimates in earth problem To: Joseph Retzer joe_ret...@yahoo.com Cc: R help r-h...@stat.math.ethz.ch Date: Saturday, May 16, 2009, 5:19 PM On Sat, 2009-05-16 at 08:57 -0700, Joseph Retzer wrote: I was trying to produced bagged importance estimates of attributes in earth using the caret package with the following commands: fit2 - bagEarth(loyalty ~ ., data=model1, B = 10) bagImpGCV - varImp(fit2,value=gcv) My bootstrap estimates are produced however the second command varImp produces the following error: Error in UseMethod(varImp) : no applicable method for varImp Not sure what is going on, any advice would be appreciated, The example in ?bagEarth works for me with caret and earth loaded library(earth) data(trees) fit1 - earth(trees[,-3], trees[,3]) fit2 - bagEarth(trees[,-3], trees[,3], B = 10) varImp(fit2) Overall Girth 100.00 Height 2.387985 packageDescription(earth)$Version [1] 2.3-2 packageDescription(caret)$Version [1] 4.15 Have you loaded the relevant packages and are they up-to-date? Can you run the example above? If the example works, then you'll probably need to supply data and code that fails for you or contact the package maintainer for expert help. HTH G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] bagged importance estimates in earth problem
Max, If you read my message closely, you'll see I'm indicating that the check error may explain why carat 4.15 _is not available in CRAN binaries_. Because of this (not having the latest version) I suspect varImp is returning the error I detailed. Can you provide information as to why 4.15 is not available? That would be useful. Also, as far a reproducible example is concerned, I noted that the example in bagEarth produces the same error as my original problem (i.e. I can reproduce the error on my machine with that code/data which is also available to others). Again, a more careful read of my original email would have made that clear. Thanks, --- On Mon, 5/18/09, Max Kuhn mxk...@gmail.com wrote: From: Max Kuhn mxk...@gmail.com Subject: Re: [R] bagged importance estimates in earth problem To: Joseph Retzer joe_ret...@yahoo.com Cc: gavin.simp...@ucl.ac.uk, R help r-h...@stat.math.ethz.ch Date: Monday, May 18, 2009, 12:08 PM Joe, On Mon, May 18, 2009 at 11:01 AM, Joseph Retzer joe_ret...@yahoo.com wrote: Thanks for your response Gavin. I get the same error as I noted before when running the example from bagEarth. earth and caret are the most recent versions (on the MAC) available on CRAN binaries, 2.0-5 and 3.45 respectively. That is probably your problem. caret is at 4.15 and earth is now at 2.3-2. caret 3.45 was released on 2008-10-17 and many changes have been made to both packages since then. I see that the CRAN checks for caret lists an error status for version 4.15 r-release-macosx-ix86, which is probably why it is not available in binary form. I also suspect, but am not sure, that this is why varImp fails. No, not at all true. I build it on OS X and R-Forge checks it every night. Please don't extrapolate, especially if you haven't sent a reproducible example. Max [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] bagged importance estimates in earth problem
Thanks for the info. some notes below: --- On Mon, 5/18/09, Max Kuhn mxk...@gmail.com wrote: From: Max Kuhn mxk...@gmail.com Subject: Re: [R] bagged importance estimates in earth problem To: Joseph Retzer joe_ret...@yahoo.com Cc: gavin.simp...@ucl.ac.uk, R help r-h...@stat.math.ethz.ch Date: Monday, May 18, 2009, 1:03 PM If you read my message closely, you'll see I'm indicating that the check error may explain why carat 4.15 _is not available in CRAN binaries_. Because of this (not having the latest version) I suspect varImp is returning the error I detailed. Ok, but your diagnosis of the issue may have been careless. More speculation than diagnosis, but that's your opinion. Can you provide information as to why 4.15 is not available? That would be useful. It is available here: http://cran.r-project.org/src/contrib/Archive/caret Do you mean a binary for OS X? If so, you can look more closely at the caret Results link: http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/caret-00check.html you'll see it doesn't build because one of the dependencies (proxy) isn't installed on the test machine. The package homepage listed in the DESCRIPTION file shows the package building on OS X without any errors. There is a OS X binary for the latest version there. I suggest using the OS X disk (or the apple website) to install Xcode and build packages from source. You're almost always better off installing packages in that way. This is very useful information. I did not realize this was best practice and/or necessary generally speaking. Thanks for letting me know. Also, I did look closely at the source code. The latest release is 4.12 which compiled with errors on my machine, not sure why. Also, as far a reproducible example is concerned, I noted that the example in bagEarth produces the same error as my original problem (i.e. I can reproduce the error on my machine with that code/data which is also available to others). Again, a more careful read of my original email would have made that clear. It is not reproducible if it works for me and others. It is reproducible using the latest binaries on CRAN, I _think_. However I don't know of anyone other than myself who has tried. Sorry for the frustration, but in your original email you didn't follow the posting guide: email the package author first, provide information about your system or an example that I can try. No need to apologize, I appreciate knowing the source of the problem. I should have contacted you directly however it did not seem to be an issue with the package, my mistake. If you dig around a little, I think the issues would be more clear, especially why there is no OS X binary. Running code with the latest CRAN binaries available and having problems seems to me to justify a brief note asking for help. Also note that I checked the documentation, the CRAN binaries and source files and past listserve messages. I appreciate your information though since it makes clear what the problem actually is. Max [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] bagged importance estimates in earth problem
I was trying to produced bagged importance estimates of attributes in earth using the caret package with the following commands: fit2 - bagEarth(loyalty ~ ., data=model1, B = 10) bagImpGCV - varImp(fit2,value=gcv) My bootstrap estimates are produced however the second command varImp produces the following error: Error in UseMethod(varImp) : no applicable method for varImp Not sure what is going on, any advice would be appreciated, Thanks, Joe Retzer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Thin frame line around R pdf output in LaTeX
Thanks for the information, and correcting my poorly written post. Applying the patch solved the problem. Joe Retzer --- On Sat, 7/26/08, Prof Brian Ripley [EMAIL PROTECTED] wrote: From: Prof Brian Ripley [EMAIL PROTECTED] Subject: Re: [R] Thin frame line around R pdf output in LaTeX To: Joseph Retzer [EMAIL PROTECTED] Cc: R help [EMAIL PROTECTED] Date: Saturday, July 26, 2008, 2:58 AM There is no 'R 2.7' (see the posting guide). Have you followed the advice in the posting guide of using the latest (R-patched) version of R? I believe that this has been fixed since 2.7.0. Please note Mac-specific issues as such on the subject line, and preferably ask them on the R-sig-mac list. What you describe is *not* 'R pdf output', but MacOS X pdf output from R.app. Apart from not assigning blame to innocent parties (such as the authors of the pdf() device), it helps people to help you if you don't use misleading descriptions. On Fri, 25 Jul 2008, Joseph Retzer wrote: I'm using R 2.7 on an Intel MAC. When I produce a pdf graph, I save the output window from the menu to a pdf file. This gives a very nice quality graph. Eh? I think you mean when you plot on a quartz() device and save its output to PDF, this is what happens. You will get high (not just 'nice') quality output by using the pdf() device directly, and you can also use quartz(type=pdf). However when I include the graph in a LaTeX document (actually beamer presentation) using \includegraphics I get a graphic with a very light framebox around the outside. Note, I'm not using a fbox command in LaTeX. Not sure if this is something produced in R, LaTeX or beamer but if anyone has any suggestions (for getting rid of the frame) I'd greatly appreciate hearing from you. Thanks all, Joe Retzer -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Cluster Package - Clara w/ categorical variables
I'm running a cluster analysis with many observations (approx. 7,000) using both continuous and categorical variables. PAM is a theoretically appealing approach however I believe the number of observations makes its use untenable. CLARA, which uses the PAM algorithm seems like the algorithm to use however it requires a numeric data matrix or data frame with rows corresponding to cases and columns to variables. Since a dissimilarity matrix is not legitimate input (to CLARA) and since a data matrix with categorical variables is also inappropriate, it seems that CLARA may only be run on numeric data. If thats true, I'm wondering what the benefit is in using the PAM algorithm (a generalization of K-means which, in part, addresses inclusion of categorical variables). My guess is I'm missing something, any insight would be appreciated. Many thanks, Joe Retzer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] CLUE package consensus function cl_medoid behavior
When using cl_medoid to create a consensus clustering I've noticed that the list element in the resulting object containing the cluster assignments by case will switch between the [1] and [3] positions. This has happened when re-running the code without changes. Has anyone else experienced this and/or is there a reason this would happen? Thanks, Joe [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.