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

Error in varimp (R party package) when conditional = TRUE

I am trying to calculate variable importance for a random forest built using the cforest function in the party package. I would like to run varimp with conditional set to TRUE, but I get an error message when I do so. The error reads: Error in if…
jessdin
  • 21
  • 2
2
votes
1 answer

Displaying inference tree node values with "print"

I apologize in advance if I butcher this question as I'm very new to R and statistical analysis in general. I've generated a conditional inference tree using the party library. When I plot(my_tree, type = "simple") I get a result like this: When I…
Mr. Llama
  • 20,202
  • 2
  • 62
  • 115
2
votes
1 answer

R - as.formula() not working with ctree {party}?

I get Error: $ operator not defined for this S4 class when I try to run a ctree from the party package, but only when the formula is writen as a string that I transform using as.formula(). Below the example : #This works fine : y <- ctree(formula =…
Yohan Obadia
  • 2,552
  • 2
  • 24
  • 31
2
votes
1 answer

Scaling plots in the terminal nodes of ctree graph

I am trying to scale the plots that appear in the terminal nodes of a ctree. I have tried using the yscale parameter but this just results plots that extend beyond the plotting window For example: Here is a ctree for two exponential…
Brian Bole
  • 35
  • 5
2
votes
2 answers

Identify all distinct variables within party ctree nodel

I am using ctree function within party R package. I would like to idenfiy all predictors that are used within the tree in order to reduce the data.frame dimension used for further analyses. For…
Giorgio Spedicato
  • 2,413
  • 3
  • 31
  • 45
2
votes
2 answers

Error installing PARTY package in R

Newbie R user here. I wanted to install the party package in RStudio (Ver 0.98.507), but whether I install it directly from the CRAN repository or whether I save the file first and then load it in R, I get the following error message: >…
Linda
  • 41
  • 1
  • 1
  • 4
2
votes
3 answers

Random Forest with party package cannot handle categorical predictors with more than 4 levels

I am trying to run a random forest model using the party package. My response variable (10 levels) is a classification value for different lake types (interested what factors influence clustering of lakes based on water quality attributes). My…
nrlottig
  • 31
  • 1
  • 4
2
votes
1 answer

parallel prediction with cforest/randomforest prediction (with doSNOW)

I'm trying to speed up the prediction of a test-dataset (n=35000) by splitting it up and letting R run on smaller chunks. The model has been generated with party::cforest. However, I can't get R to calculate even the smallest parts when trying to…
alex_jwb90
  • 1,663
  • 1
  • 11
  • 20
2
votes
1 answer

Recursive Partitioning in R

I am aiming to better predict a buying habits of a company's customer base according to several customer attributes (demographic, past purchase categories, etc). I have a data set of about 100,000 returning customers including the time interval from…
Jeff Coughlin
  • 263
  • 3
  • 8
2
votes
1 answer

Rotate Classification Tree Terminal Barplot axis - R

I have a classification tree analyzed using ctree() was wondering how can one rotate the terminal nodes so that the axes are vertical? library(party) data(iris) attach(iris) plot(ctree(Species ~ Sepal.Length + Sepel.Width + Petal.Length +…
chutsu
  • 13,612
  • 19
  • 65
  • 86
1
vote
1 answer

How to get the response (predict) of each tree from a "party" random forest (cforest)?

I trained a random forest with party::cforest with n_trees for a regression (continuous response). When using "predict(type="response") what one get is only the mean of all n_trees responses. How do I get the response of each individual tree (that…
1
vote
1 answer

Update Estimates in Party / Partykit model with averages from unseen holdout data

I want to create a decision tree (using evtree which has a VERY LONG run time with large datasets) on a subsample of data. I then want to take this model and update the terminal node estimates with estimates from hold out data. This is analogous to…
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
1 answer

Error in kids_node(node)[[i]] : subscript out of bounds in partykit

I'm trying to replicate the procedure proposed here on my data. target is the categorical variable that I want to predict while I would force the first split of the classification tree to be done according to split.variable (categorical too). Due to…
Nico
  • 191
  • 1
  • 6
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