The caret package (short for Classification And REgression Training) is a set of functions that attempt to streamline the process for creating predictive models.

learn more… | top users | synonyms

1
vote
0answers
12 views

How to use caret to perform regularization with large data? [on hold]

I have a very large data set, with about few million rows and 10K columns, where the data is formatted in a wide-format. So I tried to do regularization with Caret, using the following line: ...
0
votes
1answer
49 views

r - choosing correct nnet model

Language: R Background data = 1800 observations (rows) x 5 variables (columns) I am using library(caret) and training regression models using ...
0
votes
0answers
19 views

Predictive model decision tree [migrated]

I want to build a predictive model using decision tree classification in R. I used this code: ...
0
votes
1answer
17 views

Extracting Standard Errors Caret Model

I have tuned a glm net model with caret using the train function. I am trying to extract the coefficients and standard errors of those coefficients for the best tuned model. Following this CV post I ...
0
votes
1answer
27 views

LOOCV $R^2$ higher than regular $R^2$ in RF

I am working with RF and the caret package, and I am having a confusion because sometimes the LOOCV $R^2$ is higher than the regular $R^2$. Is it right? How can I interpret this? Here an example ...
0
votes
0answers
9 views

Including class probabilities might skew a model in caret?

I've been training SVMs over some particular data for some time. I was quite happy with the Kappa and Accuracy measures caret gives, but adding some other metrics was not a bad idea at all. The thing ...
0
votes
1answer
18 views

what is the meaning of RMSE in caret::train [duplicate]

I'm confused by the exercise solutions of the book Applied Predictive Modeling. In https://github.com/topepo/APM_Exercises/blob/master/Ch_06.pdf at the beginning of page 4 ...
0
votes
0answers
35 views

When converting categorical data to numeric in R is it important to use the same value to numeric mapping across columns

If I have a dataset consisting of categorical data and I want to see if there is a correlation between the values I will need to convert it to numeric in order to run corr() in R but I have a few ...
1
vote
0answers
25 views

R: Cross Validation with caret and linear regression

I want to choose best (predictive) linear model with 10-fold Cross-Validation by stepwise selection and minimizing MSE in each step. The R-function I use for this is train from the R-package caret. ...
1
vote
0answers
31 views

Plot the training and cross-validation deviance [closed]

I'm running the gbm model using R caret package. To tune the model I used 10-fold cross-validation. I tried to get the following plots to guide my model tuning but didn't succeed: Plot the training ...
0
votes
0answers
31 views

caret: using random forest and include cross-validation

I used the caret package to train a random forest, including repeated cross-validation. I’d like to know whether the OOB, as in the original RF by Breiman, is used or whether this is replaced by the ...
0
votes
0answers
17 views

R caret and NAs

I very much prefer caret for its parameter tuning ability and uniform interface, but I have observed that it always requires complete datasets (i. e. without NAs) even if the applied "naked" model ...
0
votes
1answer
39 views

Model validation using features (R)

I'm trying to create a classification model in R, at the moment i'm using 10 fold CV (using the train function of caret package) ...
0
votes
1answer
33 views

r, caret - preprocessing range vs scale

I noticed that caret preprocessing has a range method to "scale predictors between 0,1". When does this option become more desirable than center and scaling?
1
vote
1answer
80 views

Explain “validation” process of repeated k-fold cross-validation?

