Questions tagged [ctree]

52 questions
4
votes
1 answer

R partykit::ctree offset labels on edges

I am working with ctree and my data set has a covariate of factors that create a node. There are enough factors for that covariate and their names are long enough that they overlap on each other in the edges created at the node. I want to find a way…
shea
  • 528
  • 4
  • 17
4
votes
1 answer

Make overfitting tree with maximum depth using ctree

When plotting a ctree model from partykit, I understand that it choose a default to prevent overfitting with overgrown trees. This default value sometimes results in an overly simple tree. To use a post-pruning technique I want to make an…
jardim
  • 43
  • 1
  • 4
3
votes
1 answer

How to plot a conditional inference tree on random dataset?

I need to plot a conditional inference tree. I have selected the party::ctree() function. It works on the iris dataset. library(party) (irisct_party <- party::ctree(Species ~ .,data = iris)) plot(irisct_party) But when I using the random…
Nick
  • 1,086
  • 7
  • 21
3
votes
1 answer

ROC Curve in R with rpart for a decision tree

I have an issue with creating a ROC Curve for my decision tree created by the rpart package. My goal was to predict "y" the success of the bank's marketing campaign. In the end, you can get a "yes" or a "no" as a possible answer. How can I…
Meax
  • 31
  • 1
  • 2
3
votes
0 answers

how to modify terminal node in ctree,plot in R

I'd like to achieve picture like this, The following is what I have now: How can I modify the code to acquire the picture? I mean,how to remove the $err and $distribution in terminal nodes? I have read the Rdocumentation for party-plot but in…
2
votes
1 answer

Should I include group column in data to use ctree in r?

I have data like below: structure(list(`h:23705` = c(7.16421907753984, 7.18756733158759, 6.71825354529678, 7.06582535720175), `h:9076` = c(3.63561443591981, 8.80110411390239, 3.42736295167031, 6.82567063382749), `h:6430` = c(11.6493510134213,…
Nmgh
  • 113
  • 7
2
votes
1 answer

Ctree R function is not working with my for loop

I wanted to make a list for for loop, than I wanted to use it for ctree like below. but I couldn't. I am getting, some errors like "character is not supported" even I change the list to factor I want to change val variable, with the y list, for for…
sanwhere
  • 23
  • 5
2
votes
1 answer

Is it possible to build a random forest with model based trees i.e., `mob()` in partykit package

I'm trying to build a random forest using model based regression trees in partykit package. I have built a model based tree using mob() function with a user defined fit() function which returns an object at the terminal node. In partykit there is…
Kiran KG
  • 33
  • 4
2
votes
1 answer

R partykit: How do I use the offset?

I am trying to predict the frequency of an outcome and I have a lot of data. I have already fitted a glm to the data and now I am trying to use ctree to understand any complex interaction in the dataset that I may have missed. Instead of directly…
CHF18
  • 23
  • 4
2
votes
2 answers

How to read .DAT and .IDX files using C Tree

I've got a program that I am trying to get data out of. I have been unable to find any sort of Database file to open. In the parent directory of the program there are a bunch of .DAT and .IDX files. The program also installed the C-Tree GUI…
Fuzzerker
  • 249
  • 1
  • 6
  • 15
1
vote
1 answer

Any way to get the best fit α in a Conditional Inference Tree model in R?

I have been currently searching for a method to obtain the best fit α (significance level) for a Conditional Inference Tree model (using the party package) in RStudio. I have just realized I've been using the default value (α=0.05) for my…
Kiwi
  • 11
  • 3
1
vote
2 answers

CTreeCtrl TVITEM structure - text length

I am not able to find (in MSDN), if parameter int cchTextMax of TVITEM structure is included the end null terminated string character \0 or no. TVITEM structure is used by CTreeCtrl or CTreeView class. I mean, is it right cchTextMax =…
Michal Hadraba
  • 347
  • 1
  • 11
1
vote
1 answer

invalid number of intervals with partykit decision trees

I'm trying to replicate the procedure proposed here on my data but I get the following error: Error in interval.numeric(x, breaks = c(xmin - tol, ux, xmax)) : invalid number of intervals target is the categorical variable that I want to predict…
Nico
  • 191
  • 1
  • 6
1
vote
1 answer

Can I store ctree splitting rules and terminal nodes plots in a table?

I would like to create a table to summarise the splitting rules of a conditional inference tree (ctree) so that each predictor is in a separate column and each row is a terminal node with corresponding values from each of the predictors. For…
1
vote
1 answer

ctree ignores variables with non syntactic names?

I wonder if partkykit::ctree function ignores variables with non syntactic names or am I missing something? Toy example: myData<-data.frame( Y = factor(rep(LETTERS[1:3], each=10)), x1 = 1:30, x2 = c(1:10,2:11,3:12) ) Clearly x1 is the…
Łukasz Deryło
  • 1,819
  • 1
  • 16
  • 32
1
2 3 4