Weights vs weights in ctree CART conditional tree (party::ctree)

326 views Asked by At

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 package in R.

I am a bit confused about what are "weights" vs "weights". As far as I understand they call "weights" to the final number of observations in each node. But, one can also set "weights" as a measure of importance in the model with conditional trees, a "statistical weight", I will call it.

I am setting a categorical variable as "statistical weights" and I am unsure of what the software is doing behind, but the sample size of each node (N="weights") is suddenly 5.5 times larger (N=400) than the initial one, and the total sample size (N = n1+n2+n3..)) is dependent on the minimum bucket and maximum depth. I thought that the model would only account for the repeatability of such variable and weigh it in the model. I understand why the nodes vary in sample sieze, but I was not expecting the total N to be variable.

I've read the patry manual so many times, and also tried the partykit package. I read and read, and the concepts may be explained but I am confused about getting such a large sample size ("weights") when adding "statistical weights" in an inference tree.

1

There are 1 answers

0
Cris On

After a lot, I finally found that somebody has asked the same here: https://stats.stackexchange.com/questions/178993/defintion-of-the-terms-node-weight-and-case-weight