let's you fit
> the model. Off the top of my head, you could use something like:
>
>MaxNWts = length(levels(trY))*(max(my.grid$.size) * (nCol + 1) +
> max(my.grid$.size) + 1)
>
> Also, this one of the methods for getting help (the other is to just email
> me). I also try
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 <- runif(1)*trX[,1
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
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
RandomFor
really need to read the documentation. Almost every question that
>>> you have has been addressed in the existing material. For this one, there
>>> is a section on custom models here:
>>>
>>>http://caret.r-forge.r-project.org/training.html
>>>
>
rge.r-project.org/training.html
>
> Max
>
>
> On Wed, Feb 13, 2013 at 9:58 AM, James Jong wrote:
>
>> The documentation for caret::train shows a list of parameters that one can
>> tune for each method classification/regression method. For example, for
>> the
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 p
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 class
That was the problem. Thanks David!
James
On Tue, Feb 12, 2013 at 2:08 PM, David Winsemius wrote:
>
> 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
>
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) { : argume
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:
=
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 i
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:
./rpy/rinterface/_rinterface.c
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 ht
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 packag
** **
>
> The summary information and dotplot printed just fine.
>
> ** **
>
> Dan
>
> ** **
>
> Daniel J. Nordlund
>
> Washington State Department of Social and Health Services
>
> Planning, Performance, and Accountability
>
> Research a
What are the *RDS counterparts? What is the difference?
James
On Thu, Feb 7, 2013 at 5:00 PM, Michael Weylandt wrote:
>
>
> On Feb 7, 2013, at 9:51 PM, James Jong wrote:
>
> > Thanks Stephan. I can't believe I didn't try that first. I greatly
> > appreciat
**loading-a-model-in-r<http://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=
; 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]
> Sent: Thursday, February 07, 2013 1:30
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,
(DSHS/RDA) <
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
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)
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 anyth
23 matches
Mail list logo