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
1answer
37 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. ...
2
votes
1answer
78 views

How to find a GBM Prediction Interval

I am working with GBM models using the caret package and looking to find a method to solve the prediction intervals for my predicted data. I have searched extensively but only come up with a few ...
0
votes
0answers
8 views

preprocessing and dummy variables order of procedure

I would please like to know when I should conduct pre-processing procedures (removing near-zero variance, highly correlated predictor variables, and linear dependencies) when planning to create dummy ...
0
votes
0answers
8 views

Caret: customizing feature selection using matrix-wise operations [migrated]

Short question: is it possible to use matrix-wise operations in caretSBF$score function? Motivation: When working with big matrices in R, operations that work natively matrix-wise [e.g. rowMeans(X) ...
1
vote
2answers
21 views

Training nnet and avNNet models with caret when the output has negatives

My question is about the typical feed-forward single-hidden-layer backprop neural network, as implemented in package nnet, and trained with 'train()' in package caret. This is related to this question ...
0
votes
1answer
29 views

mtry tuning given by caret higher than the number of predictors

According to this discussion, it seems that the train function of the caret package returns a ...
0
votes
1answer
31 views

Feature Importance in each fold and repeat after repeated cross validation in caret

this is my first post on Cross Validated so I apologize in advance if I'm not yet familiar with any conventions regarding forum posts. Currently, I'm working on a feature selection task using elastic ...
0
votes
0answers
7 views
0
votes
1answer
25 views

How to get Sub-Training and Sub-Test from cross validation in Caret

I am using Caret function I have divided my data into training(75%) and test (25%) sets. Now I am running 10-Fold CV on training data. When i fit following model train_control <- ...
0
votes
0answers
23 views

A question about warning that performing k-fold CV with caret

I am trying to createFolds function in caret to use k-fold cross-validation in R. But I came across this warning: ...
-1
votes
1answer
23 views

Error: object 'descr' not found

I am trying to follow up the example code in the "Building Predictive Models in R Using the caret Package" paper from Max Kuhn[1]. Here is the part of the code: ...
0
votes
1answer
17 views

Perform analysis about model prediction diferrences using CARET

Using CARET package one can perform an analysis on differences between various models obtained using a dataset (the training dataset, trainSet) and the model that best fits the trainSet: For example, ...
0
votes
1answer
21 views

import kernlad model to caret

I'd like to test the anova rbf kernel included in the kernlab package in caret. Following excelent tutorial (https://topepo.github.io/caret/custom_models.html) I've come up with the following code: ...
0
votes
1answer
49 views

Caret package in R - get top Variable of Importance

I am facing two problems while using caret package in R. I am reproducing an example below: ...
1
vote
1answer
40 views

R caret - how to combine principal components and non-principal-component predictors?

Consider the following example. Suppose I want to model x in DF2 using everything else. While it makes sense to do ...
0
votes
0answers
55 views

Obtaining sequence of lambda values for training glmnet model via `caret`

I have multiple models that I'm training using train in the caret package, all while using the same cross validation folds to ...
0
votes
1answer
72 views

Using the Caret package is it possible to obtain Confusion Matrices for specific threshold values?

I've obtained a logistic regression model (via train) for a binary response, and I've obtained the logistic confusion matrix via ...
0
votes
1answer
46 views

Caret: customizing feature selection, nested inside cross validation

Using caret, I want to train a SVM classifier and estimate its performance using repeated cross validation. My dataset has a very large number of predictors (300K) and I want to reduce this number ...
0
votes
1answer
45 views

Leave-one-subject-out cross validation in Caret

Hi Dear Colleagues, I wonder how to correctly setup a leave-one-subject-out cross validation (LOSO) for train() function in caret. Here is my example code: ...
0
votes
1answer
367 views

Caret varImp for randomForest model

I'm having trouble understanding how the varImp function works for a randomForest model with the caret package. In the example ...
0
votes
1answer
165 views

Confusion between caret randomForest predict() results and reported model performance

This question seems related, but the consensus was that the issue had to do scaling the data, which I do prior to training, so I don't think that's the issue: Issue on prediction with FinalModel of ...
0
votes
0answers
27 views

Predict feature combination with highest probability

I trained a Support Vector Machine with the caret package in R. My dataset looks the following: ...
1
vote
0answers
60 views

Running R caret in Python script [closed]

I am currently trying to transition from R into Python to streamline the process of working in web-based applications. I know that SciKit Learn has a ton of functionalities parallel to R's, including ...
0
votes
0answers
64 views

recursive feature elemination in R with caret

i work with R caret software package to select the most important features from some set of data. My response is a factor of multiple classes (e.g. nominal ...
0
votes
2answers
46 views

How to get classification probabilities when running glmnet

I am trying to figure out how to get class probabilitis when running a classification using glmnet. I have built the model and done predictions. But all I have is a huge matrix which I don't really ...
0
votes
1answer
63 views

Find variables selected for each subset using caret feature selection

I am doing feature selection using the command 'rfe' in the caret package (http://caret.r-forge.r-project.org/featureselection.html). This command uses a metric to find the optimal amount of variables ...
0
votes
1answer
51 views

Caret retraining of neural network after finding optimal parameters?

I am applying a neural network and logistic regression to a classification problem. In order to evaluate the performance of the two classifiers I'm using 5-fold cross-validation (roughly 800 samples ...
0
votes
1answer
238 views

Train / Validate / Test sets in Caret

I want to use caret to compare two different classification algorithms. For example SVM and Elastic net. I want to put aside some samples for test set and then use the rest of the samples for ...
1
vote
1answer
41 views

The differences between models via their resampling distributions.

The caret package offers the ability to make statistical statements about the performance of different models used for classification. According to the description, ...
1
vote
0answers
59 views

Interpreting varImp using a GLMNET model on a 3-level factor

(tried stackoverflow but told I may have better luck here). I am looking for some help interpreting varImp using GLMNET multinomial model on a 3-level factor variable. The plot and the data don't make ...
0
votes
0answers
35 views

Discriminant analyses with NIRS in R

I am working with a NIR matrix consistent of 134 rows (samples) and 1529 columns (wavelengths), from which I want to discriminate between two categories (species). I have successfully used the plsda ...
2
votes
1answer
183 views

How to implement a hold-out validation in R

Let's say I'm using the Sonar data and I'd like to make a hold-out validation in R. I partitioned the data using the createFolds ...
0
votes
1answer
43 views

R's equivalente of scikit's KFold

I'm new to R and I'm trying to set up a basic k folds CV loop. In Python I'd use scikit's KFold. ...
0
votes
0answers
540 views

Caret with rxDForest as custom model

I'm trying to use the train function from the caret package to tune the parameters of the rxDForest from RevoScaleR package (I ...
0
votes
0answers
126 views

predictors and varImp functions in caret packages, should results match for a glmnet model?

I am using the train function in caret package. I have 55 predictors and a continuous outcome. The model that I selected is glmnet. Looking the results of using the "predictors" function-just to check ...
0
votes
1answer
142 views

How to use rfe object with function pickSizeTolerance in R package caret

I run caret's recursive feature selection with randomForest. While running rfe function with method repeatedcv, I had parameter ...
0
votes
1answer
216 views

Help requested with using custom model in caret() package

The caret package (terrific btw) has a lot of models built in but if you want to use a model that is not built in, there is a way as described in outline here ...
0
votes
1answer
121 views

What are RMSE SD and Rsquared SD metrics in resampling results using R package:caret?

I've been doing predictive modelling with R package caret. When resampling regression models, I get the traditional RMSE and Rsquared metrics, but also RMSE SD and ...
1
vote
1answer
386 views

Interpret Variable Importance (varImp) for Factor Variables

When I run variable importance on a random forest (or any other model), the factor/categorical variable names have the factor name as the suffix. For example, ...
3
votes
0answers
658 views

R - how to let glmnet choose lambda range when using caret?

To fit a lasso model using glmnet, you can simply do the following and glmnet will automatically calculate a reasonable range of ...
0
votes
2answers
90 views

Machine Learning with Skewed Classes in R

I am looking for some suggestions on what methods are appropriate for training a dataset with a high skew in the outcome classes. The ratio of Class 0: Class 1 is about 20:1 and I am looking to ...
1
vote
0answers
348 views

Backward stepwise regression with cross validation in R

I would like to do model selection using backward stepwise procedure and cross validation. https://www.otexts.org/fpp/5/3 I have used stepAIC in ...
0
votes
0answers
252 views

How does knnimpute of the preprocess function work?

I am new to R and I use a script I do not completely understand. It preprocesses a dataset for data mining. At one point, the data (stored in fil) should be ...
3
votes
1answer
729 views

Understanding the output of C5.0 classification model using the CARET package

The C5.0 classification model was used in this 4-class problem data with $N_{train}$=165, $P$=11, using caret R-package by ...
2
votes
1answer
242 views

How to interpret this cross-validated sparse LDA figure using CARET package?

Training data with $p$ =11 predictors and $n$ =165 with 4-class problem was cross-validated (5 times repeated 10-fold CV) using the sparse LDA (aka SDA) using caret ...
1
vote
1answer
731 views

What is the best strategy to train and validate classification using PLS-[classifier] in caret package?

I have 4 clusters (see plot below) extracted from data of medical samples N=218 measured for 11 genes/predictors P=11 by this ...
1
vote
1answer
2k views

Issue on prediction with FinalModel of RandomForest in R using the CARET package

I use the caret package for training a randomForest object with 10x10CV. ...
0
votes
0answers
386 views

Using caret train function to perform lm with 10 repeated 10-fold cross validation

I'm using the caret package at the moment to perform different forms of analysis on my dataset. I did the following to do 10-fold cross validation, 10 times:- ...
2
votes
1answer
322 views

What is the difference between function createFolds and createDataPartition in caret

I think the two functions are all to split the data, but I really can't get the difference between both of them, even I has read the help manual of them.