[R] caret package

2023-07-09 Thread Andrew Zhang
Dear all, I am using caret package to analyze a microarray dataset with feature selection using sbf(). My dataset is 3500 samples with 2200 genes, the outcome Y variable is a factor of 12 levels. I used the following script to run the feature selection: library(caret) ctrl <- sbfControl(functions

[R] Error using R caret package (train) with C5.0 decision tree to do K-fold cross validation

2020-04-07 Thread J4T5U8 via R-help
I'm trying to use the caret package to do repeated k-fold cross validation with C5.0 decision trees. The following code generates a working C5.0 decision tree (68% accuracy on confusion matrix): > model <- C5.0(as.factor(OneGM) ~., data=OneT.train) > results <- predict(object=model, new

[R] CARET PACKAGE - PENALISED MULTINOMIAL REGRESSION MODEL

2018-06-28 Thread Triparna Poddar
Hi, In the Caret package, in one of the training model method for classification , penalised multinomial regression has been used? I could not find anywhere how the penalised parameters have been chosen here . I need the statistical methods that have been used. Can someone please help me? Tha

Re: [R] Feature selection using R Caret package: Error in seeds[[num_rs + 1L]] : subscript out of bounds

2016-12-20 Thread David Winsemius
> On Dec 20, 2016, at 1:30 PM, Its August via R-help > wrote: > > rm(list=ls())set.seed(12345)library(mlbench)library(caret) > options(error=utils::recover) > #Pastebin link for Data: http://pastebin.com/raw/cg0Kiueqmydata.df <- > read.table("data.PasteBin.txt", header=

[R] Feature selection using R Caret package: Error in seeds[[num_rs + 1L]] : subscript out of bounds

2016-12-20 Thread Its August via R-help
Hello All, I've a dataset of six samples and 1530 variables/features and wish to know the the importance of features. I'm trying to use the "Rank Features By Importance" as mentioned in Feature Selection with the Caret R Package (http://machinelearningmastery.com/feature-selection-with-the-caret

Re: [R] caret package: custom summary function in trainControl doesn't work with oob?

2012-04-15 Thread Matthew Francis
Hi Max, Thanks for your help. In the case of randomForest, the keyword keep.inbag=TRUE in the train function provokes the return the information about which data rows were in-bag in each tree. That should provide the required info to re-compute the OOB error for any given alternative error definit

Re: [R] caret package: custom summary function in trainControl doesn't work with oob?

2012-04-13 Thread Max Kuhn
Matt, > I've been using a custom summary function to optimise regression model > methods using the caret package. This has worked smoothly. I've been using > the default bootstrapping resampling method. For bagging models > (specifically randomForest in this case) caret can, in theory, uses the >

[R] caret package: custom summary function in trainControl doesn't work with oob?

2012-04-12 Thread Matthew Francis
Hi all, I've been using a custom summary function to optimise regression model methods using the caret package. This has worked smoothly. I've been using the default bootstrapping resampling method. For bagging models (specifically randomForest in this case) caret can, in theory, uses the out-of-b

Re: [R] [caret package] [trainControl] supplying predefined partitions to train with cross validation

2011-05-10 Thread Fabon Dzogang
Here is an answer from Max Khun thank you ! Fabon, If I understand the problem, there are two ways of doing it. First, if you are using caret's trian(), rfe() or sbf(), if you set the seed right before you call the models, they end up using the same resampled data sets. (btw, if you use the resam

Re: [R] [caret package] [trainControl] supplying predefined partitions to train with cross validation

2011-05-06 Thread Fabon Dzogang
Hello, Thank you for your reply but I'm not sure your code answers my needs, from what I read it creates a 10-fold partition and then extracts the kth partition for future processing. My question was rather: once I have a 10-fold partition of my data, how to supply it to the "train" function of t

Re: [R] [caret package] [trainControl] supplying predefined partitions to train with cross validation

2011-05-06 Thread neetika nath
Hi, I did the similar experiment with my data. may be following code will give you some idea. It might not be the best solution but for me it worked. please do share if you get other idea. Thank you CODE### library(dismo) set.seed(111) dd<-read.delim("yourfile.csv",sep=",",header=T)

[R] [caret package] [trainControl] supplying predefined partitions to train with cross validation

2011-05-05 Thread Fabon Dzogang
Hi all, I run R 2.11.1 under ubuntu 10.10 and caret version 2.88. I use the caret package to compare different models on a dataset. In order to compare their different performances I would like to use the same data partitions for every models. I understand that using a LGOCV or a boot type re-sam

Re: [R] Caret package and lasso

2010-04-08 Thread Alex Roy
Dear Max, Thanks for the reply. I will wait for your further comment on this. Regards Linda Garcia On Wed, Apr 7, 2010 at 8:03 PM, Max Kuhn wrote: > Linda, > > Thanks for the example. > > I did this to make it more reproducible: > > set.seed(1) > X<-matrix(rnorm(50*100),nrow=

Re: [R] Caret package and lasso

2010-04-07 Thread Max Kuhn
Linda, Thanks for the example. I did this to make it more reproducible: set.seed(1) X<-matrix(rnorm(50*100),nrow=50) y<-rnorm(50*1) dimnames(X) colnames(X) <- paste("V", 1:nrow(X)) # Applying caret package set.seed(2) con<-trainControl(method="cv",number=10) data<-NULL d

[R] Caret package and lasso

2010-04-06 Thread linda garcia
Dear all, I have used following code but everytime I encounter a problem of not having coefficients for all the variables in the predictor set. # code rm(list=ls()) library(caret) # generating response and design matrix X<-matrix(rnorm(50*100),nrow=50) y<-rnorm(50*1) # Applying caret package

Re: [R] caret package, how can I deal with RFE+SVM wrong message?

2010-03-23 Thread Max Kuhn
Kevin! I've sent 5 replies to your questions already off-list. The first question is easy (see below). The others will need more information on your data (via str(trx) abd str(try)) and you versions (sessionInfo()) as previously asked off-list. Sorry to out you, but this is bad form. Max > I a

[R] caret package, how can I deal with RFE+SVM wrong message?

2010-03-23 Thread bbslover
Hello, I am learning caret package, and I want to use the RFE to reduce the feature. I want to use RFE coupled Random Forest (RFE+FR) to complete this task. As we know, there are a number of pre-defined sets of functions, like random Forest(rfFuncs), however,I want to tune the parameters (mtr

Re: [R] caret package for time series applications

2009-10-02 Thread zubin
Max, thx for the reply, i am amazed at the caret package.. very nice okay, for time series, i think i can include a dummy variable for each time period and try to remove the time effect, less 1 dummy, like one does for seasonality. maybe that will work, if anyone has any suggestions on how to

Re: [R] caret package for time series applications

2009-10-01 Thread Max Kuhn
Zubin, > Hello, I have some time series applications, where i have a large set of X > variables (hundreds) and thousands of time data points (sampling every > minute). > I like to use the caret package to support the analysis, variable selection > and model selection.  However, reading the documen

[R] caret package for time series applications

2009-10-01 Thread zubin
Hello, I have some time series applications, where i have a large set of X variables (hundreds) and thousands of time data points (sampling every minute). I like to use the caret package to support the analysis, variable selection and model selection. However, reading the documentation, it l

Re: [R] caret package

2009-06-08 Thread David Winsemius
The help page for extractPredictions suggests and testing confirms that the function expects a _list_ of models. The predict function is suggested as the method to get predictions from a single model. Giving the argument as a list does work with a single model, however: > predict(glmmat)

Re: [R] caret package

2009-06-08 Thread milton ruser
Dear Sunny Vic, I am forwarding it to the list, to help the helpers :-) bests.. milton On Mon, Jun 8, 2009 at 12:41 PM, sunny vic wrote: > Hi Milton, > here you go > > X1=rnorm(11, 50, 10) > X2=rnorm(11, 20, 10) > X3=rnorm(11, 50, 60) > X4=rnorm(11, 10, 2) > X5=rnorm(11, 5, 22) > > x<-cbind(

Re: [R] caret package

2009-06-08 Thread milton ruser
Hi Sonny Vic, how about you send a reproducible code? cheers milton On Mon, Jun 8, 2009 at 11:25 AM, sunny vic wrote: > Hi all > I am using the caret package and having difficulty in obtaining the > results > using regression, I used the glmnet to model and trying to get the > coefficients an

[R] caret package

2009-06-08 Thread sunny vic
Hi all I am using the caret package and having difficulty in obtaining the results using regression, I used the glmnet to model and trying to get the coefficients and the model parameters I am trying to use the extractPrediction to obtain a confusion matrix and it seems to be giving me errors.

Re: [R] Caret package: coeffcients for regression

2009-05-04 Thread Max Kuhn
Alex, > I am using "Caret"package for SVM regression and elastic net > regression . I can get the final fiited vs observed values. How can I get > the coefficients? Any ideas? You didn't say what version of caret and R you are using, what kernel or what type of coefficients. If you tune a model

[R] Caret package: coeffcients for regression

2009-05-04 Thread Alex Roy
Dear All, I am using "Caret"package for SVM regression and elastic net regression . I can get the final fiited vs observed values. How can I get the coefficients? Any ideas? Thanks Alex [[alternative HTML version deleted]] __ R-h

Re: [R] caret package: arguments passed to the classification or regression routine

2008-09-19 Thread Max Kuhn
Forgot to cc... On Fri, Sep 19, 2008 at 3:22 PM, Max Kuhn <[EMAIL PROTECTED]> wrote: > A new version 3.41 is on > > https://r-forge.r-project.org/projects/caret/ > > Until later tonight, you will have to get it via > > svn checkout svn://svn.r-forge.r-project.org/svnroot/caret > > and build it

[R] caret package: arguments passed to the classification or regression routine

2008-09-18 Thread Peter Tait
Hi, I am having problems passing arguments to method="gbm" using the train() function. I would like to train gbm using the laplace distribution or the quantile distribution. here is the code I used and the error: gbm.test <- train(x.enet, y.matrix[,7], method="gbm", distribution=list(na