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
3
votes
1 answer

hybrid value object / entity types?

Yes, I agree the title suggests my current line of thinking is defective. BUT in the hopes of again arriving at sanity, here's how I got to this sorry state. The subject object is an Address, and the subject application has hundreds of Employees in…
Berryl
  • 12,471
  • 22
  • 98
  • 182
3
votes
2 answers

Generate table with side-by-side node models of `partykit:mob()` object

Let's say I fit a model using partykit:mob(). Afterward, I would like to generate a side-by-side table with all the nodes (including the model fitted using the whole sample). Here I attempted to do it using stargazer(), but other ways are more than…
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…
3
votes
1 answer

Is a model-based recursive partitioning model from the family of the mixed effect models?

I was wondering if it is correct to say that a model-based recursive partitioning model (mob, package partykit) is of the family of the mixed-effect models. My point is that a mixed effect model provides different parameters for each random effect…
MassCorr
  • 349
  • 1
  • 8
3
votes
2 answers

subgroup identification with regression tree

I am very interested in a recent paper on "Tutorial in biostatistics: data-driven subgroup identification and analysis in clinical trials " (DOI: 10.1002/sim.7064), and I want to reproduce results in the section "Performance of the tree-based…
Z. Zhang
  • 637
  • 4
  • 16
3
votes
1 answer

partykit minsize option drops branches that exceed minsize

I'm using the lmtree() function from partykit to partition data using linear regressions. The regressions use a weight, and I want to ensure that each branch has a minimum total weight, which I specify with the minsize option. For instance, in the…
Abiel
  • 5,251
  • 9
  • 54
  • 74
3
votes
3 answers

Consolidate party rules

A simple example >library(partykit) > partykit:::.list.rules.party(ctree(Petal.Length~.,data=iris)) 2 …
qoheleth
  • 2,219
  • 3
  • 18
  • 23
3
votes
2 answers

R Extracting inner node information and splits from ctree (partykit)

Hi I'm currently trying to extract some of the inner node information stored in the constant partying object in R using ctree in partykit but I'm finding navigating the objects a bit difficult, I'm able to display the information on a plot but I'm…
Damo Frankcom
  • 33
  • 2
  • 5
3
votes
0 answers

R randomForest - how to predict with a "getTree" tree

Background: I can make a random Forest in R: set.seed(1) library(randomForest) data(iris) model.rf <- randomForest(Species ~ ., data=iris, importance=TRUE, ntree=20, mtry = 2) I can predict values using the randomForest object that I just…
EngrStudent
  • 1,924
  • 31
  • 46
3
votes
1 answer

Plot party decision tree

I have the following plot as you can see in the picture, Is there any way to see exact number of percentage in the leaf nodes?
Sina PN
  • 131
  • 3
  • 10
3
votes
1 answer

Using mob() trees (partykit package) with nls() model

I'm trying to use model-based recursive partitioning (MOB) with the mob() function (from the partykit package) to separate several curves that were derived using the nls() function. I had to define my model and determine the starting values. I've…
kurtis
  • 33
  • 4
3
votes
1 answer

Variable importance for a single tree in randomForest, randomForestSRC or cforest?

I am trying to find a way in R to calculate variable importance for a single tree of a random forest or a conditional random forest. A good starting point is the rpart:::importance command which calculates a measure of variable importance for…
Marco Sandri
  • 23,289
  • 7
  • 54
  • 58
3
votes
0 answers

R - Party package: is cforest really bagging?

I'm using the "party" package to create random forest of regression trees. I've created a ForestControl class in order to limit my number of trees (ntree), of nodes (maxdepth) and of variables I use to fit a tree (mtry). One thing I'm not sure of is…
Ben
  • 314
  • 1
  • 9
3
votes
1 answer

Modifying terminal node in ctree(), partykit package

I have a dependent variable to classify by a decision tree. It's composed by three categories of frequences: 738 (19%), 426 (15%) and 1800 (66%). As you imagine the predicted category is always the third one, but the purpose of the tree is…
Gina Zetkin
  • 333
  • 1
  • 5
  • 12
3
votes
0 answers

How do you use R shiny to plot the nodes of a ctree, given that an action button controls when the ctree is outputted?

I'm trying to plot the individual nodes from a regression tree created by the ctree function (party package). I have an action button and the code that generates the ctree only runs after this button is pressed. This part seems to work. After the…
Frikster
  • 2,755
  • 5
  • 37
  • 71
1 2
3
15 16