Hello, I read the code source of the alisamento procedure in model tree,
even so I don't still understand its operation. The smoothing constant in the code source is 15. Why this value? Starting from the lineal equation generated like me I do obtain the planed model? I used the codes below in some available example, even so, the results were not correct. You can mention an example SMOOTHING_CONSTANT = 15.0; protected static double smoothingOriginal(double n, double pred, double supportPred) throws Exception { double smoothed; smoothed = ((n * pred) + (SMOOTHING_CONSTANT * supportPred)) / (n + SMOOTHING_CONSTANT); return smoothed; } and also coefficients[i] + = ((SMOOTHING_CONSTANT * coeffsUsedByLinearModel[i]) / (n + SMOOTHING_CONSTANT)); . . . _______________________________________________ Wekalist mailing list [hidden email] https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist |
I'm not quite sure I understand your question. Are you asking why there
is no linear model for the internal node in your example? The reason is that the model for the internal node has been combined with the original model for a particular leaf node to form a new model for that leaf node (based on the smoothing formula). You can do this because the smoothing formula is a linear combination of two linear models, and a linear combination of two linear functions yields a new linear function. To figure out how exactly a linear model for a particular leaf was derived, you probably have to change the source code for M5, so that it prints the original linear model for each node. Then you could verify that the smoothed model at a leaf is a combination of the linear models that occur along the path from the root to that leaf. Cheers, Eibe On Jul 21, 2005, at 1:47 PM, Andreia Vieira wrote: > Eike, a great amount of material exists on data mining, even so, the > people stop mentioning practical examples what it could facilitate and > a lot our understanding. I am studying the model tree, even so, > arrested to the subject smooting of the model tree, because understand > purpose of that task, but not understand as arriving to the result. I > already read several goods, besides one that you are one of the > authors (Using Model trees goes classification),bem as, the book > written by Witten Ian, et al., even so, I don't understand as it is > made the smoothing of the tree. I already placed in the list but I > didn't have return. Please, help me in the practice to understand this > procedure. > I find two points of split (0,56 and 0,46). Pruning was the division > 0,45, with 3 instances below and 5 above. Even so, I don't find the > equation smooth for > these observations. The tool WEKA supplies me the following result. I > don't want you to solve the problem, I wanted to understand which the > instances that were used to build the final model according to the > equation described in several matters. p´= (np + kq)/(n+k) > > > M5 pruned model tree: > (using smoothed linear models) > > y2 <= 0.46 : LM1 (3/8.995%) > y2 > 0.46 : LM2 (5/3.989%) > > LM num: 1 P = 7.5434 * y2 - 2.9596 > LM num: 2 P = 9.2628 * y2 - 3.7201 > > > Y > 0,1833 > 0,2907 > 0,2949 > 0,6854 > 1,0000 > 1,2410 > 1,8264 > 1,9803 > > X1 > 0,0566 > 0,0670 > 0,0789 > 0,0878 > 0,1241 > 0,1295 > 0,1566 > 0,1714 > > X2 > 0,3499 > 0,4576 > 0,4613 > 0,8093 > 1,0848 > 1,2984 > 1,8145 > 1,9530 > > > Thank you! _______________________________________________ Wekalist mailing list [hidden email] https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist |
In reply to this post by AndreiA-3
Yes, that probably shouldn't be a constant. It should be an option that
the user can specify. But this particular value appears to work well on many practical problems. Cheers, Eibe On Jul 20, 2005, at 4:10 AM, Andreia Vieira wrote: > Hello, I read the code source of the alisamento procedure in model > tree, > even so I don't still understand its operation. > > The smoothing constant in the code source is 15. Why this value? > Starting from the lineal equation generated like me I do obtain the > planed model? > I used the codes below in some available example, even so, the results > were not correct. You can mention an example > > SMOOTHING_CONSTANT = 15.0; > protected static double smoothingOriginal(double n, double pred, > double supportPred) > throws Exception { > double smoothed; > smoothed = ((n * pred) + (SMOOTHING_CONSTANT * supportPred)) / (n + > SMOOTHING_CONSTANT); > > return smoothed; > } > > and also > > coefficients[i] + = ((SMOOTHING_CONSTANT * coeffsUsedByLinearModel[i]) > / > > (n + SMOOTHING_CONSTANT)); > . > . > . > > > > _______________________________________________ > Wekalist mailing list > [hidden email] > https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist _______________________________________________ Wekalist mailing list [hidden email] https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist |
Free forum by Nabble | Edit this page |