Essentially, I fit the decision tree model (whether CART, conditional inference tree, or otherwise) yet R returns the following error: 'Error in if (node[[node_id]]$split$breaks) { : argument is of length zero'
An example of my code is given here, with a categorical response variable 'Y.'
To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:
Hi @nirgrahamuk . I appreciate your feedback, and of course I understand the motivation behind uploading a reproducible example.
However, the visTree package works with the mock data the authors provide. So, when it comes to uploading a reproducible example, it likely wouldn't resolve the particular issue I am having.
My question was more in terms of the error code, and whether this is something would be familiar with on how to fix.
I dont follow your logic.
Why wouldnt your providing an example to us of the issue you are facing, and having us investigate that, not assist you with solving the issue you are facing?
But short of uploading my dataset, the problem I am facing wouldn't be replicated by those replicating. Instead, in visTree, there is a mock data set - and the code works on this. So, simply generating some data to show as an example on here, would unlikely lead to the problem being identified.
What are your barriers to uploading your dataset?
If it should be anonymous, you could anonymise the contents.
if its too large, you can attempt to reduce it, whilst ensuring that the end of your process still shows the error on the smaller data.
Its quite possible we will fail to understand what is wrong even after you provide the data, but it definitely increases your odds of getting practical support if you provide a demonstration of your bug.
Ok, I'm happy to leave it there, but just for the avoidance of misunderstanding I am not requesting that you upload exactly your dataset, only some representative dataset that sufficiently retains the 'essence' of the issue inherent in your true dataset.
Good luck, hope you can find a solution.
It doesn't appear to have been addressed and the package has not had any updates in a long time, so it could simply be that the package is not fit for purpose. We might speculate that partykit ctree used to represent its data one way, which the original visTree relied upon, and this changed in the interim ? pure speculation on my part