Questions tagged [c5.0]
37 questions
3
votes
1 answer
How do I extract the classification tree from this parsnip model in R?
I am working through 'Machine Learning & R Expert techniques for predictive modeling' by Brett Lantz. I am using the tidymodels suite as I try the example modeling exercises in R.
I am working through chapter 5 in which you build a decision tree…

for_the_love_of_cod
- 47
- 5
3
votes
1 answer
Error: *** line 1 of `undefined.cases': bad value of ... for attribute
I'm training a decision tree, C5.0, and everything runs just fine until I try to predict values in the test dataset. I am not sure what the error means:
library(pacman)
p_load(tidyverse, NHANES, C50)
rows <- sample(nrow(NHANES), as.integer(0.75 *…

ThrmsNPrfs
- 55
- 1
- 9
2
votes
1 answer
How to plot a tree produced by C5.0 in tidymodels?
Why in the following short reprex I get an error for plotting a C5.0 tree when using
tidymodels and I don't get same error when using C5.0 package directly ?
I used the same C50 parameters in both cases. I tried to find documentation about this but…

Marc Kees
- 206
- 2
- 15
2
votes
1 answer
How to plot final c50 decision tree model (library C50) from caret::train object
I trained Decision Tree model using train function from caret library:
gr = expand.grid(trials = c(1, 10, 20), model = c("tree", "rules"), winnow = c(TRUE, FALSE))
dt = train(y ~ ., data = train, method = "C5.0", trControl = trainControl(method =…

Helios
- 141
- 1
- 2
- 10
1
vote
1 answer
what's wrong with this small decision tree using C5.0?
I'm trying to make simple decision tree using C5.0 in R.
data has 3 columns(including target data) and 14 rows.
This is my 'jogging' data. target variable is 'CLASSIFICATION'
WEATHER JOGGED_YESTERDAY CLASSIFICATION
C N …

kang yep sng
- 73
- 4
1
vote
2 answers
C5_rules() in Tidymodels
I would like to use tidymodels to fit a C5.0 rule-based classification model. I have specified the model as follows
c5_spec <-
C5_rules() %>%
set_engine("C5.0") %>%
set_mode("classification")
In the documentation for the C5_rules()…

cyn
- 11
- 1
1
vote
1 answer
C5.0 package: Error in paste(apply(x, 1, paste, collapse = ","), collapse = "\n") : result would exceed 2^31-1 bytes
When trying to train a model with a dataset of around 3 million rows and 600 columns using the C5.0 CRAN package I get the following error:
Error in paste(apply(x, 1, paste, collapse = ","), collapse = "\n") : result would exceed 2^31-1 bytes
From…

Sara Sanz
- 51
- 3
1
vote
0 answers
Error using R caret package (train) with C5.0 decision tree to do K-fold cross validation
NOW SOLVED.
The problem was data=OneT.train, which was wrong. This code was copied over from the original. It needs to be data=OneT in the caret train() function. The current OneT.train had missing values in an attribute field, not the target, from…
user13248694
1
vote
1 answer
How to get the actual class and the prediction class for all data in R?
I create the model and do the predicition with this script in R,
model = C5.0(dataset1[1:100, -7], dataset1[1:100, 7])
if I run summary(model), the output is just confusion matrix and the decision tree.
Then, how to know the all prediction result…

ferdianm10
- 55
- 4
1
vote
0 answers
Strange results for attribute usage in Decision Tree with caret
I want to know what variables are important in my decision tree model.
I got the model by using train() of caret package.
But the results for attribute usage are strange for fator variables.
Below is my code.
set.seed(123)
ctrl <-…

Amy
- 83
- 1
- 10
0
votes
0 answers
Caret C5.0 warnings
I wonder if something is going on with my syntax or with caret here? I'm using the caret package in R Version 4.2.3 to build a boosted tree model using C5.0. I'm consistently getting the same type of warnings:
I originally thought that this was…

Dan
- 133
- 7
0
votes
0 answers
Path followed by a model C5.0 in R
I would like to know which is the path that a prediction has followed in a model C5.0 in R.
For instance, if the dataset has 4 variables, the aim of the code is to obtain which of these four variables have been checked by the tree in order to…

SERVATO 02
- 1
- 1
0
votes
0 answers
decision tree fail when adding error cost in c5.0
I get this error only when adding error matrix to the formula:
Call:
C5.0.default(x = heart_train, y = heart_train_results, trials = 1, costs = error_cost)
C5.0 [Release 2.07 GPL Edition] Sat Mar 4 17:43:23 2023
Class specified by attribute…

zachi
- 511
- 4
- 13
0
votes
0 answers
Error message by plotting Tree (C5.0 function) : "Error in str2lang(x) : :1:5: unexpected input 1: y ~ 0x ^"
I am looking for the solution to plot my tree, here you can see my code and the error in the tittle.
I try to do clustering by C5.0 package
set.seed(1236)
#Training set (70%)/validation set (30%)
#Sous-groupe emphasis
subset_data <-…

Manon F
- 1
0
votes
1 answer
How to convert all numeric columns to intervals in R
I have a dataframe from 840 columns that I read from a .sav file. I convert all columns to factors using data <- haven::as_factor(data)
This is an example, data just after read the file and without convert to…

Obada Jaras
- 59
- 9