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

Partykit glmtree: to display err in the tree summary

I have constructed a glmtree and I want to have err displayed in both my tree summary and plot. I have managed to have the err displayed in the plot by plot(output_tree, type="simple") but how to have err displayed in my tree summary: my tree only…
Tilly Tan
  • 1
  • 1
0
votes
1 answer

Basic error when trying to run party's cforest

Trying to run R's party package's cforest and doing something basically wrong. Here's my example data: set.seed(1) pred.mat <- matrix(rnorm(100*10),nrow=100) colnames(pred.mat) <- paste("feature",1:10,sep="") df <-…
dan
  • 6,048
  • 10
  • 57
  • 125
0
votes
1 answer

Using decision trees to maximise continuous variable like profit

I have a dataset with profit as the target variable and about 100 different predictor variables (some binary, some continous and some character). Is there a decision tree package in R that can be used that will give buckets (or end nodes) where…
Tammboy
  • 321
  • 4
  • 14
0
votes
1 answer

partykit::ctree randomness in majority=TRUE

I am trying to understand how ctree fits/predict observations with complete missingness in all predictors. For example, library(partykit) airq <- subset(airquality, !is.na(Ozone)) airq <-…
qoheleth
  • 2,219
  • 3
  • 18
  • 23
0
votes
1 answer

Convert party object to pmml

I am currently trying to convert a decision tree created using the R package partykit (party object) to a pmml-format. Are there packages that allow for this conversion? I am aware of the existance of the pmml-package, but this only supports rpart…
Niels
  • 1
  • 1
0
votes
1 answer

manipulate text edge labels ctree

Got a ctree with four labels, but the categories are long text therefore just the first is…
joselitux
0
votes
1 answer

R foreach parallel processing with unexported functions (with C50 example)

I am trying to extract rules from a C50 model while parallel processing. This answer helped me to extract the rules from the model object. However as I need the models to be processed in parallel, I am using foreach. This seems to have a problem…
Jonny
  • 169
  • 2
  • 12
0
votes
1 answer

ctree is showing 3 target values and no label (from 2 values target factor)

very simple data frame: TYPE USERS VISITS SIZE 1 no 3 5 118266 2 no 3 5 118548 3 yes 1 0 274558 4 no 3 10 86078 5 yes 3 4 355091 7 yes 18 0 29915 8 yes 6 0…
useRj
  • 1,232
  • 1
  • 9
  • 15
0
votes
1 answer

varimp (R party) return only zeros

I am getting confused by the behaviour of the varimp() function from party package. I am using conditional random forest to get variable importance following Strobl et al. 2009 recommendations. It works just fine for all my datasets but one. I have…
0
votes
1 answer

Extracting information on terminal nodes in partykit:ctree with a large number of multivariate responses

I am using partykit:ctree to explore my dataset, which is a set of about 15,000 beach surveys, investigating the number of pieces of debris found from 50 different categories. There are lots of zeros in the data, and a large spread of total debris…
Alexandra
  • 25
  • 8
0
votes
1 answer

How to get properties of rpart (CART) decision tree in R?

I have the following rpart: library("partykit") library("rpart") res = rpart(Species ~., data = iris) pres <- as.party(res) > pres Model formula: Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width Fitted party: [1] root | [2]…
Avi
  • 2,247
  • 4
  • 30
  • 52
0
votes
1 answer

Forcing decision trees into minimum degrees

Can a decision tree be forced into a specific degree even if previously discarded? I tried to build a decision tree with Party Package (ctree) but it is ignored from the parameters/categories that are set up. Is there a way to include a decision…
AsSAASA
  • 35
  • 8
0
votes
1 answer

Getting properties values of J48

Following my question I would like to know what should I add in order to get the value of the node and to concatenate it to its name. I have a J48 decision tree: library(RWeka) data(iris) res = J48(Species ~., data = iris) > res J48 pruned…
Avi
  • 2,247
  • 4
  • 30
  • 52
0
votes
1 answer

partykit object varid mismatch

I am using partykit and noticed a possible varid mismatch (unless I misunderstood something). Below is the example code. The root node as returned by nodeapply shows variable 5 as the split variable. Also the first element of the explicitly…
Krrr
  • 452
  • 1
  • 3
  • 15
0
votes
0 answers

Arguments length error when trying to test model using party package in R

I have divided my data set into two groups: transactions.Train (80% of the data) transactions.test (20% of the data) Then I built the decision tree using ctree method from party package as follow: transactions.Tree <- ctree(dt_formula,…