My understanding is currently that the canonical repeated k-fold cross-validation (CV) process might do the following if $n=100$ observations in sample, $k=5$ folds, $i= 10$ iterations (see iteration ...
0
votes
1answer
46 views

Comparing classification algorithms using cross validation and caret's train

I am having issues understanding some concepts of algorithm comparison/parameter optimization/cross-validation in R Let's say I want to compare two classification algorithms, such as Random Forests ...
0
votes
1answer
47 views

Feature selection in GBM

I am using gradient boosting (caret package in R). As far as I understand, the feature selection is already included in this package. However, I slightly ...
0
votes
0answers
41 views

using caret and glmnet for variable selection

Im using the caret and glmnet package for variable selection. I only want to find the best model and the coefficients and use ...
1
vote
1answer
49 views

Random forest regression on a given interval

I'm training a random forest regression model on a dataset that consinsts of values in the range of 0-50. It has many values close to zero and only 500 observations. The R^2 is also small, about ...
0
votes
1answer
46 views

Change settings in the prediction model (caret package)

I am using the package caret and GBM method for my predictions. ...
0
votes
0answers
31 views

Effect of Alpha and Lambda in Glm Net on Prediction Probabilties in Caret

I've run a number of different glm net classification models using Caret. I was trying to optimize by CV ROC and so tried a number of different tuning grids. Looking at several models with similar ...
0
votes
0answers
53 views

Different results from randomForest via caret and the basic randomForest package

I am a bit confused: How can the results of a trained Model via caret differ from the model in the original package? I read Issue on prediction with FinalModel of RandomForest in R using the CARET ...
1
vote
2answers
91 views

Feature selection before neural network classification

I have a training set of 87 samples and 9480 variables. My predictors are continuous and my response variable is binary. I'd like to use the caret package in R to tune a neural network classification ...
0
votes
1answer
26 views

I was expecting 0 and 1 as an answer of a predict function in r

I'm doing a binomial family with method="glm" in train function (caret package) and as result I'm getting predicted numbers like "0.62325028 0.51807017 0.67119878 ..." and I was expecting vector ...
0
votes
1answer
61 views

Model Selection and RFE using caret

I'm faced with a high dimensional (samples=148, features=20000), supervised binary classification problem. Which I would like to approach with an ensemble of classifiers, that will classify using a ...
1
vote
1answer
38 views

How to do test set evaluation using a regression model in Caret?

I'm used to using Caret to do classification but now I need to use it for regression. I have successfully trained a model on my training set but I'm not sure what ...
0
votes
1answer
20 views

train multiples observations from the same person in caret

I have data where persons were give four different tasks under three different conditions (intensities). The data looks like this: ...
0
votes
0answers
51 views

Optimize Probability Thresholds for class imbalances in glmnet models in caret

In direct relation to the topic discussed here I intend to retrain the model in order to optimize the probability threshold for classification of both classes. Currently the model achieves high ...
0
votes
1answer
78 views

Custom resampling method in caret

I need to create a custom resampling method in R package caret where: For each leave-pair-out-cross-validation, from the training set I derive new data using a function I implemented. Then it is used ...
0
votes
2answers
68 views

Data partitioning according two variables

I am working with the following dataset: ...
0
votes
0answers
15 views

manually obtain caret importance for logistic regression

with the caret package in R http://topepo.github.io/caret/varimp.html it is possible to obtain a rank of the variables for linear model. I would like to know how can I get this rank manually when the ...
1
vote
1answer
67 views

How does caret handle factors?

I have been testing conditional trees and random forests with caret, and I've noticed it does something weird with factors. So, for example, a ctree using the base dataset ...
0
votes
0answers
15 views

Formula behind variables importance in linear model with caret library

The caret library can measure the importance of predictors http://topepo.github.io/caret/varimp.html The importance for a Linear Models is computed as: 'the absolute value of the t-statistic for ...
0
votes
1answer
86 views

What does the varImp function in the caret package actually compute for a glmnet (elastic net) object

I am fitting an elastic net model with glmnet via the caret package with 189 predictors and a binomial criteria (a,b) ...
0
votes
0answers
23 views

ordinal variables and caret when preprocessing

I have found that many examples in the APM book by Dr. Max Kuhn tend to cover data sets that have continuous variables as the predictor set. If working with a data set that has ordinal factors, would ...
0
votes
1answer
405 views

Metrics for multi-class problems in R caret package for various method tags

The caret package for R provides a variety of error metrics predominantly aimed at 2-class classification models with limited error metrics. Here is a multi-class function to allow caret:::train to ...
3
votes
1answer
98 views

Check a status of training process in R

I'm training a model using caret package in R for almost 3 days. The calculations are running in parallel (multiple processes). Unfortunately there is no output in ...
1
vote
1answer
70 views

Which performance measure to report?

I've trained a random forest regression model using boot632 resampling and the caret package. The output of the model tuning process gives a few different performance measures. ...
0
votes
1answer
46 views

Outer crossvalidation cycle in caret package (R)?

Could somebody provide a nice example code how to best implement an outer crossvalidation cycle using the caret package in R? The package provides a convenient trainControl() argument to ajust the ...
2
votes
2answers
105 views

How to prepare a dataset for text classification

I would like to compare some algorithms for performing sentiment classification (Naive Bayes, SVM, and ...
0
votes
0answers
44 views

Standard error of prediction MARS splines earth package

I'm using the earth package (using caret train function) MARS spline implementation in order to perform non - linear regression modeling. I would like to obtain a measure of prediction uncertainty ...
2
votes
1answer
285 views

R caret package - number of principal components when preprocessing using PCA

I am using the caret package in R for training of binary SVM classifiers. For reduction of features I am preprocessing with PCA using the built in feature [preProc=c("pca")] when calling train(). How ...
1
vote
0answers
213 views

Caret feature selection with customized random forest classifier

I'm following the Caret package tutorial for constructing customized functions for a recursive feature elimination. I can reproduce the provided example which is a random forest regression. However, ...
0
votes
1answer
65 views

How to define samples in caret package?

I am using the caret package and need to train a random forest, where only certain samples should be in the held-out set. I want to define the sampling for each tree in the random forest, for say 100 ...
1
vote
1answer
79 views

Glmnet Caret Package with small number of observations

I have a regression problem where I’m attempting to train a data set with 70 predictors, but only 35 observations with glmnet in the caret package. I’m trying to determine the best resampling method. ...
2
votes
0answers
102 views

Why does glmnet in caret give different predictions for different alphas even though lambda is zero?

In R, when using caret to train an elastic net regularization model, I find that different values of alpha give different predictions when the lambda parameter equals zero. This should not be the ...
0
votes
1answer
140 views

Rpart using Caret changes names of Factors

If I have a factor e.g. sexe with two levels MALE and FEMELLE let's say, using rpart alone I get splits that say for example Sexe = Male and then a yes no split. However using rpart with caret I get a ...
1
vote
1answer
637 views

Random Forest confusion matrix

I've been creating some random forest models using the caret package in R. I don't have a large amount of data to work with so I'm using 10 x 10-fold CV in lieu of an independent test set. When I ...
0
votes
1answer
84 views

Probabilistic importance value for Caret linear SVM classifier

In a linear SVM model, inside caret I would like to get the variable importance after recursive feature elimination, so according to the documentation: ...
0
votes
1answer
145 views

GBM Bootstrap Prediction Interval Code Error

based on code presented in thread: How to find a GBM Prediction Interval I am trying to apply this to my dataset. Below is my full code, and I am having issues with the bootstrap function. ...