Questions tagged [party]

Questions related to the R packages party and partykit for recursive partitioning

The R packages party and its successor partykit provide a toolbox for recursive partitioning for a variety of regression models. See the manual and vignettes for more details.

240 questions
0
votes
1 answer

How can I make the internal node representation smaller in the plotting function of the partykit/glmertree package in R?

I am working with the glmertree package in R, which is an extension of the partykit package. I am trying to plot a model using the glmertree plotting function, which simply extends the partykit plotting function. I would like to make the circles for…
acn
  • 1
0
votes
1 answer

R - Problems with nodes() for a partykit tree

I have a similar question as in how to get all terminal nodes - weight & response prediction 'ctree' in r I would like to get the result like this. Nevertheless, the nodes()-function does not work properly in my case. And I do not understand…
0
votes
1 answer

Error in Bagging with party::cforest

I'm trying to bag conditional inference trees following the advice of Kuhn et al in 'Applied Predictive Modeling', Ch.8: Conditional inference trees can also be bagged using the cforest function > in the party package if the argument mtry is…
shanlodh
  • 1,015
  • 2
  • 11
  • 30
0
votes
1 answer

Customize regression tree nodes

I built the following regression tree with the rpart package. I had to rename the variables to alphabet order because the original names were long. Now that I have done the analysis I would like the (relevant) 4 splits to be re-renamed to their…
0
votes
1 answer

How to set different kind of bar plot in terminal nodes?

I am running a MOB tree on a dataset and I want to modify plots in terminal nodes. I am going to use bar chart of the coefficients of the models which fitted by MOB in each node as my terminal node. For example, I run the MOB tree on…
Mah Sa
  • 7
  • 3
0
votes
1 answer

How to find the observation in each node of the MOB tree? (partykit package)

I have used the partykit package to create a Model-Based Partitioning (MOB) tree on a dataset and I wondered if there was a way to see which observations in our dataset pass that rules and fall in each node. (I want to have separate data frame for…
Mah Sa
  • 7
  • 3
0
votes
1 answer

Export last trial from C5.0 model

I am trying to export a model built by c50 package in R. I'm using the partykit package for extract the last trial, but it doesn't return the same fitting value. I'dont understand why the as.party.c5.0 function doesn't fit exactly the same way as…
Romain R
  • 47
  • 8
0
votes
1 answer

reverse "inequality sign" presenting order in decision tree built in rpart or partykit

I have built a multi-layer decision tree using rpart and I am trying to replicate the tree structure using partykit package, more specifically, the partysplit-partynodecombo. I am currently having an issue with the order difference between rpart…
Richard Li
  • 21
  • 1
  • 9
0
votes
1 answer

Use (partykit- Nodeapply- Info_node) to extrac information within the function

I am trying to extract information coming from nodeapply( info_node) function. I want to automate the process so that I can extract the information of a list a node ids and operate on them later. The example as follow: data("cars", package =…
Richard Li
  • 21
  • 1
  • 9
0
votes
1 answer

R package partykit : how to use teststat='Teststatistic' argument

I am doing a ctree with partykit package fitform<- Surv(delai_efs ,evt_efs) ~ age + sexer + bmiins + tailler + ins_diab + ins_atca + ins_atctips + ins_atctvp + iscf + aclf_hep_chk + aclf_rein + aclf_coag + aclf_neuro + aclf_pneumo + don_age +…
S.Zebachi
  • 15
  • 6
0
votes
2 answers

decision tree in R- extract data from a specific branch

I am trying to build a classify decision tree using rpart and partykit, and I am wondering is there any function within those packages (or any packages, for that matter) to allow me to create a dataset containing data from a specific subtree or…
Richard Li
  • 21
  • 1
  • 9
0
votes
1 answer

Cforest computational cost, RAM limit exceeded

I'm trying to run a cforest (party package) with a dataset of ~70k observations and ~105 variables, one of them is the response variable (binary). The specific information for the cforest is mtry = 10, ntree = 50, maxsurrogate = 3. The problem is…
0
votes
1 answer

How to edit ctree labels in R

I have a ctree produced and am wanting to make further edits on it. My code is: plot(ct, main = expression('Suitable Brook Trout Habitat (m'^2*'/100m'^2*')'), inner_panel = node_inner(ct, fill = c("white"), id = FALSE), terminal_panel =…
Katti
  • 1
0
votes
1 answer

R partykit calculate classification probabilities on sub stree

I have trained a partykit package ctree classification decision tree and I need to calculate classification probabilities for sub tree (not only for leaf nodes). So for example if a sub tree consists of 3 leaf nodes with the following…
NRG
  • 149
  • 2
  • 10
0
votes
1 answer

Add barplots to circles in inner nodes in partykit plotted trees

The partykit package plots barplots at the terminal nodes of trees which gives a visual rendition of the posterior probabilities of the dependent variable classes. I would like to add those barplots also in the inner nodes, below the standard…
Bakaburg
  • 3,165
  • 4
  • 32
  • 64