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
14
votes
5 answers

C# Authentication failed because the remote party has closed the transport stream

I want to point out that I have searched a lot for this without a solution. So, I've created a loop that will go throw listBox2 that contains links, each time creating a http GET request in order to access the full source code. My code: private…
Taco2
  • 429
  • 1
  • 6
  • 18
9
votes
4 answers

ctree() - How to get the list of splitting conditions for each terminal node?

I have an output from ctree() (party package) that looks like the following. How do I get the list of splitting conditions for each terminal node, like like sns <= 0, dta <= 1; sns <= 0, dta > 1 and so on? 1) sns <= 0; criterion = 1, statistic =…
Sriram Murali
  • 91
  • 1
  • 3
8
votes
3 answers

How to specify split in a decision tree in R programming?

I am trying to apply decision tree here. Decision tree takes care of splitting at each node itself. But at first node I want to split my tree on the basis of "Age". How do I force that.? library(party) fit2 <- ctree(Churn ~ Gender + Age +…
Yogesh
  • 1,384
  • 1
  • 12
  • 16
8
votes
1 answer

"'Calloc 'could not allocate memory" in 64-bit R

I'm on Windows Server 2012 (64-bit) with 30.5 GB of RAM, running R v3.1.2 in RStudio 0.98, and am still having trouble with R hitting a memory limit. I reviewed the FAQ here:…
Mike Monteiro
  • 1,427
  • 1
  • 14
  • 21
6
votes
1 answer

Plot ctree using rpart.plot functionality

Been trying to use the rpart.plot package to plot a ctree from the partykit library. The reason for this being that the default plot method is terrible when the tree is deep. In my case, my max_depth = 5. I really enjoy rpart.plot's output as it…
Hanjo Odendaal
  • 1,395
  • 2
  • 13
  • 32
6
votes
1 answer

Train a cforest in parallel

I have a very large data frame with 790,000 rows and 140 predictors. Some of these are strongly correlated to each other, and on different scales. With the randomForest package, I can grow a forest on each core using only a small sample of the data,…
Christopher Aden
  • 757
  • 6
  • 21
6
votes
1 answer

partykit: Displaying terminal node percentile values above terminal node boxplots

I'm trying to plot a regression tree generated with rpart using partykit. Let's suppose the formula used is y ~ x1 + x2 + x3 + ... + xn. What I would like to achieve is a tree with boxplots in terminal nodes, with a label on top listing the 10th,…
djr99
  • 63
  • 3
6
votes
2 answers

cforest prints empty tree

I'm trying to use cforest function(R, party package). This's what I do to construct forest: library("party") set.seed(42) readingSkills.cf <- cforest(score ~ ., data = readingSkills, control = cforest_unbiased(mtry = 2,…
Fedorenko Kristina
  • 2,607
  • 2
  • 19
  • 18
5
votes
1 answer

A case sensitive Error of not finding object 'X' in partykit::ctree when there is not even an object X

library(party) library(ggparty) fit_ctree<-partykit::ctree(Distance_dich~., + data=t_train, + maxdepth = 5) Error in .ctree_test_internal(x = x, X = X, ix = NULL, Xleft = Xleft, : object 'X' not found Why am i…
5
votes
1 answer

Changing label positions in a R party plot (decision/regression trees)

The partykit package give a nice representation of decision trees. The only problem I have with it is when labels are long and then they are overlapping. Is it possible to move those labels to prevent it (see the blue arrows on the picture…
Jot eN
  • 6,120
  • 4
  • 40
  • 59
5
votes
1 answer

Changing labels size while plotting conditional inference trees in R

I need to insert conditional inference trees (plotted in party library of R) into a text of PhD thesis, that's why I have to tune all the graphical parameters. I know that the optimal width is 700 (just because it fits the format of thesis to the…
DenisK
  • 140
  • 1
  • 8
5
votes
1 answer

custom split rule with partykit

this post follows this question : https://stackoverflow.com/questions/31234329/rpart-user-defined-implementation I'm very interested in tools which could handle tree growing with customized criteria, such that I could test different model. I tried…
Ooona
  • 103
  • 8
5
votes
1 answer

How to extract the splitting rules for the terminal nodes of ctree()

I have a data set with 6 categorical variables with levels ranging from 5 to 28. I have obtained an output from ctree() (party package) with 17 terminal nodes. I have followed the inputs by @Galled from ctree() - How to get the list of splitting…
Debbie
  • 391
  • 2
  • 18
5
votes
1 answer

Plot of BinaryTree (ctree, party) ignores plot option of par()

I would like to plot the BinaryTree in the uppper part of the plot, and make a second one in the second part (bottom). Here is some example code to show, that the plot of the tree completely ignores the partitioning options set by…
dmeu
  • 3,842
  • 5
  • 27
  • 43
4
votes
1 answer

ggparty and tidymodels, cannot plot final node graphs, no data attached to model(?)

I am playing with tidymodels workflow for ctree with new bonsai package, an extension for modeling with partykit, here is my code: pacman::p_load(tidymodels, bonsai, modeldata, finetune) data(penguins) doParallel::registerDoParallel() split <-…
Jacek Kotowski
  • 620
  • 16
  • 49
1
2 3
15 16