52 questions
1
vote
1
answer
167
views
Unanble to produce the plot using ctree(partykit)
I am trying to plot a simple conditional inference tree using the "partykit" package in R. But when I try to produce the plot of the ctree, it produces the following error -
Error in valid....
2
votes
0
answers
68
views
Customize terminal node with ctree
I computed a conditional recursive partitioning tree in R with that code:
library(partykit)
fit.all.cov <-ctree(as.factor(status) ~ Age.groups + Sex + Education + Migrant.background + Income + ...
1
vote
1
answer
278
views
Changing terminal node in partykit
For illustration purposes, I try to modify the terminal node of a ctree in partykit.
I created some data and fitted an unpruned decision tree. Unsurprisingly the tree grows very large, and I have ...
-1
votes
1
answer
85
views
Partykit CTREE question: How to subset observations within each terminal node (including variables not part of CTREE)
I would like a bit of help with my code. This is my first time posting, so please excuse the length.
Overview: I have conducted a CTREE analysis to identify certain intersections associated with a ...
0
votes
1
answer
48
views
Accessing variables in a REEMctree model
In a simulation study, I'm using the REEMctree model provided by Fu & Simonoff (2015).
They created a function with which one can fit REEMctree models.
The function creates an object in which I'd ...
0
votes
1
answer
153
views
Bootstrapping and recursive partitioning analysis with ctree
I am currently struggling with recursiving partition and bagging/bootstrapping of some data. As the data is confidential I have provided a reproducible example using the "GBSG2" data.
In ...
1
vote
1
answer
308
views
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 ...
1
vote
0
answers
117
views
Does re-labelling categorical variables change conditional inference tree result in partykit?
I'm using the ctree function from partykit from my analysis. My ctree contain all binary/categorical variables. When I change the value labels of the binary categorical variables, I end up getting a ...
2
votes
1
answer
96
views
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....
1
vote
2
answers
189
views
CTreeCtrl TVITEM structure - text length
I am not able to find (in MSDN), if parameter int cchTextMax of TVITEM structure is included the end null terminated string character \0 or no.
TVITEM structure is used by CTreeCtrl or CTreeView class....
2
votes
1
answer
407
views
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 ...
0
votes
0
answers
130
views
R Object Occupies 4.5 Times as Much Memory to Load, as is its Size
I'm trying to load a binary decision tree into R; but I get the error: Error: cannot allocate vector of size 2.0 Mb. The file size is actually 900 MB
My PC's specs are:
Processor Intel(R) Core(TM) ...
0
votes
0
answers
63
views
How to go to last row of result set in JDBC with ctree server
May I know that anyone have idea on how to go to last row of the result set in JDBC with ctree server?
We have try to use the rs.last() but it return the message said that "Driver not support ...
3
votes
1
answer
379
views
How to plot a conditional inference tree on random dataset?
I need to plot a conditional inference tree. I have selected the party::ctree() function. It works on the iris dataset.
library(party)
(irisct_party <- party::ctree(Species ~ .,data = iris))
plot(...
0
votes
0
answers
679
views
Pruned decision tree in r, ctree
I'm developing a binary decision tree in R with the "party" package, ctree.
Further, I want to prune the tree with some controls (ctree_control) e.g., maxdepth, minsplit, and mtry. The model ...
-1
votes
1
answer
163
views
R Prediction After Creating the Model
I get the following error after running
p <- predict(credit_ctree,newdata=newcredit)
I can't see the way to get it to come out right.
Error in checkData(oldData, RET) :
Classes of new data do not ...
0
votes
1
answer
439
views
Weights vs weights in ctree CART conditional tree (party::ctree)
What are "weights" and "weights" in Conditional CARTs?
I am analysing a small data set (N=70) by recursive partitioning using CARTS. Specifically, the ctree function form the party ...
2
votes
1
answer
123
views
Ctree R function is not working with my for loop
I wanted to make a list for for loop, than I wanted to use it for ctree like below. but I couldn't.
I am getting, some errors like "character is not supported" even I change the list to ...
1
vote
1
answer
272
views
Can I store ctree splitting rules and terminal nodes plots in a table?
I would like to create a table to summarise the splitting rules of a conditional inference tree (ctree) so that each predictor is in a separate column and each row is a terminal node with ...
0
votes
1
answer
268
views
"Something is wrong; all the Accuracy metric values are missing" while using partykit, caret, recipes
I am trying to train around 15 machine learning models, using recipes (for consistent pre-processing) and caret (for consistent training). The only 2 models that consistently give me the error "...
0
votes
2
answers
469
views
how to build a tree in r?
I'm working on a student performance dataset and I get this message error
Error in trafo(data = data, numeric_trafo = numeric_trafo, factor_trafo = factor_trafo, :
data class “character” is not ...
1
vote
1
answer
138
views
ctree ignores variables with non syntactic names?
I wonder if partkykit::ctree function ignores variables with non syntactic names or am I missing something?
Toy example:
myData<-data.frame(
Y = factor(rep(LETTERS[1:3], each=10)),
x1 = 1:30,
...
1
vote
1
answer
294
views
partikit predict() returns less rows than input data with missing predictor values
I'm having a problem with partikit weighted conditional tree models trained on data with missing values.
I'm manually creating a bagged tree model by giving different integer weights to observations ...
2
votes
1
answer
363
views
Is it possible to build a random forest with model based trees i.e., `mob()` in partykit package
I'm trying to build a random forest using model based regression trees in partykit package. I have built a model based tree using mob() function with a user defined fit() function which returns an ...
1
vote
1
answer
280
views
Obtaining full path from leaf to root for each terminal node with ctree from partykit
Im a currently working with ctree from R package "partykit" and I was wondering if there is a way to obtain the full path from terminal nodes to root.
I would like to have for each leaf the ...
1
vote
2
answers
214
views
How to plot the restults of ctree in grid?
The results of the plot can be normally arranged in grids. I currently have an issue by plotting the results of the ctree function from the party package in a grid. This question is a duplicate of a ...
1
vote
2
answers
379
views
R partykit::ctree() how to break tie in selecting splitting variable of identical p-value
For a node x in partykit::ctree object, I use the following lines to get the splitting variables on the node:
k=info_node(x)
names(k$p.value)
However, a splitting variables of a node returned by this ...
3
votes
1
answer
4k
views
ROC Curve in R with rpart for a decision tree
I have an issue with creating a ROC Curve for my decision tree created by the rpart package.
My goal was to predict "y" the success of the bank's marketing campaign. In the end, you can get a "yes" ...
3
votes
1
answer
641
views
R partykit: How do I use the offset?
I am trying to predict the frequency of an outcome and I have a lot of data. I have already fitted a glm to the data and now I am trying to use ctree to understand any complex interaction in the ...
0
votes
1
answer
990
views
How to specify multiple splits in R-studio using classification tree- ctree?
I'm using 'ctree' for classification tree ( categorical response variable; New, Replace). I already got help from other available answers and forced the model to start splitting based on 'Year'. I ...
3
votes
0
answers
949
views
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 ...
4
votes
1
answer
887
views
R partykit::ctree offset labels on edges
I am working with ctree and my data set has a covariate of factors that create a node. There are enough factors for that covariate and their names are long enough that they overlap on each other in ...
0
votes
1
answer
820
views
Changing Variable Labels in 'ctree' plot
I'm struggling to try to make a CI tree from the 'party' package in R look presentable. So far this is what I have, in terms of cleaning the tree up.
current version of tree
What I would like to do ...
0
votes
1
answer
163
views
How to turn ctree nodes into a vector?
I'll explain my problem using an example with the iris table. Let's say I want to create a tree between sepal width and species. For this I will use this code:
ctree(Species~Sepal.Width,data=iris)-&...
0
votes
0
answers
765
views
Error in ctree_control ... unused argument.. in R
I would like to add 2 hyper parameters to my ctree model. Here is the code that runs:
library(party)
dat1 <- fread('https://archive.ics.uci.edu/ml/machine-learning-databases/abalone/abalone.data',...
1
vote
3
answers
616
views
Process finished with exit code -1073741819 (0xC0000005) in PyCharm, RESTART: Shell in IDLE, and closes console
I'm trying to connect c-TreeSQL using Python. I know I have the correct driver because I can connect using George Poulose's Query Tool
I have tried these variations and each one has crashed;
...
0
votes
1
answer
742
views
Error in tuneRF in R in if (n == 0) stop("data (x) has 0 rows") : argument is of length zero
I would like to optimize the values of hyperparameters of ctree() (randomforest).
I use the function tuneRF. I get the following error:
Error in if (n == 0) stop("data (x) has 0 rows") :
argument ...
0
votes
1
answer
412
views
Attempting to read raw database file
I'm attempting to read data from a database file (which employees c-tree data structure). This is a very old product, and for various reasons, the ODBC drivers are no longer available to me.
What I ...
0
votes
0
answers
379
views
Cannot coerce class structure("BinaryTree", package = "party") to a data.frame
I have a conditional inference tree model (ctree) saved in an R .rda file and am trying to convert it into a Weka .arff file:
library("foreign")
load("my_ctree.rda")
write.arff(my_ctree, file = "...
0
votes
0
answers
118
views
ctree R not displaying levels
Having trouble using ctree in R, sometimes it does not display any levels at all, here is an example below.
Can anyone explain why. thanks
library("party")
df <- data.frame(matrix(ncol = 3, nrow ...
-2
votes
1
answer
857
views
Getting System.InvalidOperationException Error which I am confused to how to fix it?
Alright so I have part of the script I am writing that will insert new addresses if its already in one table but the issue is i get an exception that I can't seem to fix, I have debugged many times ...
1
vote
1
answer
192
views
For my data insertion method how do I check that the values from the pulled data from the database are being passed correctly or if at all?
Okay so from my previous question this is one iteration of how I am pulling data from the SQL Server and then inserting that same data into CtreeACE where the table is already setup for the values to ...
0
votes
1
answer
185
views
How does one pull data from SQL Server and insert that same data into ctreeACE? (in real time)
Okay so I am writing a C# script that pulls data from an SQL Server and then within that same script inserts the pulled data into the already made table for the pulled data to go into. I would like ...
0
votes
1
answer
127
views
The following script does not work in c-treeACE when I try to insert 5 rows at time, why is that?
Given a set of data and trying to insert all of the rows into the table it seems c-treeACE throws me an error message saying its a syntax error and highlights the zipcode here is an example:
here is ...
1
vote
1
answer
632
views
What is wrong with the syntax of this SQL statement I am using to create a table?
I keep running the code/debugger and even set break points so I can step through the code and haven't been able to find where what the syntax error is I know its within this C# method for creating a ...
4
votes
1
answer
3k
views
Make overfitting tree with maximum depth using ctree
When plotting a ctree model from partykit, I understand that it choose a default to prevent overfitting with overgrown trees. This default value sometimes results in an overly simple tree. To use a ...
1
vote
0
answers
788
views
C-Tree vs R-Tree for circular range query
Why is it better to have a circular range query answered with an already constructed C-tree than an already constructed R-tree? (Assuming I'm correct).
It seems to be more complicated to calculate ...
0
votes
1
answer
177
views
While loop for selecting field names?
I have a nasty, nasty data layout that I am forced to work with. I finally got a working query using C# and a for loop executing the same query over and over but adjusting which fields are called, but ...
1
vote
2
answers
801
views
Need Ctree Faircom connection string for Tosca Automation tool
We are trying to establish connection between Tosca and ctree faircom database but it fails to establish the connection.
Getting the following error message:
'Could not establish a connection using ...
1
vote
1
answer
167
views
How do I create an index using the FairCom c-treeACE CTDB API?
Here is my code based on the CTDB tutorial.
#include <stdio.h>
#include <tchar.h>
#include "ctdbsdk.h" /* c-tree headers */
#define END_OF_FILE INOT_ERR /* INOT_ERR is ctree's 101 error....