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

cforest party unbalanced classes

I want to measure the features importance with the cforest function from the party library. My output variable has something like 2000 samples in class 0 and 100 samples in class 1. I think a good way to avoid bias due to class unbalance is to…
Donbeo
  • 17,067
  • 37
  • 114
  • 188
3
votes
2 answers

'Object not found' error when loading party package in R

I'm trying to load the party package in R. I have all the relevant dependencies installed, but when I type library(party), I get the error: Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : object 'vI' not found Error:…
Amanda
  • 422
  • 2
  • 6
  • 14
3
votes
1 answer

How to deal with memory issure in Ctree in party package?

I am using ctree method of the Party R package to generate a decision tree. My dataset has about 22 columns and 650000 rows of data. I allocated 10GB of memory to my r session using memory.limit command. I have a 2.3 GHz i3 processor and 6GB of…
apTNow
  • 805
  • 1
  • 9
  • 20
3
votes
1 answer

cforest varimp does not seem to work with categorical predictors

I am trying to run a random forest model using the Party package. I would like to use the varimp function to determine conditional variable importance, however it does not seem to accept categorical variables. Here is a link to my data and below is…
lah
  • 75
  • 2
  • 5
3
votes
1 answer

How to add labels to the terminal nodes of a ctree (package party)?

I created a binary classification tree using ctree. I would like each terminal node to contain the row names associated with that node. How can I accomplish this? For example, for the dataset below, I would like the leftmost node to list the names…
Noam Kremen
  • 388
  • 1
  • 14
2
votes
2 answers

How to install 3rd party prerequisites on c# msi

I have created a .msi in visual studio 2008 containing my project and it requires prerequisite third party software to run including WinZip. I have had a look round and from what I've seen, there's a prerequisite window where you can select programs…
user1087943
  • 489
  • 1
  • 7
  • 15
2
votes
1 answer

Using partykit to predict survival probabilities

I am trying to use the MOB procedure from the R package partykit to predict survival probabilities based on a set of covariates X1,...,X25 and a treatment effect W. The linear predictor in each node in MOB only uses W, X1, and X2, but each covariate…
Remy M
  • 599
  • 1
  • 4
  • 17
2
votes
1 answer

Glmertree options similar to partykit::mob

In the function call to glmertree, is there a way to get specify a minimum sample size for the terminal nodes? I have a relatively large sample (~7000) and would like to grow the tree to at least a depth where terminal nodes have about ~100 in each…
stats134711
  • 624
  • 1
  • 5
  • 15
2
votes
1 answer

Display probability for internal nodes in partykit conditional inference tree (classification tree)

In the partykit package print(i.ctree) provides the probability of the outcome at terminal nodes (classification tree). However, I would like to know the probability of the outcome at internal nodes as well. I'm able to estimate the probability at…
Bisola
  • 21
  • 3
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
0 answers

Is it possible to use full information maximum likelihood (FIML) estimation when building a SEM tree with the partykit package and lavaan in R?

I would like to capture heterogeneity in depressive symptom trajectories using the R package partykit. Therefore, I specified a latent growth curve model (LGCM) in lavaan and set up a “mobster” function that can handle SEMs as shown by Achim Zeileis…
2
votes
1 answer

recursively split a dataframe with partykit::lmtree as a stump tree

I am trying to recursively split my data using a stump tree based on the lmtree function from the partykitlibrary. The idea is the following: [1] for each variable of interest run and lmtree with a depth of 2, store the regression model's results…
user17326436
  • 31
  • 1
  • 3
2
votes
1 answer

R caret: train() failed for repeatedcv with factor predictors

The following function shall be used with Caret's train() function. Without any factor variables or without cross-validation it works fine. The problems appear when using factors as predictors and repeatedcv, because in the folds not all the factors…
yPennylane
  • 760
  • 1
  • 9
  • 27
2
votes
2 answers

partykit::mob() + mlogit: `Error no suitable fitting function specified`

I am trying to fit a conditional logit using mlogit::mlogit() at the end leaves of the tree generated by the MOB algorithm partykit::mob(). Apparently, it cannot be made directly using the partykit::mob() function (below my attempts). However, I…
2
votes
2 answers

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

I am trying to use model-based recursive partitioning (MOB) with the mob() function (from the partykit package) to to obtain the different parameters associated to each feature depending on the optimal partition found using the logistic() regression…
vog
  • 770
  • 5
  • 11