Displaying 4 results from an estimated 4 matches for "timingsamps".
2012 Jul 12
1
Caret: Use timingSamps leads to error
I want to use the caret package and found out about the timingSamps
obtion to obtain the time which is needed to predict results. But, as
soon as I set a value for this option, the whole model generation fails.
Check this example:
-------------------------
library(caret)
tc=trainControl(method='LGOCV', timingSamps=10)
tcWithout=trainControl(method='LG...
2013 Feb 10
1
Training with very few positives
...n scheme for training a classifier
with very few positives?
I currently have the following setup:
========================================
library(caret)
tmp <- createDataPartition(Y, p = 9/10, times = 3, list = TRUE)
myCtrl <- trainControl(method = "boot", index = tmp, timingSamps = 2,
classProbs = TRUE, summaryFunction = twoClassSummary)
RFmodel <- train(X,Y,method='rf',trControl=myCtrl,tuneLength=1,
metric="ROC")
SVMmodel <- train(X,Y,method='svmRadial',trControl=myCtrl,tuneLength=3,
metric="ROC")
KNNmodel <- train(...
2013 Feb 07
4
Sourcing my file does not print command outputs
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 anything.
How can I get summary(resamps) to print when I source a file with this
command?
2013 Feb 07
0
FW: Sourcing my file does not print command outputs
...#Convert Y to binary
Y <- as.factor(ifelse(sign(Y)>0,'X1','X0'))
#Create bootstrap samples for fitting models
library(caret)
print("Creating bootstrap samples")
tmp <- createResample(Y,times = 25)
myCtrl <- trainControl(method = "boot", index = tmp, timingSamps = 10)
RFmodel <- train(X,Y,method='rf',trControl=myCtrl,tuneLength=1)
NNmodel <- train(X,Y,method='nnet',trControl=myCtrl,tuneLength=3, trace = FALSE)
## GLMnet = GLMmodel,
...
#Assess re-sampled (out of sample) accuracy
print("Assessing re-sampled (O...