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

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 ...
1
vote
1answer
34 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
25 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
15 views

Creating folds for k-fold CV in R using Caret [migrated]

I'm trying to make a k-fold CV for several classification methods/hiperparameters using the data available at ...
0
votes
0answers
54 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
22 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
27 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
48 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
26 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
90 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, ...
1
vote
0answers
115 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
46 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
175 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
66 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
163 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
121 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
180 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
196 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
107 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:- ...
1
vote
1answer
80 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.
1
vote
1answer
134 views

Question about performing k-fold CV with caret

I have read the help manual of caret carefully: see A Short Introduction to the caret Package. In its example, I found it split the data with createDataPartition before a model training. ...
0
votes
1answer
79 views

Caret package Varimp - feature selection question

I decided to use RFE using the caret package for feature selection for a logistic regression model. The documentation says the Varimp for linear model uses the absolute value of the t-statistic for ...
0
votes
0answers
103 views

Metric warning using caret's rfe

I am using the caret package to do feature selection with rfe while training a knn ...
0
votes
0answers
26 views

Recursive Feature Elimination Fails to Output as Expected

Currently I am using rfe function in the "caret" package to do feature selection. There are 380 variables as input candidates. I have done many trials and I noticed that something weird always ...
2
votes
1answer
242 views

Time-series machine learning methods and R packages

I am trying to determine how to use machine learning models such as for eg., random Forest with (non-financial) time-series data. Using an example, suppose we wanted to find based on monthly scores ...
1
vote
2answers
202 views

lambda value in glmnet tunning cross validation changes when repeating test

I'm using glmnet package to build a linear regression with $\alpha$ = 0.5, to find best $\lambda$. xMatrix [44x15000] ...
2
votes
1answer
380 views

Does caret train function for glmnet cross-validate for both alpha and lambda?

Does the R caret package cross-validate over both alpha and lambda for the ...
1
vote
1answer
107 views

Number of trees using cforest in caret

I have read some of the previous posts about this issue and I still do not understand how caret decides on the number of trees when you use the model=cforest from ...
1
vote
1answer
194 views

R caret difference between ROC curve and accuracy for classification

In case of caret package test function metric option, one can use either accuracy or ROC as a metric that will be used to finalize values of tuning parameters. I felt that accuracy and ROC are the ...
1
vote
1answer
245 views

LGOCV caret package R

i am learning data mining through book . During classification chapters about Neural Networks the authors have below code. I have below questions: ...
2
votes
1answer
331 views

Caret and coefficients (glmnet)

I am interested in utilizing caret for making inference of a particular data set... Is it possible to do the following: producing coefficients of a glmnet model I trained in caret. I would like to ...
3
votes
1answer
415 views

R/caret: train and test sets vs. cross-validation?

This may be perhaps a silly question, but when generating a model with caret and using something like LOOCV or (even more to the point) ...
0
votes
0answers
126 views

Getting unbiased probability predictions from kernlab SVM

I am creating a meta-classifier that uses probability predictions from many base classifiers, among which I use SVM classifiers. It is a two-class prediction problem (outcomes are 'yes' or 'no'). I ...
0
votes
0answers
164 views

How does random forest, through the R package caret, make predictions?

I am using random forest (caret package in R) to predict unknown samples and classify them into one of eight groups. I am trying to determine how random forest places each sample into each group. I ...
1
vote
1answer
283 views

caret rfe variable selection and test prediction

I have ~800 continuous variables and a categorical response variable (disease/non-disease) and I have been using caret to classify disease based on the continuous variables. I have used caret and ...
1
vote
1answer
197 views

R caret package question

...
0
votes
0answers
64 views

Is this a decent way of checking whether my model can predict well?

I have made a model using lm where I have manually chosen which predictors to use. As a first step, I train the model using all available data. Now, to check whether this model has any predictive ...
1
vote
0answers
66 views

Measuring the effect of sample size on classification

I've got a data frame with 1000 observations and I am playing with classification methods using caret package. I'm mostly using the bootstrap method to check model ...
0
votes
1answer
52 views

Search for interactions using carets rfe function

it is straight forward to search for purely additive models using the rfe function in caret. Is it possible to include all interactions as part of the search? In the train method, we can simply say ...
4
votes
2answers
362 views

Use Random Forest model to make predictions from sensor data

say I have a sensor that measures temperature, pressure ++, and want to use this data to predict some quantity "A". If I use multivariate regression, I can simply implement a model of the form ...
2
votes
0answers
154 views

neuralnet error

I am trying to train a neuralnet model by using caret package by this command: ...
0
votes
0answers
286 views

Confusion matrix with low incidence rate

I am trying to use a binomial regression to predict customer churn. A reproducible example is below. In the example, there is about 5% latent attrition and customers with a price above 200 have a 15% ...
3
votes
1answer
160 views

Recommend classification algorithms to try

I am working on a binary classification problem that is reasonably-sized (100k observations). I extracted 60 numerical features; the classes in the training set are well balanced. There are some ...
0
votes
0answers
337 views

Interpreting output of 10-fold CV on classification tree

Using info from Decision tree model evaluation for "training set " vs "testing set " in R , I was able to run a 10-fold cross validation on my entire dataset, using this command: ...
0
votes
1answer
247 views

Feature selection with Caret for data with more than one target

I am trying to do some feature selection, having around 3500 variables for about 200 samples. To each sample is associated two numerical values (the expected outcome). I can't manage to make the caret ...
3
votes
1answer
469 views

Caret and randomForest number of trees

I am puzzled as to why the caret package in R does not allow tuning on the number of trees (ntree) in a random forest (specifically in the randomForest package)? I cant imagine this is an oversight on ...
1
vote
0answers
72 views

Training with very few positives

I have a binary classification problem where the fraction of positives is very low, e.g. 20 positives in 10,000 examples (0.2%) What is an appropriate cross validation scheme for training a ...
2
votes
1answer
94 views

Packages or libraries for multiple-output learning

I have a learning problem from $X$ to $Y$ where: $X$ = $n$ input numeric vectors of $m$ dimensions $Y$ = $n$ output numeric vectors of $k$ dimensions In other words:       I am ...
1
vote
2answers
775 views

Feature selection using caret + repeatedcv

I am using caret and repeatedcv with repeats for feature selection. That is, ...
3
votes
2answers
804 views

PCA and k-fold Cross Validation in Caret

I just re-watched a lectured from the Machine Learning course on Coursera. In the section where the professor discusses PCA for pre-processing data in supervised learning applications, he says PCA ...