Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mincriterion with ctree2 model #409

Closed
asardaes opened this issue Apr 13, 2016 · 1 comment
Closed

mincriterion with ctree2 model #409

asardaes opened this issue Apr 13, 2016 · 1 comment

Comments

@asardaes
Copy link
Contributor

@asardaes asardaes commented Apr 13, 2016

I believe that mincriterion shouldn't be set to 0 when using a ctree2 model, the user should be able to define it. I know ctree2 uses maxdepth as tuning parameter, but they are rather independent. Here's an example:

library(party)
data("iris")

# No restrictions on depth, mincriterion = 0.95
model_1 <- ctree(Species ~ ., data = iris, controls = ctree_control())
# Just to know the obtained depth (which is 4)
depth <- party:::maxdepth(model_1@tree)

model_2 <- ctree(Species ~ ., data = iris, 
                 controls = ctree_control(maxdepth = 4, mincriterion = 0.95))
model_3 <- ctree(Species ~ ., data = iris, 
                 controls = ctree_control(maxdepth = 4, mincriterion = 0))

plot(model_1)
plot(model_2)
plot(model_3)

You can see that models 1 and 2 are identical, but model 3 isn't.

topepo added a commit that referenced this issue Apr 13, 2016
@topepo
Copy link
Owner

@topepo topepo commented Apr 13, 2016

Good point. I added the extra parameter to the model.

@topepo topepo closed this Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.