r-caret Questions
4
I am receiving the following error in R when stacking using the caret package.
"Error: At least one of the class levels is not a valid R variable name; This will cause errors when class probabil...
Atthia asked 25/6, 2018 at 11:17
11
I've trained a tree model with R caret. I'm now trying to generate a confusion matrix and keep getting the following error:
Error in confusionMatrix.default(predictionsTree, testdata$catgeory)
...
Thankyou asked 17/7, 2014 at 10:44
5
Solved
When I install caret with.
install.packages("caret", dependencies=c("Depends", "Suggests"))
library(caret)
## Loading required package: lattice
## Loading required package: ggplot2
Error in L...
2
Solved
In addition to predicting the class labels, is it possible to return the expectation of each observation in new data when predicting?
library(caret)
knnFit <- train(Species ~ ., data = iris, me...
1
I am using the train function in caret to train a SVM using the svmRadial kernel for a binary classification task I have.
When I run the train function on my data, I incrementally get these messa...
Glomerulonephritis asked 6/4, 2017 at 23:15
6
Solved
I am using the caret package to train a model with "rpart" package;
tr = train(y ~ ., data = trainingDATA, method = "rpart")
Data has no missing values or NA's, but when running the command a wa...
3
Solved
When I run 2 random forests in caret, I get the exact same results if I set a random seed:
library(caret)
library(doParallel)
set.seed(42)
myControl <- trainControl(method='cv', index=createFo...
Overcritical asked 15/11, 2012 at 18:1
1
Having an issue while running a logistic regression model using caret::train().
LR = caret::train(Satisfaction ~., data= log_train, method = "glm", preProcess = c("scale"), fami...
Ambiguous asked 25/10, 2020 at 1:56
2
Solved
While using Caret package for machine learning, I am struck with Caret's default "Positive" outcome picking i.e the first level of the outcome factor in binary classification problems.
Package say...
1
I am trying to fit a Random Forest model with caret. My training data weight 129MB and I'm computing this on Google Cloud with 8 cores and 52GB RAM. The code I'm using is below:
library(caret)
lib...
Einberger asked 2/4, 2019 at 17:15
1
Solved
I would like to repeat the hyperparameter tuning (alpha and/or lambda) of glmnet in mlr3 to avoid variability in smaller data sets
In caret, I could do this with "repeatedcv"
Since I real...
1
Solved
My problem
I would like to build a logistic regression model with a high AUC in predicting a binary variable.
I would like to use the following approach (if feasible):
Use an elastic net model (gl...
Geaghan asked 14/3, 2021 at 4:34
2
Solved
yesterday I updated my R packages and since then parallel execution of the train function fails.
It seems like some functions that are called from within the workers are not available. These funct...
Toucan asked 9/1, 2014 at 19:8
1
Solved
I have been using a gbm in the caret package in Rstudioto find the probability for the occurrence of a failure.
I have used Youden's J to find a threshold for the best classification, which is 0.63...
Pharmacopoeia asked 22/1, 2021 at 12:12
1
Solved
I would like to calculate the 10-fold cross-validated AUC of an elastic net regression model with the optimal alpha and lambda using caret::train
https://stats.stackexchange.com/questions/69638/doe...
Adulterer asked 20/1, 2021 at 17:38
2
I am trying to fit a random forest model to my dataset and I would like to select the best model based off of the F1 score. I saw a post here describing the code necessary. I attempted to copy the ...
4
I'm building a predictive model and am using the mice package for imputing NAs in my training set. Since I need to re-use the same imputation scheme for my test set, how can I re-apply it to my tes...
Lottielotto asked 3/11, 2015 at 13:12
1
Solved
I want to calculate variable importance for glmnet model in R. I am using glmnet package for fitting the elastic net model like
library(glmnet)
library(caret)
library(vip)
data_y <- as.vector(m...
1
Solved
I came up with following issue when I try to extract the predicted probabilities using support vector machine (SVM). Usually the probability cutoff for a classification algorithm is 0.5. But I need...
Vitovitoria asked 5/9, 2020 at 0:8
2
Here is my code:
library(MASS)
library(caret)
df <- Boston
set.seed(3721)
cv.10.folds <- createFolds(df$medv, k = 10)
lasso_grid <- expand.grid(fraction=c(1,0.1,0.01,0.001))
lasso <- t...
Mezzosoprano asked 23/1, 2017 at 0:47
8
I am trying to install R package caret
Which gives me ERROR: dependencies ‘ggplot2’, ‘reshape2’, ‘BradleyTerry2’ are not available for package ‘caret’
I tried to install each of this individually...
3
Solved
I used caret to train an rpart model below.
trainIndex <- createDataPartition(d$Happiness, p=.8, list=FALSE)
dtrain <- d[trainIndex, ]
dtest <- d[-trainIndex, ]
fitControl <- trainCont...
1
Consider 3 data sets train/val/test. sklearn's GridSearchCV() by default chooses the best model with the highest cross-validation score. In a real-world setting where the predictions need to be acc...
Substitutive asked 31/10, 2019 at 16:55
1
On numerous occasions I've been getting this error when trying to fit a gbm or rpart model. Finally I was able to reproduce it consistently using publicly available data. I have noticed that this e...
Turbot asked 28/7, 2015 at 19:48
2
Solved
I have rather huge dataset in which I would like to exclude columns with a rather low variance, which is why I would like to use the phrase NearZeroVar. However, I do have some trouble understandin...
Defecate asked 15/6, 2020 at 16:26
1 Next >
© 2022 - 2024 — McMap. All rights reserved.