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

R caret package, tuning parameters using a data set

In R caret package, is there a way to tune training parameters using a specific (validation) data set instead of using ...
0
votes
0answers
12 views

Loss function selection for weighting errors differently

I am building a regression model where I want to score/optimize/train 'over-predictions' to be twice costly as under predictions. I am attempting to do this in R and hopefully with caret package. ...
0
votes
0answers
15 views

Aggregation of Cross-Validated Results

I am using satellite weather features to predict agricultural productivity. I have several models that predict at the daily level. However, I would also like to predict average yield for each week ...
0
votes
1answer
24 views

Naive Bayes error with caret

I want to predict a variable with Naive Bayes. I tried it with another one from the same dataset and it worked perfect but not with the desired. The variable to predict contains values like "OL","DL" ...
0
votes
1answer
27 views

R nnet (Caret) not giving results for size = 8 and above

This is my first post in CrossValidated hence please let me know if I may have inadvertently violated forum rules. I am working with nnet using Caret in R and when I am running experiments using the ...
0
votes
1answer
32 views

PreProcess from Caret doesn't work with a smaller dataset

I am trying to use Caret to train some prediction models. As part of this, I would like to use 'PreProcess'. I have, however, come to the conclusion that PreProcess requires a certain number of ...
1
vote
0answers
31 views

Difference in execution times between caret and randomForest (even with method = “none”)

I have a dataset with 1205 observations and 285 predictors (all but one categorical). It is a binary classification task. When I run randomForest, it executes in less than 1 second. When I run ...
0
votes
0answers
239 views

Interpretation of results using caret R package and random forests regarding training a classifier

In conjuction to one of my previous posts, (Important questions regarding the methodology for constructing classifiers with R package caret and tree based algorithms) i used the R package caret and ...
1
vote
1answer
55 views

Important questions regarding the methodology for constructing classifiers with R package caret and tree based algorithms

I'm currently playing with caret R package, with one merged microarray affymetrix dataset(paired tissue samples), in order to build and test various classifiers, mostly based on trees-such as random ...
0
votes
1answer
15 views

caret - get standard errors of glm model

When estimating a glm model with caret, using the summary function the standard errors are ...
1
vote
0answers
34 views

Caret - Repeated K-fold cross-validation vs Nested K-fold cross validation, repeated n-times

The caret package is a brilliant R library for building multiple machine learning models, and has several functions for model building and evaluation. For parameter tuning and model training, the ...
2
votes
1answer
136 views

Is it necessary to split dataset for cross validation?

I am using caret package in R for training dataset and cross validation process. I am confused about cross validation process. Now, i am splitting the dataset to two subset, training and testing; ...
0
votes
1answer
59 views

Different randomForest results via caret and randomForest package using seeds on train control

After following the questions Different results from randomForest via caret and the basic randomForest package Fully reproducible parallel models using caret Below there is a reproducible example ...
0
votes
2answers
72 views

In what situations would cross validations scores be inaccurate?

