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
10 views

Running repeated cross-validation for multiple models using same dataset (caret package)

I'm currently using the train() function in the caret package to run 10-fold repeated cv on a random forest model. I would also like to explore other statistical and machine learning models for use ...
1
vote
2answers
23 views

Which data split should I use to determine cutoff point for classification?

I'm building a classification model using the caret package. I'm splitting my dataset in train and test (80/20) and training using 10-fold cross-validation repeated ...
0
votes
1answer
16 views

Which data transformation can improve the performance of MLP neural networks for classification?

I am trying to fit several MLP neural networks models with a single hidden layer using the caret R-package. My main concern now is in the preprocessing step. My train data features (16 in total) are ...
1
vote
0answers
26 views

Problem in passing parameter 'maximize´ through to xgbTree from caret train function [closed]

I am using train in caret package to train a xgbTree model. I want to use the early.stop.round parameter of ...
0
votes
1answer
36 views

Class weights in caret

I'm using the R package caret to generate classifiers using a variety of different models on an imbalanced dataset. To overcome the class imbalance problem, I am using the "weights" parameter in the ...
3
votes
0answers
50 views

How to interpret caret's variable importance and feature selection plots?

I am having some problems understanding the variable importance and feature selection graphs from ...
0
votes
1answer
34 views

Using partial AUC as Caret metric for cross-validation?

I'm evaluating a grid of tuning parameters using Caret with metric="ROC" for cross-validation. Is there any simple way to use as metric the area under the curve for an specified interval of the ROC ...
0
votes
1answer
29 views

How can I use negative binomial regression with caret?

I'd like to use negative binomial regression with caret. However in the list of supported models I can't find it. I tried to use: ...
0
votes
0answers
21 views

Error Output - Wrong model type for regression

I am trying to constructs an Learning Vector Quantization (LVQ) model. ...
1
vote
0answers
22 views

Pass custom weight function to 'kknn' model in Caret package

I am working on school project, where I'm trying to implement improvement for weighted kNN in CARET package. I basically need to replace standard 'weight' function used in KKNN model to something more ...
0
votes
0answers
27 views

Feature selection + classification in Caret

I'm using Caret to apply a bunch of different machine learning algorithms for phenotype prediction from gene expression data. With about 20,000 genes, I'd like to perform filter feature selection ...
1
vote
1answer
52 views

Most Parsimonious Elastic Net Model - choosing $\alpha$ and $\lambda$

How do I calculate which Elastic Net model is the most regularized/parsimonious? I am recreating GLMnet in another language as an exercise. I want to do a grid search over several values of alpha and ...
1
vote
0answers
31 views

Formula to derive probabilities when using 'gbm' method through 'caret' package in R

I am training a classification problem by 'gbm' algorithm through 'caret' package in r.The response variable is a yes/nope type. Here 'objmodel' is the model I trained through method='gbm' and package ...
1
vote
1answer
100 views

Area under ROC curve for random forest

Does the area under ROC curve depends on which class is defined as default positive class by the random forest model? I am using ...
0
votes
1answer
62 views

Predictions for rpart model require more variables than shown in the classification tree

Using rpart from the caret package, when plotting the final model I get a classification tree that seems fairly simple (6 variables shown in tree). However, when I request the final variables from ...
0
votes
0answers
74 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
68 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
42 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
78 views

Caret feature selection [RFE] yields different features depending on reference level of two-class dependent measure

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
121 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
54 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
2answers
30 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
28 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
1answer
133 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
1answer
70 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
72 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
37 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
61 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
85 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
64 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
146 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
66 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
43 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
74 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
245 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
105 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
155 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
154 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
55 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
150 views

Change settings in the prediction model (caret package)

I am using the package caret and GBM method for my predictions. ...
0
votes
0answers
73 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 ...
1
vote
0answers
566 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
209 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
64 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
148 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
70 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
23 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
107 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
136 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
115 views

Data partitioning according two variables

I am working with the following dataset: ...