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

0
votes
0answers
11 views

Problem using metric='ROC' in caret train function in R [migrated]

I have an imbalanced data set with two classes therefore I thought I could use ROC as a metric instead of Accuracy to tune my model in R using caret package (I am trying different methods such as ...
0
votes
0answers
8 views

Caret - Changing tuneGrid gives different results for same parameters

I'm having an issue training a GBM model in caret. I'm quite new to all of this, but I'll try to explain things as best as possible, but please let me know if you need any further info. My code looks ...
0
votes
0answers
54 views

Non-linear regressions with caret package in R [closed]

i'm new using R and my doubt is really basic. I have several dependent variables (x) and one independent variable (y), and I'd like to generate different regression models with ...
0
votes
0answers
29 views

rpart model has zero splits after using caret's train

I am using rpart to get a classification model for my data but I do not know how to allocate the bucket size so as to avoid getting an overfitted or underfitted model. To get the optimal bucket size, ...
0
votes
0answers
16 views

Clustered bootstrap for multilevel data with caret train in R

The clustered bootstrap would be appropriate for assessing predictive performance of a model with multilevel data where, for example, students are nested within schools such that there is a non-zero ...
0
votes
0answers
25 views

Caret feature selection [RFE] yields different features depending on reference level of binary outcome

I'm using RFE from the caret package in R to select variables to be used in a linear discriminant analysis. The outcome is a binary factor, but depending on which level of the factor is used as the ...
2
votes
0answers
52 views

Isn't caret SVM classification wrong when class probabilities are included?

*Please note this question is about the Platt probabilistic output and SVM class assignment, not about the code or the package itself. It just happens to be the code where I stumbled on the issue. In ...
2
votes
1answer
35 views

How do I rank coefficients returned from a ridge regression?

I am running a ridge regression using GLMNET (alpha = 0) and would like to interpret the coefficients returned. I know there isn't really a significance test for this, but can I at least rank the ...
0
votes
1answer
18 views

How to use a varImp function to select features from training set?

Till now I have used a following flow for training a random forest model. ...
0
votes
0answers
15 views

predictions with caret and logistic with restricted cubic splines

I am fitting a logistic regression using RMS's R package restricted cubic splines and within the caret package infrastructure. I fit the model well, but when I ask the model to predict new samples it ...
0
votes
0answers
9 views

R: how does caret choose default tuning range? [migrated]

When using R caret to compare multiple models on the same data set, caret is smart enough to ...
0
votes
1answer
74 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
34 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
48 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
1answer
25 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
34 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
51 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
43 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
70 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
27 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
46 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
138 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
71 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
81 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
78 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
50 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
72 views

Change settings in the prediction model (caret package)

I am using the package caret and GBM method for my predictions. ...
0
votes
0answers
45 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
114 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
127 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
38 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
78 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
46 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
21 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
71 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
93 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
79 views

Data partitioning according two variables

I am working with the following dataset: ...
0
votes
0answers
18 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
78 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
17 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
110 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
30 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
559 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
160 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
80 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. ...
1
vote
1answer
51 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
115 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
1answer
57 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 ...