Displaying 10 results from an estimated 10 matches for "resamp".
Did you mean:
resamps
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?
Thanks,
James
[[alternative HTML ve...
2013 Feb 07
0
FW: Sourcing my file does not print command outputs
...rnorm(2000)))
#Construct Y using X
Y <- runif(1)*X[,1]*X[,2]^2+runif(1)*X[,3]/X[,4]
#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 = G...
2008 Dec 12
0
Help with a permutation test
...MNNUM)
new.DF
}
#this function does one model I am interested in.
modeltree<-function(DF){
MLM.plot <- multinom(MN_fact ~ Canpy + mean_dbh + num_beechoak +
num_class5 + prop_hard , data=hfdata, trace=FALSE)
MLM.plot
}
# this replicates the 'rand' function and applies a model
resamp.funct<-function(DF,funct, n){
list<-replicate(n,rand(DF), simplify = FALSE)
sapply(list, funct, simplify = FALSE)
}
#So if I paste below:
l<-resamp.funct(hfdata, modeltree, 3)
# I get
> l<-resamp.funct(hfdata, modltree, 3)
> l
[[1]]
Call:
multinom(formula = MN_fact...
2013 Feb 07
1
Saving model and other objects from caret
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,
KNN = KNNmodel,
NN = NNmodel
))
Thanks,
James
[[alternative HTML version deleted]]
2013 Apr 23
1
lmer with only random effect
...=tmp)
The results are as below. How do I take out the intercept term? Or
if this is not possible for the lmer function, is it possible using lme
function in the "nlme" package?
Thank you very much in advance.
Hanna
Linear mixed model fit by REML
Formula: values ~ (1 | lot)
Data: resamp
AIC BIC logLik deviance REMLdev
-14.21 -9.459 10.1 -23.88 -20.21
Random effects:
Groups Name Variance Std.Dev.
lot (Intercept) 0.036077 0.18994
Residual 0.017278 0.13144
Number of obs: 36, groups: lot, 10
Fixed effects:
Estimate Std. Error t val...
2011 Jun 23
2
Confidence interval from resampling
Dear R gurus,
I have the following code, but I still not know how to estimate and extract
confidence intervals (95%CI) from resampling.
Thanks!
~Adriana
#data
penta<-c(770,729,640,486,450,410,400,340,306,283,278,260,253,242,240,229,201,198,190,186,180,170,168,151,150,148,147,125,117,110,107,104,85,83,80,74,70,66,54,46,45,43,40,38,10)
x<-log(penta+1)
plot(ecdf(x), ylab="Probability", xlab="Concentration...
2012 Jan 04
3
informal conventions/checklist for new predictive modeling packages
...reasons to not use
formulas, such as functions that do not use a design matrix (eg.
cforest()) or need factors to be handled in a non-standard way (eg.
cubist()).
(6) Don't require a test set when model building.
(7) Control all written output during model-building time with a
verbose option. Resampling can make a mess out of things if
output/logging is always exposed.
(8) Please use RSiteSearch to avoid name collisions between packages
(eg. gam(), splsda(), roc(), LogitBoost()). Also search Bioconductor.
(9) Allow the predict function to generate results from many different
sub-models simul...
2008 May 31
0
FFT Resampler spectrograms
...x,2048,1,kaiser(2048,14));
spectrogram_floor=-96;
pcolor(max(spectrogram_floor,20*log10(abs(X(end:-1:1,:)))));
shading flat
colorbar
print('-dpng','-r300', [fn, '.png'])
end
['Done']
I've posted the output for the filter-based and block-based resampler at
different qualities at http://www.mumble.info/resamp/
The resampling was 96khz => 44.1khz.
"chirp.png" is the original (unresampled)
"perfect.png" is the result of a FFT/chop/iFFT of the whole file as one.
"filter0.png" to "filter10.png" is the &q...
2011 May 01
0
Dummy variables using rfe in caret for variable selection
...my variable
levels(x$State) <- c("AL","GA","FL")
dummy <- model.matrix(~State,x)
z <- cbind(dummy, x)
#remove State category variable
w <- z[,c(-4)]
subsets <- c(2:8)
ctrl<- rfeControl(functions = lmFuncs, method="cv", verbose=FALSE,
returnResamp = "final")
lmProfile <- rfe(w, y, sizes = subsets, rfeControl = ctrl)
Returns:
Error in `[.data.frame`(x, , retained, drop = FALSE) :
undefined columns selected
In addition: Warning message:
In predict.lm(object, x) :
prediction from a rank-deficient fit may be misleading
When...
2012 Sep 26
3
Reading multiple files
Hi,
I have 35 data files for reading. I would like get a program for
performing reading of 35 files at once.
All are of the type: Dados1.raw, Dados2.raw and so on.
If the files have the same number of columns, I can read with the
following commands:
rm(list=ls())
filenames = list.files(path="~/Silvano/Arq", pattern="Dados+.*raw")
names = substr(filenames, 1, 7)
for(i in