Top "R-caret" questions

caret is an R package for classification and regression training.

Time-series - data splitting and model evaluation

I've tried to use machine learning to make prediction based on time-series data. In one of the stackoverflow question (createTimeSlices …

r time-series r-caret
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]): contrasts can be applied only to factors with 2 or more levels

I'm using the R caret package to generate a model. I'm using PCA in the pre-process for dimensionality reduction and …

r r-caret
How to make a tree plot in caret package?

I'm using caret package to model the data using rpart package. library('caret') data(iris) formula <- as.formula(…

r plot rpart r-caret
R package caret confusionMatrix with missing categories

I am using the function confusionMatrix in the R package caret to calculate some statistics for some data I have. …

r missing-data r-caret confusion-matrix
Creating data partition in R

With caret package, when creating data partition 75% training and 25% test, we use: inTrain<- createDataPartition(y=spam$type,p=0.75, …

r partitioning r-caret data-partitioning
caret train() predicts very different then predict.glm()

I am trying to estimate a logistic regression, using the 10-fold cross-validation. #import libraries library(car); library(caret); library(e1071); …

r glm r-caret confusion-matrix
Saving and loading a model in R

When working with caret, how can I save a model after training, and load it later (e.g. in a …

r r-caret
How to retrieve overall accuracy value from confusionMatrix in R?

In R caret library, if I got a confusion matrix like this below, if there a way to retrieve the …

r r-caret confusion-matrix
ROCR error: Format of predictions is invalid

After getting my predictions from glmnet, I am trying to use "prediction" function, in "ROCR" package, to get tpr, fpr, …

r r-caret proc-r-package
R caret package (rpart): constructing a classification tree

I am struggling for several days to perform a classification tree using the caret package. The problem are my factor …

r rpart r-caret