Re: [R] CARET and NNET fail to train a model when the input is high dimensional

2013-03-06 Thread James Jong
up on stack exchange too. Max On Tue, Mar 5, 2013 at 9:47 PM, James Jong ribonucle...@gmail.com wrote: The following code fails to train a nnet model in a random dataset using caret: nR - 700 nCol - 2000 myCtrl - trainControl(method=cv, number=3, preProcOptions=NULL, classProbs

[R] CARET and NNET fail to train a model when the input is high dimensional

2013-03-05 Thread James Jong
The following code fails to train a nnet model in a random dataset using caret: nR - 700 nCol - 2000 myCtrl - trainControl(method=cv, number=3, preProcOptions=NULL, classProbs = TRUE, summaryFunction = twoClassSummary) trX - data.frame(replicate(nR, rnorm(nCol))) trY -

[R] CARET. Relationship between data splitting trainControl

2013-02-19 Thread James Jong
I have carefully read the CARET documentation at: http://caret.r-forge.r-project.org/training.html, the vignettes, and everything is quite clear (the examples on the website help a lot!), but I am still a confused about the relationship between two arguments to trainControl: method index and the

Re: [R] CARET: Any way to access other tuning parameters?

2013-02-14 Thread James Jong
: http://caret.r-forge.r-project.org/training.html Max On Wed, Feb 13, 2013 at 9:58 AM, James Jong ribonucle...@gmail.comwrote: The documentation for caret::train shows a list of parameters that one can tune for each method classification/regression method. For example, for the method

[R] party::cforest - predict?

2013-02-14 Thread James Jong
What is the function call interface for predict in the package party for cforest? I am looking at the documentation (the vignette) and ?cforest and from the examples I see that one can call the function predict on a cforest classifier. The method predict seems to be a method of the class

[R] CARET: Any way to access other tuning parameters?

2013-02-13 Thread James Jong
The documentation for caret::train shows a list of parameters that one can tune for each method classification/regression method. For example, for the method randomForest one can tune mtry in the call to train. But the function call to train random forests in the original package has many other

Re: [R] CARET: Any way to access other tuning parameters?

2013-02-13 Thread James Jong
/training.html Max On Wed, Feb 13, 2013 at 9:58 AM, James Jong ribonucle...@gmail.comwrote: The documentation for caret::train shows a list of parameters that one can tune for each method classification/regression method. For example, for the method randomForest one can tune mtry in the call to train

[R] caret: Errors with createGrid for rf (randomForest)

2013-02-12 Thread James Jong
When I try to crate a grid of parameters for training with caret I get various errors: my_grid - createGrid(rf) Error in if (p = len) { : argument is of length zero my_grid - createGrid(rf, 4) Error in if (p = len) { : argument is of

Re: [R] caret: Errors with createGrid for rf (randomForest)

2013-02-12 Thread James Jong
That was the problem. Thanks David! James On Tue, Feb 12, 2013 at 2:08 PM, David Winsemius dwinsem...@comcast.netwrote: On Feb 12, 2013, at 10:53 AM, James Jong wrote: When I try to crate a grid of parameters for training with caret I get various errors

[R] Putting priors on which factors to sample more from, in random forests

2013-02-12 Thread James Jong
I was wondering if anyone knows of a random forest implementation (or way of tweaking the standard randomForest library) that allows one to specify some sort of variable importance a* *priori. For example, say that I know that some variables/factors could be more informative than others for

[R] Statistics of prediction for multiple models with caret

2013-02-10 Thread James Jong
I am trying to get statistics of prediction for binary classification problems and for various training models with caret. Below is an example that illustrates my need: -- library(caret) # ... Get X and Y for training a binary classification problem. X is

[R] Training with very few positives

2013-02-10 Thread James Jong
I have a binary classification problem where the fraction of positives is very low, e.g. 20 positives in 10,000 examples (0.2%) What is an appropriate cross validation scheme for training a classifier with very few positives? I currently have the following setup:

[R] Questions about caret - Best place to ask?

2013-02-09 Thread James Jong
Hi there. I am relatively new to R and to the community. I have previously asked my R questions at R-help (through Nabble, not sure if there is a better way other than Nabble or regular email), and StackOverflow with the [R] tag. I have some questions that are somewhat specific about the

[R] Correct value of R_HOME

2013-02-09 Thread James Jong
What is the purpose of the variable R_HOME? What value should I set it to? Thanks, James [[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

[R] rpy2 (Python -- R)

2013-02-09 Thread James Jong
Hi - I am having trouble installing rpy2. I have already compiled R as a shared library, but I do not have admin privileges on so I am trying to install rpy2 with: pip install -user rpy2 but I am getting the following error:

[R] Sourcing my file does not print command outputs

2013-02-07 Thread James Jong
I looked at the documentation of source() and summary(), and I could not find the reason why calling something like: summary(resamps) from the command line, works (it prints the summary) whereas calling summary(resampls) from a file that I source with source(my_file.r) does not print

[R] Saving history across sessions

2013-02-07 Thread James Jong
I have an environment variable `$R_HISTFILE` pointing to `/home/my.username/.RHistory` and the following code in my `.Rprofile` in my home directory: .Last - function() { if (!any(commandArgs()=='--no-readline') interactive()){ require(utils)

Re: [R] Sourcing my file does not print command outputs

2013-02-07 Thread James Jong
) nord...@dshs.wa.gov wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of John Kane Sent: Thursday, February 07, 2013 10:57 AM To: James Jong; r-help@r-project.org Subject: Re: [R] Sourcing my file does not print command

[R] Saving model and other objects from caret

2013-02-07 Thread James Jong
Say I train a model in caret, e.g.: RFmodel - train(X,Y,method='rf',trControl=myCtrl,tuneLength=1) How can I save this to disk and load it later in R? How about an object of the class resamples? resamps - resamples( list( RF = RFmodel, SVM = SVMmodel,

[R] Fwd: Sourcing my file does not print command outputs

2013-02-07 Thread James Jong
-5204 From: James Jong [mailto:ribonucle...@gmail.com] Sent: Thursday, February 07, 2013 1:30 PM To: Nordlund, Dan (DSHS/RDA) Cc: r-help@r-project.org Subject: Re: [R] Sourcing my file does not print command outputs Thanks. Interestingly I am having the same problem with dotplot(resamps

Re: [R] Saving model and other objects from caret

2013-02-07 Thread James Jong
-and-**loading-a-model-in-rhttp://stackoverflow.com/questions/14761496/saving-and-loading-a-model-in-r Best, Stephan On 07.02.2013 22:33, James Jong wrote: Say I train a model in caret, e.g.: RFmodel - train(X,Y,method='rf',**trControl=myCtrl,tuneLength=1) How can I save this to disk and load

Re: [R] Saving model and other objects from caret

2013-02-07 Thread James Jong
What are the *RDS counterparts? What is the difference? James On Thu, Feb 7, 2013 at 5:00 PM, Michael Weylandt michael.weyla...@gmail.com wrote: On Feb 7, 2013, at 9:51 PM, James Jong ribonucle...@gmail.com wrote: Thanks Stephan. I can't believe I didn't try that first. I greatly

Re: [R] Sourcing my file does not print command outputs

2013-02-07 Thread James Jong
. ** ** Dan ** ** Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204 ** ** *From:* James Jong [mailto:ribonucle...@gmail.com