I'm trying to fit a SVM model on times series stock return data, predicting a buy, hold, or sell signal of the stock. I'm using 10-fold cross validation (using the R package ...
1
vote
1answer
38 views

Is this an anomaly detection problem?

The following is a plot of a response (y) variable. It's a continuous variable (one month future returns on a set of stocks). I'm particularly interested in predicting the tails. Many machine ...
0
votes
1answer
48 views

pickSizeBest() for recursive feature elimination

I'm struggling providing my recursive feature elimination (RFE) function with valid arguments. This question is technically pretty specific so I hope I've hit the right Forum to ask it. I want to ...
0
votes
0answers
26 views

Why is there a difference between using the package rpart and using the method “rpart” in the caret package?

When I'm running rpart on my train set, it suggests a different cp than rpart does, even though I'm using the same seed. The two formulas I am using are: Using the Caret package fitControl <- ...
0
votes
0answers
42 views

Extracting underlying model output from Caret's train() function

I am using the great {caret} package to run a lot of models, however I would like to analyse the model as one usually does having run that model in its own right, ...
0
votes
0answers
33 views

How is variable Importance using varImp (caret Package) calculated when doing repeated cross validation?

I was wondering how variable importance is calculated for repeated cross validation when using the function varImp from the caret package in R. I assume, the importance for a a 5 Fold CV is simply ...
2
votes
0answers
36 views

Comparison of models with transformed dependent variable

I want to check if transforming the dependent variable positively influences the model performance. For example, I have built two models using the caret package. ...
0
votes
0answers
18 views

Predict Soccer Match with empty variables in test set

I have a dataset with soccer results and a lot of meta data like corners, result in the half time, fouls etc. To traing the algorithm (in my case Support Vector Machine) is use all this variables. ...
0
votes
1answer
56 views

How is gbm package different from caret with gbm method?

I have a gbm problem and I am using the gbm package in R for it. But in most forums I see people using caret package for gbm. Is there any advantage of using caret instead of gbm package? If so, what ...
1
vote
0answers
16 views

Caret returns weird accuracy

I predict 9 values via Classification Tree based on 50 samples. For measuring the accuracy I use the function postResample(). It sais the accuracy is 80% but it ...
1
vote
0answers
34 views

Is R package caret relevant for multiple classes problem? [closed]

I am interested in a multiple classes problem with imbalanced classes and I was rather happy with the caret package so far but, I have some practical and ...
0
votes
0answers
14 views

Specifying probability threshold (CARET)

This seems like a fairly straight forward problem, but I am unable to find a resolution for this. I have just started using the CARET package, and I am trying to perform K-fold cross validation on a ...
0
votes
0answers
38 views

Understand outer cross validation with caret in R

I have a question that I cannot solve. Sorry if it is too naive, I am a beginner. I have a data set from wich I would like to predict a continuous variable Y based on a set of features. By now I ...
0
votes
0answers
11 views

Use observation-weighted optimisation metric in PLS machine learning

I would like to build a model that trains a PLS algorithm to minimise a weighted sum of square errors (where the weights are proportional to the magnitude of the true y observation). The reason for ...
0
votes
0answers
14 views

Hyper variable selection for neural network

How do I choose my decay and size parameters for a neural network? For context, I have written this piece of code for regression using caret package. The data ...
3
votes
0answers
45 views

PLS using a kernel matrix

I would like to use a kernel matrix generated with a custom kernel function to fit a PLS-DA model (I am thinking of caret's PLS-DA at the moment), with only one binary response variable in the Y ...
2
votes
0answers
36 views

Manual vs automated approach for predictive modeling

Many statistics textbooks emphasise a manual modeling design approach, whereby the practictioner performs exploratory analysis by hand to assess several factors including whether there's any ...
1
vote
1answer
83 views

R caret Naive Bayes (untuned) results differ from klaR

I'm running a naive bayes classification model and I noticed that the caret package returns a different result than does klaR (which caret references) or e1071. My question is: is there something ...
0
votes
2answers
111 views

R: Random Forest throwing NaN/Inf in “foreign function call” error despite no NaN's in dataset

I'm using caret to run a cross validated random forest over a dataset. The Y variable is a factor. There are no NaN's, Inf's, or NA's in my dataset. However when running the random forest, I get ...
0
votes
1answer
167 views

Ensemble models in R

I have a clinical dataset (1400 cases) and I applied 4 data mining techniques (ANN, Decision Tree, SVM, Logistic Regression) to predict the binary outcome (Yes, No). Now, I want to improve prediction ...
0
votes
1answer
163 views

Data imputation with preProcess in caret returns less observations than expected

I wonder why preProcess function from R's caret package used for imputation of dataset's missing values returns less observations than in original dataset? For example: ...
0
votes
0answers
61 views

Interpretation of results regarding ROC plot on training a classifier with caret and randomForests R packages

@Dear People, i used firstly the function train() from caret package, to construct-train a classifier with random forests on a merged microarray dataset regarding selected genes, for a binary ...
0
votes
1answer
79 views

Correct level setting of factor outcome for training a dataset with train function of caret R package

i would like to ask a specific question about machine learning implementation procedures in R, and especially about caret R package and randomForests: if i want to use the function train from the ...
3
votes
1answer
68 views

Different ROC value for different packages in R, which one is correct?

I noticed that computing ROC with caret package and PROC packege sometimes gives different results. Usually they are the same, but if the predictions are worse than chance, caret will flip them and ...
1
vote
1answer
33 views

Diagnosing linear skew of residuals in boosted tree

I have trained a boosted tree regression with the following code (out of the caret and gbm packages: ...
0
votes
0answers
153 views

How to split dataset for Time Series Data using caret package for R

I have a dataset of many predictors including Individual and Year. If I understand how the caret package works for creating folds, it randomly splits the dataset irrespective of variables. The years ...
1
vote
1answer
164 views

Why use dummy variables in GBM using CARET library in R

I have seen a few examples implemting the gbm algorithm on youtube using the titanic dataset. These examples have turned some factor variables into dummy/indicator variables when GBM can handle factor ...
0
votes
2answers
111 views

Caret: PCA preprocessing and partitioning train and test data

My training and test data are in two distinct .csv files: ...
0
votes
2answers
36 views

Prediction for non-negative data using PLS/alternative

I am currently using PLS (the set of predictors are quite highly-dimensional) to predict a particular variable, $age$, and I am using Caret's train implementation using the pls method: ...
0
votes
1answer
40 views

Preprocessing via PCA in Caret, then fitting PLS

I am dealing with quite highly-dimensional data, and am using (in R) Caret's preprocessing 'pca' method to reduce the dimensionality. However, dependent on the number of components I choose, I seem to ...
0
votes
1answer
66 views

Which parameters to tune in CART?

I am using caret package in R to train CART model. train function seems to tune only the complexity parameter (which in a way determines depth of the tree and number of terminal nodes). Is this ...
0
votes
1answer
19 views

Lattice formula syntax for 'calibration' function in caret

I would like to use the function 'calibration' from the caret package to produce calibration plots for a few classifiers that I have. Unfortunately I am having trouble understanding the documentation ...
1
vote
1answer
111 views

Naive Bayes Classifier in R with class weights

I'm searching for a Naive Bayes classifier in R where I can add a paramter for class weights. I need this, because my data is highly unbalanced. Eg.: Class1: 1000 examples Class2: 800 examples ...
1
vote
1answer
365 views

One class SVM with caret in R using cross validation

I am using one class SVM to train and predict anomalies. I would like to train the model using cross validation in an easy way as I have done with a multiclass SVM with caret in R. Now, I train the ...
2
votes
1answer
585 views

How to create a data partition in R using categorical and numerical columns?

I'm using the createDataPartition method of the caret package as following: ...
3
votes
3answers
139 views

Do we have to fix splits before 10-folds cross validation if we want to compare different algorithms?

I work with R and let's say that I have a train set and a test set. I want to test different algorithms (for example neural networks and svm). I will perform a first 10-folds cross validation on my ...
0
votes
0answers
127 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 ...