search for: createdatapartit

Displaying 20 results from an estimated 26 matches for "createdatapartit".

2023 Apr 14
2
Package Caret
This is the error then: error in prettyseq(1:ncol(out)) : could not find function "prettyseq" Eric Berger <ericjberger at gmail.com> schrieb am Fr., 14. Apr. 2023, 09:06: > What happens if you do the following? > > library(caret) > > ?caret::createDataPartition > > i.e. to confirm that caret is loaded, seek help on this function > > > On Fri, Apr 14, 2023 at 9:56?AM G?bor Malomsoki <gmalomsoki1980 at gmail.com> > wrote: > >> Eric, >> >> Yes, i know, i am calling the package, but this is not working. >>...
2010 Sep 09
1
createDataPartition
Dear all, does anyone know how to define the structure of the required samples using function createDataPartition, meaning proportions of different types of variable in the partition? Smth like this for iris data: createDataPartition(y = c(setosa = .5, virginica = .3, versicolor = .2), times = 10, p = .7, list = FALSE) Thanks a lot for your help. Regards, Trafim [[alternative HTML version deleted]]
2023 Apr 14
1
Package Caret
What happens if you do the following? > library(caret) > ?caret::createDataPartition i.e. to confirm that caret is loaded, seek help on this function On Fri, Apr 14, 2023 at 9:56?AM G?bor Malomsoki <gmalomsoki1980 at gmail.com> wrote: > Eric, > > Yes, i know, i am calling the package, but this is not working. > I saw a similar question in Stackoverflow, adv...
2023 Apr 14
1
Package Caret
...question in Stackoverflow, advising install package Rcpp, but this one i am unable to install. Eric Berger <ericjberger at gmail.com> schrieb am Fr., 14. Apr. 2023, 08:47: > You first have to load the package using the library command. > > library(caret) > > Then you can call createDataPartition. e.g. > > data(oil) > > createDataPartition(oilType,2) > > HTH, > Eric > > > On Fri, Apr 14, 2023 at 7:52?AM G?bor Malomsoki <gmalomsoki1980 at gmail.com> > wrote: > >> Dear all, >> When i try to use createDataPartition after calling package...
2023 Apr 16
2
Package Caret
...et: latticeError: Laden von Paket oder > > Namensraum f?r ?caret? in loadNamespace(i, c(lib.loc, .libPaths()), > > versionCheck = vI[[i]]): fehlgeschlagen > > Namensraum ?vctrs? 0.5.2 ist bereits geladen, aber >= 0.6.0 wird > gefordert > > > > > > Error in createDataPartition(hypotezis_df$X, p = 0.75, list = FALSE, > > times = 1) : > > could not find function "createDataPartition" > > > > > > R version 4.2.3 (2023-03-15 ucrt) > > Platform: x86_64-w64-mingw32/x64 (64-bit) > > Running under: Windows 10 x64 (build 19...
2023 Apr 14
1
Package Caret
...> error in prettyseq(1:ncol(out)) : could not find function "prettyseq" > > > > > Eric Berger <ericjberger at gmail.com> schrieb am Fr., 14. Apr. 2023, 09:06: > >> What happens if you do the following? >>> library(caret) >>> ?caret::createDataPartition >> >> i.e. to confirm that caret is loaded, seek help on this function >> >> >> On Fri, Apr 14, 2023 at 9:56?AM G?bor Malomsoki <gmalomsoki1980 at gmail.com> >> wrote: >> >>> Eric, >>> >>> Yes, i know, i am calling the pa...
2023 Apr 14
1
Package Caret
...en: > error in prettyseq(1:ncol(out)) : could not find function "prettyseq" > > > > > Eric Berger <ericjberger at gmail.com> schrieb am Fr., 14. Apr. 2023, 09:06: > >> What happens if you do the following? >> > library(caret) >> > ?caret::createDataPartition >> >> i.e. to confirm that caret is loaded, seek help on this function >> >> >> On Fri, Apr 14, 2023 at 9:56?AM G?bor Malomsoki <gmalomsoki1980 at gmail.com> >> wrote: >> >>> Eric, >>> >>> Yes, i know, i am calling the pa...
2023 Apr 16
1
Package Caret
...RStudio, but still not working: library(caret)Lade n?tiges Paket: latticeError: Laden von Paket oder Namensraum f?r ?caret? in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): fehlgeschlagen Namensraum ?vctrs? 0.5.2 ist bereits geladen, aber >= 0.6.0 wird gefordert Error in createDataPartition(hypotezis_df$X, p = 0.75, list = FALSE, times = 1) : could not find function "createDataPartition" R version 4.2.3 (2023-03-15 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19044) Matrix products: default locale: [1] LC_COLLATE=German_Austri...
2023 Apr 16
1
Package Caret
...> library(caret)Lade n?tiges Paket: latticeError: Laden von Paket oder > Namensraum f?r ?caret? in loadNamespace(i, c(lib.loc, .libPaths()), > versionCheck = vI[[i]]): fehlgeschlagen > Namensraum ?vctrs? 0.5.2 ist bereits geladen, aber >= 0.6.0 wird gefordert > > > Error in createDataPartition(hypotezis_df$X, p = 0.75, list = FALSE, > times = 1) : > could not find function "createDataPartition" > > > R version 4.2.3 (2023-03-15 ucrt) > Platform: x86_64-w64-mingw32/x64 (64-bit) > Running under: Windows 10 x64 (build 19044) > > Matrix products: def...
2023 Apr 14
1
Package Caret
You first have to load the package using the library command. > library(caret) Then you can call createDataPartition. e.g. > data(oil) > createDataPartition(oilType,2) HTH, Eric On Fri, Apr 14, 2023 at 7:52?AM G?bor Malomsoki <gmalomsoki1980 at gmail.com> wrote: > Dear all, > When i try to use createDataPartition after calling package 'caret', i get > the message: > "co...
2023 Apr 14
1
Package Caret
Dear all, When i try to use createDataPartition after calling package 'caret', i get the message: "could not find function createDataPartition" I use: R-4.2.3 for Windows RStudio-2023.03.0-386 Do you have any experience with this failure? Thank you! Best regards Gabor [[alternative HTML version deleted]]
2013 Feb 19
0
CARET. Relationship between data splitting trainControl
...e 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 interplay between trainControl and the data splitting functions in caret (e.g. createDataPartition, createResample, createFolds and createMultiFolds) To better frame my questions, let me use the following example from the documentation: ************************************* data(BloodBrain) set.seed(1) tmp <- createDataPartition(logBBB,p = .8, times = 100) trControl = trainControl(metho...
2011 Oct 02
1
difference between createPartition and createfold functions
...trying to separate my dataset into 4 parts with the 4th one as the test dataset, and the other three to fit a model. I've been searching for the difference between these 2 functions in Caret package, but the most I can get is this-- A series of test/training partitions are created using createDataPartition while createResample creates one or more bootstrap samples. createFolds splits the data into k groups. I'm missing something here? What is the difference btw createPartition and createFold? I guess they wouldn't be equivalent. Thank you. Bonnie Yuan
2012 Nov 04
1
sample equal number of cases per class
...a lot, without success so far. Maybe you can help? Some example code *# generate example data df <- data.frame(class = as.factor(sample(1:3, 20, replace = T)), var1 = rnorm(20,3), var2 = rnorm(20,6)) summary(df) # split into learn and test sets using the caret package require(caret) ind <- createDataPartition(df$class, p=.8, list = F, times = 1) # The problem is here: class sizes are not equal) learnset <- df[ind,] summary(learnset)* Version info: /> R.Version() $platform [1] "x86_64-pc-mingw32" $arch [1] "x86_64" $os [1] "mingw32" $system [1] "x86_64, mingw...
2013 Mar 02
2
caret pls model statistics
...this with the caret package. I use the following code: library(caret) data(iris) #needed to convert to numeric in order to do regression #I don't fully understand this but if I left as a factor I would get an error following the summary function iris$Species=as.numeric(iris$Species) inTrain1=createDataPartition(y=iris$Species, p=.75, list=FALSE) training1=iris[inTrain1,] testing1=iris[-inTrain1,] ctrl1=trainControl(method="cv", number=10) plsFit2=train(Species~., data=training1, method="pls", trControl=ctrl1, metric="Rsquared", preProc=c(...
2009 Dec 21
5
Help,Suggest me some methods to identify training set and test set!!!
I want to split my whole dateset to training set and test set, building model in training set, and validate model using test set. Now, How can I split my dataset to them reasonally. Please give me a hand, It is better to give me some R code. and I see some ways like using SOM to project whole independents to 2-dimensions and find some to be training set and others are test set. like below. I
2018 Apr 14
2
Efficient way to subset rows in R for dataset with 10^7 columns
I have a data.table with dimensions 100 by 10^7. When I do trainIndex <- caret::createDataPartition( df$status, p = .9, list = FALSE, times = 1 ) outerTrain <- df[trainIndex] outerTest <- df[-trainIndex] Subsetting the rows of df takes over 20 minutes. What is the best way to efficiently subset this? Thanks! [[alternative HTML version d...
2023 May 09
1
RandomForest tuning the parameters
...1,1,1,0,0,0,1,0,0,1,0,0,0,1,1,0,1,0,0,0,1,1,1,1,0,1,0,1,0,0,1,1,0,0,1,0,0,1,1) > > > > y=as.numeric(y) > > x1=as.numeric(x1) > > x2=as.factor(x2) > > > > X=data.frame(x1,x2) > > y=y > > > > #Split data into training and test sets > > index=createDataPartition(y, p=0.75, list=FALSE) > > X_train = X[index, ] > > X_test = X[-index, ] > > y_train= y[index ] > > y_test = y[-index ] > > > > #Train de model > > regr=randomForest (x=X_train, y=y_train, maxnodes=10, ntree=10) > > > > regr<-randomForest(...
2012 May 30
1
caret() train based on cross validation - split dataset to keep sites together?
...data into cross validation subsets and most importantly, keeping all observations from a site together 3.) Secondarily, constrain partitions to be similar - ideally based on distributions of all variables It seems that some combination of the sample.split function of the caTools() package and the createdataPartition function of caret() might do this, but I am at a loss for how to code that.? If this is not possible, I would be content to skip the cross validation procedure and create three similar splits of my data that keep all observations from a site together ? one for training, one for testing, and on...
2023 May 08
1
RandomForest tuning the parameters
...7,10,11,12,13,10,3,2,5,6,9,8,7,4,12,15,16,2,3) x2=c(0,0,0,1,1,0,1,1,0,1,1,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,1,0,0,1,0,0,0,1,1,0,1,0,0,0,1,1,1,1,0,1,0,1,0,0,1,1,0,0,1,0,0,1,1) ? y=as.numeric(y) x1=as.numeric(x1) x2=as.factor(x2) ? X=data.frame(x1,x2) y=y ? #Split data into training and test sets index=createDataPartition(y, p=0.75, list=FALSE) X_train = X[index, ] X_test = X[-index, ] y_train= y[index ] y_test = y[-index ] ? #Train de model regr=randomForest (x=X_train, y=y_train, maxnodes=10, ntree=10) regr<-randomForest(y~x1+x2, data=X_train, proximity=TRUE) regr ? #Make prediction predictions= predict(reg...